All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.figures.AttributeFigure
java.lang.Object
|
+----CH.ifa.draw.standard.AbstractFigure
|
+----CH.ifa.draw.figures.AttributeFigure
- public abstract class AttributeFigure
- extends AbstractFigure
A figure that can keep track of an open ended set of attributes.
The attributes are stored in a dictionary implemented by
FigureAttributes.
- See Also:
- Figure, Handle, FigureAttributes
-
AttributeFigure()
-
-
draw(Graphics)
- Draws the figure in the given graphics.
-
drawBackground(Graphics)
- Draws the background of the figure.
-
drawFrame(Graphics)
- Draws the frame of the figure.
-
getAttribute(String)
- Returns the named attribute or null if a
a figure doesn't have an attribute.
-
getDefaultAttribute(String)
- Gets a the default value for a named attribute
-
getFillColor()
- Gets the fill color of a figure.
-
getFrameColor()
- Gets the frame color of a figure.
-
read(StorableInput)
- Reads the Figure from a StorableInput.
-
setAttribute(String, Object)
- Sets the named attribute to the new value
-
write(StorableOutput)
- Stores the Figure to a StorableOutput.
AttributeFigure
protected AttributeFigure()
draw
public void draw(Graphics g)
- Draws the figure in the given graphics. Draw is a template
method calling drawBackground followed by drawFrame.
- Overrides:
- draw in class AbstractFigure
drawBackground
protected void drawBackground(Graphics g)
- Draws the background of the figure.
- See Also:
- draw
drawFrame
protected void drawFrame(Graphics g)
- Draws the frame of the figure.
- See Also:
- draw
getFillColor
public Color getFillColor()
- Gets the fill color of a figure. This is a convenience
method.
- See Also:
- getAttribute
getFrameColor
public Color getFrameColor()
- Gets the frame color of a figure. This is a convenience
method.
- See Also:
- getAttribute
getDefaultAttribute
public static Object getDefaultAttribute(String name)
- Gets a the default value for a named attribute
- See Also:
- getAttribute
getAttribute
public Object getAttribute(String name)
- Returns the named attribute or null if a
a figure doesn't have an attribute.
All figures support the attribute names
FillColor and FrameColor
- Overrides:
- getAttribute in class AbstractFigure
setAttribute
public void setAttribute(String name,
Object value)
- Sets the named attribute to the new value
- Overrides:
- setAttribute in class AbstractFigure
write
public void write(StorableOutput dw)
- Stores the Figure to a StorableOutput.
- Overrides:
- write in class AbstractFigure
read
public void read(StorableInput dr) throws IOException
- Reads the Figure from a StorableInput.
- Overrides:
- read in class AbstractFigure
All Packages Class Hierarchy This Package Previous Next Index