JHotDraw 7.3.1

org.jhotdraw.samples.svg.figures
Class SVGAttributedFigure

java.lang.Object
  extended by org.jhotdraw.beans.AbstractBean
      extended by org.jhotdraw.draw.AbstractFigure
          extended by org.jhotdraw.draw.AbstractAttributedFigure
              extended by org.jhotdraw.samples.svg.figures.SVGAttributedFigure
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Figure, DOMStorable
Direct Known Subclasses:
SVGEllipseFigure, SVGImageFigure, SVGRectFigure, SVGTextAreaFigure, SVGTextFigure

public abstract class SVGAttributedFigure
extends AbstractAttributedFigure

SVGAttributedFigure.

Version:
$Id: SVGAttributedFigure.java 564 2009-10-10 10:21:01Z rawcoder $
Author:
Werner Randelshofer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jhotdraw.draw.AbstractFigure
changingDepth, listenerList
 
Fields inherited from class org.jhotdraw.beans.AbstractBean
propertySupport
 
Constructor Summary
SVGAttributedFigure()
          Creates a new instance.
 
Method Summary
 void draw(java.awt.Graphics2D g)
          Draws the figure.
 void drawFigure(java.awt.Graphics2D g)
          This method is invoked before the rendered image of the figure is composited.
 java.util.Collection<javax.swing.Action> getActions(java.awt.geom.Point2D.Double p)
          Returns a collection of actions which are presented to the user in a popup menu.
 void read(DOMInput in)
           
<T> void
set(AttributeKey<T> key, T newValue)
          Sets an attribute of the figure.
 void write(DOMOutput out)
           
 
Methods inherited from class org.jhotdraw.draw.AbstractAttributedFigure
applyAttributesTo, clone, drawFill, drawStroke, drawText, get, getAttributeKey, getAttributes, getAttributesRestoreData, getDrawingArea, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, setAttributeEnabled, setAttributes, writeAttributes
 
Methods inherited from class org.jhotdraw.draw.AbstractFigure
addFigureListener, addNotify, basicClone, canConnect, changed, createHandles, findCompatibleConnector, findConnector, findFigureInside, fireAreaInvalidated, fireAreaInvalidated, fireAreaInvalidated, fireAttributeChanged, fireFigureAdded, fireFigureChanged, fireFigureChanged, fireFigureChanged, fireFigureHandlesChanged, fireFigureRemoved, fireFigureRequestRemove, fireUndoableEditHappened, getChangingDepth, getConnectors, getCursor, getDecomposition, getDrawing, getEndPoint, getFontRenderContext, getLayer, getLock, getPreferredSize, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, invalidate, isChanging, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, setBounds, setBounds, setRemovable, setSelectable, setTransformable, setVisible, toString, validate, willChange
 
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jhotdraw.draw.Figure
contains, getBounds, getTransformRestoreData, restoreTransformTo, transform
 

Constructor Detail

SVGAttributedFigure

public SVGAttributedFigure()
Creates a new instance.

Method Detail

draw

public void draw(java.awt.Graphics2D g)
Description copied from interface: Figure
Draws the figure.

Specified by:
draw in interface Figure
Overrides:
draw in class AbstractAttributedFigure
Parameters:
g - The Graphics2D to draw to.

drawFigure

public void drawFigure(java.awt.Graphics2D g)
This method is invoked before the rendered image of the figure is composited.


set

public <T> void set(AttributeKey<T> key,
                    T newValue)
Description copied from class: AbstractAttributedFigure
Sets an attribute of the figure. AttributeKey name and semantics are defined by the class implementing the figure interface.

Specified by:
set in interface Figure
Overrides:
set in class AbstractAttributedFigure
See Also:
AttributeKey.set(org.jhotdraw.draw.Figure, T)

getActions

public java.util.Collection<javax.swing.Action> getActions(java.awt.geom.Point2D.Double p)
Description copied from class: AbstractFigure
Returns a collection of actions which are presented to the user in a popup menu.

The collection may contain null entries. These entries are used interpreted as separators in the popup menu.

Specified by:
getActions in interface Figure
Overrides:
getActions in class AbstractFigure

write

public final void write(DOMOutput out)
                 throws java.io.IOException
Specified by:
write in interface DOMStorable
Overrides:
write in class AbstractAttributedFigure
Throws:
java.io.IOException

read

public final void read(DOMInput in)
                throws java.io.IOException
Specified by:
read in interface DOMStorable
Overrides:
read in class AbstractAttributedFigure
Throws:
java.io.IOException

Copyright 1996-2009 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.