org.jhotdraw.contrib
Class ComponentFigure
java.lang.Object
org.jhotdraw.standard.AbstractFigure
org.jhotdraw.figures.AttributeFigure
org.jhotdraw.contrib.ComponentFigure
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Figure, Storable
public class ComponentFigure
- extends AttributeFigure
- Version:
- <$CURRENT_VERSION$>
- Author:
- Ming Fang
- See Also:
- Serialized Form
Method Summary |
void |
basicDisplayBox(java.awt.Point origin,
java.awt.Point corner)
Changes the display box of a figure. |
java.awt.Rectangle |
displayBox()
Gets the display box of a figure |
void |
draw(java.awt.Graphics g)
Draws the figure. |
java.awt.Component |
getComponent()
Getter for property component. |
HandleEnumeration |
handles()
Returns the handles used to manipulate
the figure. |
Methods inherited from class org.jhotdraw.figures.AttributeFigure |
getAttribute, getAttribute, getDefaultAttribute, getDefaultAttribute, getFillColor, getFrameColor, initDefaultAttribute, read, setAttribute, setAttribute, setDefaultAttribute, write |
Methods inherited from class org.jhotdraw.standard.AbstractFigure |
addDependendFigure, addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, getDecoratedFigure, getDependendFigures, getTextHolder, getZValue, 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 |
ComponentFigure
public ComponentFigure(java.awt.Component newComponent)
- Parameters:
newComponent
- a lightweight component
basicDisplayBox
public void basicDisplayBox(java.awt.Point origin,
java.awt.Point corner)
- Changes the display box of a figure. This method is
always implemented in figure subclasses.
It only changes
the displaybox and does not announce any changes. It
is usually not called by the client. Clients typically call
displayBox to change the display box.
- Specified by:
basicDisplayBox
in interface Figure
- Specified by:
basicDisplayBox
in class AbstractFigure
- Parameters:
origin
- the new origincorner
- the new corner- See Also:
displayBox()
displayBox
public java.awt.Rectangle displayBox()
- Gets the display box of a figure
- Specified by:
displayBox
in interface Figure
- Specified by:
displayBox
in class AbstractFigure
- See Also:
basicDisplayBox(java.awt.Point, java.awt.Point)
handles
public HandleEnumeration handles()
- Returns the handles used to manipulate
the figure. Handles is a Factory Method for
creating handle objects.
- Specified by:
handles
in interface Figure
- Specified by:
handles
in class AbstractFigure
- Returns:
- a type-safe iterator of handles
- See Also:
Handle
getComponent
public java.awt.Component getComponent()
- Getter for property component.
- Returns:
- Value of property component.
draw
public void draw(java.awt.Graphics g)
- Draws the figure.
- Specified by:
draw
in interface Figure
- Overrides:
draw
in class AttributeFigure
- Parameters:
g
- the Graphics to draw into