public class ImageFigureGroup extends CompositeFigure implements CanvasFigureGroup
Modifier and Type | Field and Description |
---|---|
protected 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 LinkedList |
slaves
Optional linked list of slave figures, which should be moved with this figure.
|
DESELECTED, MOVED, RESIZED, SELECTED
Constructor and Description |
---|
ImageFigureGroup(Interactor interactor)
Create an image figure group with the given shape, fill, outline and line width.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Rectangle2D |
getBoundsWithoutLabel()
Return the bounds of this figure, ignoring the label, if there is one.
|
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(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.
|
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
decorate, undecorate
contains, getInteractor, getLayer, getParent, getToolTipText, getUserObject, hit, isVisible, repaint, setInteractor, setParent, setToolTipText, setUserObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBounds, isVisible
isVisible
getParent, repaint
protected Object clientData
protected CanvasFigureListenerManager listenerManager
protected LinkedList slaves
public ImageFigureGroup(Interactor interactor)
interactor
- determines the selection behavior of the figure group (may be null)public void add(CanvasFigure fig)
add
in interface CanvasFigureGroup
public void remove(CanvasFigure fig)
remove
in interface CanvasFigureGroup
public void setClientData(Object o)
setClientData
in interface CanvasFigure
public Object getClientData()
getClientData
in interface CanvasFigure
public Rectangle2D getBoundsWithoutLabel()
getBoundsWithoutLabel
in interface CanvasFigure
public boolean isSelected()
isSelected
in interface CanvasFigure
public void setVisible(boolean flag)
setVisible
in interface VisibleComponent
setVisible
in interface CanvasFigure
setVisible
in class 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 Figure
translate
in class CompositeFigure
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.