|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractFigure
org.jhotdraw.figures.AttributeFigure
public abstract class AttributeFigure
A figure that can keep track of an open ended set of attributes. The attributes are stored in a dictionary implemented by FigureAttributes.
Figure
,
Handle
,
FigureAttributes
,
Serialized FormField Summary |
---|
Fields inherited from interface org.jhotdraw.framework.Figure |
---|
POPUP_MENU |
Method Summary | |
---|---|
void |
draw(java.awt.Graphics g)
Draws the figure in the given graphics. |
java.lang.Object |
getAttribute(FigureAttributeConstant attributeConstant)
Returns the named attribute or null if a a figure doesn't have an attribute. |
java.lang.Object |
getAttribute(java.lang.String name)
Deprecated. use getAttribute(FigureAttributeConstant) instead |
static java.lang.Object |
getDefaultAttribute(FigureAttributeConstant attributeConstant)
|
static java.lang.Object |
getDefaultAttribute(java.lang.String name)
Gets a the default value for a named attribute |
java.awt.Color |
getFillColor()
Gets the fill color of a figure. |
java.awt.Color |
getFrameColor()
Gets the frame color of a figure. |
static java.lang.Object |
initDefaultAttribute(java.lang.String name,
java.lang.Object value)
Initializes a default value for a named attribute The difference between this method and setDefaultAttribute is that if the attribute is already set then it will not be changed. |
void |
read(StorableInput dr)
Reads the Figure from a StorableInput. |
void |
setAttribute(FigureAttributeConstant attributeConstant,
java.lang.Object value)
Sets the named attribute to the new value. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Deprecated. use setAttribute(FigureAttributeConstant, Object) instead |
static java.lang.Object |
setDefaultAttribute(java.lang.String name,
java.lang.Object value)
Sets or adds a default value for a named attribute |
void |
write(StorableOutput dw)
Stores the Figure to a StorableOutput. |
Methods inherited from class org.jhotdraw.standard.AbstractFigure |
---|
addDependendFigure, addFigureChangeListener, addToContainer, basicDisplayBox, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, figures, findFigureInside, getDecoratedFigure, getDependendFigures, getTextHolder, getZValue, handles, includes, invalidate, isEmpty, listener, moveBy, release, removeDependendFigure, removeFigureChangeListener, removeFromContainer, setZValue, size, visit, willChange |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void draw(java.awt.Graphics g)
g
- the Graphics to draw intopublic java.awt.Color getFillColor()
getAttribute(java.lang.String)
public java.awt.Color getFrameColor()
getAttribute(java.lang.String)
public static java.lang.Object setDefaultAttribute(java.lang.String name, java.lang.Object value)
getAttribute(java.lang.String)
public static java.lang.Object initDefaultAttribute(java.lang.String name, java.lang.Object value)
getAttribute(java.lang.String)
,
setDefaultAttribute(java.lang.String, java.lang.Object)
public static java.lang.Object getDefaultAttribute(java.lang.String name)
getAttribute(java.lang.String)
public static java.lang.Object getDefaultAttribute(FigureAttributeConstant attributeConstant)
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface Figure
getAttribute
in class AbstractFigure
public java.lang.Object getAttribute(FigureAttributeConstant attributeConstant)
AbstractFigure
getAttribute
in interface Figure
getAttribute
in class AbstractFigure
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface Figure
setAttribute
in class AbstractFigure
public void setAttribute(FigureAttributeConstant attributeConstant, java.lang.Object value)
AbstractFigure
setAttribute
in interface Figure
setAttribute
in class AbstractFigure
public void write(StorableOutput dw)
write
in interface Storable
write
in class AbstractFigure
public void read(StorableInput dr) throws java.io.IOException
read
in interface Storable
read
in class AbstractFigure
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |