|
JHotDraw 7.0.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jhotdraw.draw.AbstractFigure
org.jhotdraw.draw.AttributedFigure
public abstract class AttributedFigure
A figure that can keep track of an open ended set of attributes.
FIXME - Move all convenience attribute getter methods into AttributeKeys
| Field Summary |
|---|
| Fields inherited from class org.jhotdraw.draw.AbstractFigure |
|---|
changingDepth, decorator, listenerList |
| Constructor Summary | |
|---|---|
AttributedFigure()
Creates a new instance. |
|
| Method Summary | |
|---|---|
protected void |
applyAttributesTo(Figure that)
Applies all attributes of this figure to that figure. |
void |
basicSetAttribute(AttributeKey key,
java.lang.Object newValue)
Sets an attribute of the figure. |
AttributedFigure |
clone()
Returns a clone of the figure. |
protected void |
drawConnectors(java.awt.Graphics2D g)
|
void |
drawFigure(java.awt.Graphics2D g)
|
protected abstract void |
drawFill(java.awt.Graphics2D g)
This method is called by method draw() to draw the fill area of the figure. |
protected abstract void |
drawStroke(java.awt.Graphics2D g)
This method is called by method draw() to draw the text of the figure . |
protected void |
drawText(java.awt.Graphics2D g)
|
java.lang.Object |
getAttribute(AttributeKey key)
Gets an attribute from the figure. |
protected AttributeKey |
getAttributeKey(java.lang.String name)
|
java.util.Map<AttributeKey,java.lang.Object> |
getAttributes()
Returns a view to all attributes of this figure. |
java.awt.geom.Rectangle2D.Double |
getFigureDrawBounds()
|
java.awt.Stroke |
getStroke()
|
double |
getStrokeMiterLimitFactor()
|
boolean |
hasAttribute(AttributeKey key)
|
boolean |
isAttributeEnabled(AttributeKey key)
|
void |
read(DOMInput in)
|
protected void |
readAttributes(DOMInput in)
|
void |
removeAttribute(AttributeKey key)
|
void |
setAttribute(AttributeKey key,
java.lang.Object newValue)
Sets an attribute of the figure. |
void |
setAttributeEnabled(AttributeKey key,
boolean b)
|
void |
setAttributes(java.util.HashMap<AttributeKey,java.lang.Object> map)
|
void |
write(DOMOutput out)
|
protected void |
writeAttributes(DOMOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jhotdraw.draw.Figure |
|---|
basicSetBounds, contains, getBounds, getRestoreData, restoreTo |
| Constructor Detail |
|---|
public AttributedFigure()
| Method Detail |
|---|
public void setAttribute(AttributeKey key,
java.lang.Object newValue)
public void setAttributeEnabled(AttributeKey key,
boolean b)
public boolean isAttributeEnabled(AttributeKey key)
public void setAttributes(java.util.HashMap<AttributeKey,java.lang.Object> map)
public java.util.Map<AttributeKey,java.lang.Object> getAttributes()
Figure
public void basicSetAttribute(AttributeKey key,
java.lang.Object newValue)
AttributeKey.set(org.jhotdraw.draw.Figure, T)public java.lang.Object getAttribute(AttributeKey key)
AttributeKey.get(org.jhotdraw.draw.Figure)public void drawFigure(java.awt.Graphics2D g)
drawFigure in class AbstractFigureprotected void drawConnectors(java.awt.Graphics2D g)
public java.awt.Stroke getStroke()
public double getStrokeMiterLimitFactor()
public java.awt.geom.Rectangle2D.Double getFigureDrawBounds()
getFigureDrawBounds in class AbstractFigureprotected abstract void drawFill(java.awt.Graphics2D g)
protected abstract void drawStroke(java.awt.Graphics2D g)
protected void drawText(java.awt.Graphics2D g)
public AttributedFigure clone()
Figure
clone in interface Figureclone in class AbstractFigure
protected void writeAttributes(DOMOutput out)
throws java.io.IOException
java.io.IOException
protected void readAttributes(DOMInput in)
throws java.io.IOException
java.io.IOExceptionprotected AttributeKey getAttributeKey(java.lang.String name)
protected void applyAttributesTo(Figure that)
public void write(DOMOutput out)
throws java.io.IOException
java.io.IOException
public void read(DOMInput in)
throws java.io.IOException
java.io.IOExceptionpublic void removeAttribute(AttributeKey key)
public boolean hasAttribute(AttributeKey key)
|
Copyright 1996-2006 © JHotDraw.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||