|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCH.ifa.draw.standard.AbstractFigure
public abstract class AbstractFigure
AbstractFigure provides default implementations for the Figure interface.
Template Method
Template Methods implement default and invariant behavior for
figure subclasses.
Figure
,
Handle
,
Serialized FormField Summary |
---|
Fields inherited from interface CH.ifa.draw.framework.Figure |
---|
POPUP_MENU |
Constructor Summary | |
---|---|
protected |
AbstractFigure()
|
Method Summary | |
---|---|
void |
addFigureChangeListener(FigureChangeListener l)
Adds a listener for this figure. |
void |
addToContainer(FigureChangeListener c)
Sets the Figure's container and registers the container as a figure change listener. |
abstract void |
basicDisplayBox(java.awt.Point origin,
java.awt.Point corner)
Sets the display box of a figure. |
protected abstract void |
basicMoveBy(int dx,
int dy)
Moves the figure. |
boolean |
canConnect()
Checks if this figure can be connected. |
java.awt.Point |
center()
Gets the center of a figure. |
void |
changed()
Informs that a figure changed the area of its display box. |
java.lang.Object |
clone()
Clones a figure. |
Locator |
connectedTextLocator(Figure text)
Returns the locator used to located connected text. |
java.awt.Insets |
connectionInsets()
Returns the connection inset. |
Connector |
connectorAt(int x,
int y)
Returns the Figures connector for the specified location. |
void |
connectorVisibility(boolean isVisible)
Sets whether the connectors should be visible. |
boolean |
containsPoint(int x,
int y)
Checks if a point is inside the figure. |
FigureEnumeration |
decompose()
Decomposes a figure into its parts. |
abstract java.awt.Rectangle |
displayBox()
Gets the display box of a figure. |
void |
displayBox(java.awt.Point origin,
java.awt.Point corner)
Changes the display box of a figure. |
void |
displayBox(java.awt.Rectangle r)
Changes the display box of a figure. |
FigureEnumeration |
figures()
Returns an Enumeration of the figures contained in this figure. |
Figure |
findFigureInside(int x,
int y)
Returns the figure that contains the given point. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the named attribute or null if a a figure doesn't have an attribute. |
abstract java.util.Vector |
handles()
Returns the handles of a Figure that can be used to manipulate some of its attributes. |
boolean |
includes(Figure figure)
Checks whether the given figure is contained in this figure. |
void |
invalidate()
Invalidates the figure. |
boolean |
isEmpty()
Checks if the figure is empty. |
FigureChangeListener |
listener()
Gets the figure's listners. |
void |
moveBy(int dx,
int dy)
Moves the figure by the given offset. |
void |
read(StorableInput dr)
Reads the Figure from a StorableInput. |
void |
release()
A figure is released from the drawing. |
void |
removeFigureChangeListener(FigureChangeListener l)
Removes a listener for this figure. |
void |
removeFromContainer(FigureChangeListener c)
Removes a figure from the given container and unregisters it as a change listener. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets the named attribute to the new value. |
java.awt.Dimension |
size()
Gets the size of the figure. |
void |
willChange()
Informes that a figure is about to change something that affects the contents of its display box. |
void |
write(StorableOutput dw)
Stores the Figure to a StorableOutput. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface CH.ifa.draw.framework.Figure |
---|
draw |
Constructor Detail |
---|
protected AbstractFigure()
Method Detail |
---|
public void moveBy(int dx, int dy)
moveBy
in interface Figure
protected abstract void basicMoveBy(int dx, int dy)
moveBy(int, int)
public void displayBox(java.awt.Point origin, java.awt.Point corner)
displayBox
in interface Figure
origin
- the new origincorner
- the new cornerdisplayBox(java.awt.Point, java.awt.Point)
public abstract void basicDisplayBox(java.awt.Point origin, java.awt.Point corner)
basicDisplayBox
in interface Figure
origin
- the new origincorner
- the new cornerdisplayBox(java.awt.Point, java.awt.Point)
public abstract java.awt.Rectangle displayBox()
displayBox
in interface Figure
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)
public abstract java.util.Vector handles()
handles
in interface Figure
Handle
public FigureEnumeration figures()
figures
in interface Figure
CompositeFigure
public java.awt.Dimension size()
size
in interface Figure
public boolean isEmpty()
isEmpty
in interface Figure
Figure.isEmpty()
public Figure findFigureInside(int x, int y)
findFigureInside
in interface Figure
containsPoint(int, int)
public boolean containsPoint(int x, int y)
containsPoint
in interface Figure
public void displayBox(java.awt.Rectangle r)
displayBox
in interface Figure
displayBox(java.awt.Point, java.awt.Point)
public boolean includes(Figure figure)
includes
in interface Figure
public FigureEnumeration decompose()
decompose
in interface Figure
public void addToContainer(FigureChangeListener c)
addToContainer
in interface Figure
public void removeFromContainer(FigureChangeListener c)
removeFromContainer
in interface Figure
public void addFigureChangeListener(FigureChangeListener l)
addFigureChangeListener
in interface Figure
public void removeFigureChangeListener(FigureChangeListener l)
removeFigureChangeListener
in interface Figure
public FigureChangeListener listener()
listener
in interface Figure
public void release()
release
in interface Figure
Figure.release()
public void invalidate()
invalidate
in interface Figure
public void willChange()
willChange
in interface Figure
Figure.willChange()
public void changed()
changed
in interface Figure
FigureChangeEvent
,
Figure.changed()
public java.awt.Point center()
center
in interface Figure
public boolean canConnect()
canConnect
in interface Figure
public java.awt.Insets connectionInsets()
connectionInsets
in interface Figure
public Connector connectorAt(int x, int y)
connectorAt
in interface Figure
ChopBoxConnector
public void connectorVisibility(boolean isVisible)
connectorVisibility
in interface Figure
public Locator connectedTextLocator(Figure text)
connectedTextLocator
in interface Figure
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface Figure
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface Figure
public java.lang.Object clone()
clone
in interface Figure
clone
in class java.lang.Object
Figure.clone()
public void write(StorableOutput dw)
write
in interface Storable
public void read(StorableInput dr) throws java.io.IOException
read
in interface Storable
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |