org.jhotdraw.samples.odg.figures
Class ODGAttributedFigure
java.lang.Object
org.jhotdraw.beans.AbstractBean
org.jhotdraw.draw.AbstractFigure
org.jhotdraw.draw.AbstractAttributedFigure
org.jhotdraw.samples.odg.figures.ODGAttributedFigure
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Figure, ODGFigure, DOMStorable
- Direct Known Subclasses:
- ODGEllipseFigure, ODGRectFigure
public abstract class ODGAttributedFigure
- extends AbstractAttributedFigure
- implements ODGFigure
ODGAttributedFigure.
- Version:
- $Id: ODGAttributedFigure.java 564 2009-10-10 10:21:01Z rawcoder $
- Author:
- Werner Randelshofer
- See Also:
- Serialized Form
|
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)
|
|
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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jhotdraw.samples.odg.figures.ODGFigure |
isEmpty |
| Methods inherited from interface org.jhotdraw.draw.Figure |
addFigureListener, addNotify, canConnect, changed, clone, contains, createHandles, findCompatibleConnector, findConnector, findFigureInside, get, getAttributes, getAttributesRestoreData, getBounds, getConnectors, getCursor, getDecomposition, getDrawingArea, getEndPoint, getLayer, getPreferredSize, getStartPoint, getTool, getToolTipText, getTransformRestoreData, handleDrop, handleMouseClick, includes, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, restoreAttributesTo, restoreTransformTo, setBounds, transform, willChange |
ODGAttributedFigure
public ODGAttributedFigure()
- Creates a new instance.
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