|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractFigure
diva.canvas.AbstractFigureContainer
diva.canvas.CompositeFigure
jsky.image.graphics.ImageFigureGroup
public class ImageFigureGroup
Represents a group of figures, that are treated like a single figure.
Field Summary | |
---|---|
protected java.lang.Object |
clientData
An arbitrary object to store with the figure for later reference |
protected CanvasFigureListenerManager |
listenerManager
Manages a list of listeners for figure events |
protected java.util.LinkedList |
slaves
Optional linked list of slave figures, which should be moved with this figure. |
Fields inherited from interface jsky.graphics.CanvasFigure |
---|
DESELECTED, MOVED, RESIZED, SELECTED |
Constructor Summary | |
---|---|
ImageFigureGroup(diva.canvas.interactor.Interactor interactor)
Create an image figure group with the given shape, fill, outline and line width. |
Method Summary | |
---|---|
void |
add(CanvasFigure fig)
Add a figure to the group. |
void |
addCanvasFigureListener(CanvasFigureListener listener)
Add a listener for events on the canvas figure |
void |
addSlave(CanvasFigure fig)
Add a slave figure. |
void |
fireCanvasFigureEvent(int eventType)
Fire an event on the canvas figure. |
java.awt.geom.Rectangle2D |
getBoundsWithoutLabel()
Return the bounds of this figure, ignoring the label, if there is one. |
java.lang.Object |
getClientData()
Return the client data object, or null if none was set |
boolean |
isSelected()
Return true if the figure is selected. |
void |
remove(CanvasFigure fig)
Remove a figure from the group. |
void |
removeCanvasFigureListener(CanvasFigureListener listener)
Remove a listener for events on the canvas figure |
void |
setClientData(java.lang.Object o)
Store an arbitrary object with the figure for later reference |
void |
setVisible(boolean flag)
Set the visibility flag of this object. |
void |
translate(double x,
double y)
Translate the figure with by the given distance. |
Methods inherited from class diva.canvas.CompositeFigure |
---|
add, add, contains, figures, figuresFromBack, figuresFromFront, get, getBackgroundFigure, getBounds, getChildren, getFigureCount, getOrigin, getShape, getTransformContext, indexOf, intersects, invalidateCachedBounds, paint, paint, pick, pick, remove, remove, repaint, replaceChild, setBackgroundFigure, setIndex, toString, transform |
Methods inherited from class diva.canvas.AbstractFigureContainer |
---|
decorate, undecorate |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getInteractor, getLayer, getParent, getToolTipText, getUserObject, hit, isVisible, repaint, setInteractor, setParent, setToolTipText, setUserObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jsky.graphics.CanvasFigure |
---|
getBounds, isVisible |
Methods inherited from interface diva.canvas.VisibleComponent |
---|
isVisible |
Methods inherited from interface diva.canvas.CanvasComponent |
---|
getParent, repaint |
Field Detail |
---|
protected java.lang.Object clientData
protected CanvasFigureListenerManager listenerManager
protected java.util.LinkedList slaves
Constructor Detail |
---|
public ImageFigureGroup(diva.canvas.interactor.Interactor interactor)
interactor
- determines the selection behavior of the figure group (may be null)Method Detail |
---|
public void add(CanvasFigure fig)
add
in interface CanvasFigureGroup
public void remove(CanvasFigure fig)
remove
in interface CanvasFigureGroup
public void setClientData(java.lang.Object o)
setClientData
in interface CanvasFigure
public java.lang.Object getClientData()
getClientData
in interface CanvasFigure
public java.awt.geom.Rectangle2D getBoundsWithoutLabel()
getBoundsWithoutLabel
in interface CanvasFigure
public boolean isSelected()
isSelected
in interface CanvasFigure
public void setVisible(boolean flag)
setVisible
in interface diva.canvas.VisibleComponent
setVisible
in interface CanvasFigure
setVisible
in class diva.canvas.AbstractFigure
public void addCanvasFigureListener(CanvasFigureListener listener)
addCanvasFigureListener
in interface CanvasFigure
public void removeCanvasFigureListener(CanvasFigureListener listener)
removeCanvasFigureListener
in interface CanvasFigure
public void fireCanvasFigureEvent(int eventType)
fireCanvasFigureEvent
in interface CanvasFigure
eventType
- one of the CanvasFigure constants: SELECTED, DESELECTED, RESIZED, MOVEDpublic void addSlave(CanvasFigure fig)
addSlave
in interface CanvasFigure
public void translate(double x, double y)
translate
in interface diva.canvas.Figure
translate
in class diva.canvas.CompositeFigure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |