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.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.jhotdraw.draw.Figure
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY
-
-
Constructor Summary
Constructors Constructor and Description ODGAttributedFigure()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddraw(java.awt.Graphics2D g)Draws the figure.voiddrawFigure(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.<T> voidset(AttributeKey<T> key, T newValue)Sets an attribute of the figure.-
Methods inherited from class org.jhotdraw.draw.AbstractAttributedFigure
clone, get, getAttributes, getAttributesRestoreData, getDrawingArea, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, read, removeAttribute, restoreAttributesTo, setAttributeEnabled, setAttributes, write
-
Methods inherited from class org.jhotdraw.draw.AbstractFigure
addFigureListener, addNotify, changed, createHandles, findCompatibleConnector, findConnector, findFigureInside, fireAreaInvalidated, fireFigureChanged, getConnectors, getCursor, getDecomposition, getEndPoint, getLayer, getPreferredSize, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, setBounds, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisible, toString, willChange
-
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jhotdraw.draw.Figure
addFigureListener, addNotify, addPropertyChangeListener, 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, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, removePropertyChangeListener, requestRemove, restoreAttributesTo, restoreTransformTo, setBounds, transform, willChange
-
-
-
-
Method Detail
-
draw
public void draw(java.awt.Graphics2D g)
Description copied from interface:FigureDraws the figure.- Specified by:
drawin interfaceFigure- Overrides:
drawin classAbstractAttributedFigure- 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:AbstractAttributedFigureSets an attribute of the figure. AttributeKey name and semantics are defined by the class implementing the figure interface.- Specified by:
setin interfaceFigure- Overrides:
setin classAbstractAttributedFigure- 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:AbstractFigureReturns 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:
getActionsin interfaceFigure- Overrides:
getActionsin classAbstractFigure
-
-
DataMelt 3.0 © DataMelt by jWork.ORG