|
JHotDraw 7.5.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.beans.AbstractBean
org.jhotdraw.draw.AbstractFigure
org.jhotdraw.draw.AbstractAttributedFigure
org.jhotdraw.draw.AbstractAttributedDecoratedFigure
public abstract class AbstractAttributedDecoratedFigure
This abstract class can be extended to implement a DecoratedFigure
which has an attribute set.
Field Summary |
---|
Fields inherited from class org.jhotdraw.draw.AbstractFigure |
---|
changingDepth, listenerList |
Fields inherited from class org.jhotdraw.beans.AbstractBean |
---|
propertySupport |
Fields inherited from interface org.jhotdraw.draw.Figure |
---|
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY |
Constructor Summary | |
---|---|
AbstractAttributedDecoratedFigure()
|
Method Summary | |
---|---|
AbstractAttributedDecoratedFigure |
clone()
Returns a clone of the figure, with clones of all aggregated figures, such as children and decorators. |
boolean |
contains(java.awt.geom.Point2D.Double p)
Checks if a point is contained by the figure. |
void |
draw(java.awt.Graphics2D g)
Draws the figure. |
protected void |
drawDecorator(java.awt.Graphics2D g)
|
protected void |
drawFigure(java.awt.Graphics2D g)
|
protected abstract boolean |
figureContains(java.awt.geom.Point2D.Double p)
|
Figure |
getDecorator()
Gets the decorator for this figure. |
java.awt.geom.Rectangle2D.Double |
getDrawingArea()
Returns the drawing area of the figure as a Rectangle. |
protected java.awt.geom.Rectangle2D.Double |
getFigureDrawingArea()
|
void |
read(DOMInput in)
|
protected void |
readDecorator(DOMInput in)
|
void |
setDecorator(Figure newValue)
Sets a decorator Figure, for example a visual adornment to this Figure. |
protected void |
updateDecoratorBounds()
|
void |
write(DOMOutput out)
|
protected void |
writeDecorator(DOMOutput out)
|
Methods inherited from class org.jhotdraw.draw.AbstractAttributedFigure |
---|
applyAttributesTo, drawFill, drawStroke, drawText, get, getAttributeKey, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, set, setAttributeEnabled, setAttributes, writeAttributes |
Methods inherited from class org.jhotdraw.beans.AbstractBean |
---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractAttributedDecoratedFigure()
Method Detail |
---|
public final void draw(java.awt.Graphics2D g)
Figure
draw
in interface Figure
draw
in class AbstractAttributedFigure
g
- The Graphics2D to draw to.protected void drawFigure(java.awt.Graphics2D g)
protected void drawDecorator(java.awt.Graphics2D g)
public final java.awt.geom.Rectangle2D.Double getDrawingArea()
Figure
The drawing area is used to inform DrawingView
about the
area that is needed to draw this figure.
The drawing area needs to be large enough, to take line width, line caps and other decorations into account that exceed the bounds of the Figure.
getDrawingArea
in interface Figure
getDrawingArea
in class AbstractAttributedFigure
protected java.awt.geom.Rectangle2D.Double getFigureDrawingArea()
public void setDecorator(Figure newValue)
DecoratedFigure
setDecorator
in interface DecoratedFigure
public Figure getDecorator()
DecoratedFigure
getDecorator
in interface DecoratedFigure
protected void updateDecoratorBounds()
public final boolean contains(java.awt.geom.Point2D.Double p)
Figure
This is used for hit testing by Tool's.
contains
in interface Figure
protected abstract boolean figureContains(java.awt.geom.Point2D.Double p)
public void read(DOMInput in) throws java.io.IOException
read
in interface DOMStorable
read
in class AbstractAttributedFigure
java.io.IOException
public void write(DOMOutput out) throws java.io.IOException
write
in interface DOMStorable
write
in class AbstractAttributedFigure
java.io.IOException
protected void writeDecorator(DOMOutput out) throws java.io.IOException
java.io.IOException
protected void readDecorator(DOMInput in) throws java.io.IOException
java.io.IOException
public AbstractAttributedDecoratedFigure clone()
Figure
clone
in interface Figure
clone
in class AbstractAttributedFigure
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |