|
||||||||||
| PREV CLASS Documentation homepage. NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvGraphic
ilog.views.graphic.IlvGraphicHandle
ilog.views.graphic.IlvGraphicHandleBag
public class IlvGraphicHandleBag
An IlvGraphicHandleBag object is a graphic handle that is
at the same time a graphic bag for the contained object.
This means, the method IlvGraphic.getGraphicBag() applied on the
referenced object returns the handle.
You can consider it as graphic set that contains only one element.
| Constructor Summary | |
|---|---|
|
IlvGraphicHandleBag(IlvGraphic object)
Creates a new IlvGraphicHandleBag. |
protected |
IlvGraphicHandleBag(IlvGraphic object,
boolean delegateMoveResize)
Creates a new IlvGraphicHandleBag. |
|
IlvGraphicHandleBag(IlvGraphicHandleBag source)
Creates a new IlvGraphicHandleBag by copying an existing one. |
|
IlvGraphicHandleBag(IlvInputStream stream)
Reads the object from an IlvInputStream. |
| Method Summary | |
|---|---|
void |
addGraphicBagHierarchyListener(GraphicBagHierarchyListener listener)
Adds the specified listener to receive events from the ancestor managers and ancestor graphic sets and from this handle when the hierarchy of graphic bags has changed. |
void |
addManagerViewsHierarchyListener(ManagerViewsChangedListener listener)
Adds the specified listener to receive events from the owning manager of this object and from its ancestors when a manager view was added or removed. |
void |
addObject(IlvGraphic graphic,
boolean redraw)
Adds a graphic object to the bag. |
void |
applyToObject(IlvGraphic graphic,
IlvApplyObject f,
Object arg,
boolean redraw)
Applies a method to a graphic object of the bag. |
IlvGraphic |
copy()
Copies the object. |
void |
enableGraphicBagHierarchyEventForwarding()
Enables forwarding of GraphicBagHierarchyEvent events, since
the objects contained in this graphic handle bag need to receive the events. |
void |
enableManagerViewsHierarchyEventForwarding()
Enables forwarding of ManagerViewsChangedEvent events through the nesting hierarchy,
since the objects contained in this graphic handle bag need to receive the
events. |
void |
fireGraphicBagHierarchyEvent(GraphicBagHierarchyEvent event)
Fires a graphic bag hierarchy event to this graphic handle bag and all contained objects. |
void |
fireManagerViewsHierarchyEvent(ManagerViewsChangedEvent event)
Fires a ManagerViewsChangedEvent event to all listeners
installed via addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener) on this graphic
set or contained objects. |
IlvGraphic |
getObject(String name)
Returns the graphic object with that name if it exists in the bag, otherwise returns null. |
IlvGraphicEnumeration |
getObjects()
Returns the objects of the bag. |
boolean |
isDelegateObjectInteractor(IlvObjectInteractor inter)
Tests whether the input object interactor is the delegate interactor suitable for this class. |
boolean |
isOwner()
Returns the ownership property of the object. |
void |
moveObject(IlvGraphic graphic,
float x,
float y,
boolean redraw)
Changes the location of a graphic object. |
boolean |
needsGraphicBagHierarchyEvent()
Returns whether this object needs to receive GraphicBagHierarchyEvent events, either from itself or from its
ancestors. |
boolean |
needsManagerViewsHierarchyEvent()
Returns whether the graphic handle bag needs to receive ManagerViewsChangedEvent events, either from its owning manager
or from its ancestors. |
protected void |
notifyObjectInteractorToManager(IlvObjectInteractor interactor)
Notifies the manager that the object interactor has changed. |
void |
reDrawObj(IlvGraphic graphic)
Redraws a graphic object located in the bag. |
void |
reDrawRegion(IlvRegion region)
Redraws a region of the bag. |
void |
removeGraphicBagHierarchyListener(GraphicBagHierarchyListener listener)
Removes the specified listener so that it no longer receives events from ancestor manager and ancestor graphic sets and from this handle when the hierarchy of graphic bags has changed. |
void |
removeManagerViewsHierarchyListener(ManagerViewsChangedListener listener)
Removes the specified listener so that it no longer receives events from the owning manager of this object and from its ancestors when a manager view was added or removed. |
void |
removeObject(IlvGraphic graphic,
boolean redraw)
Removes a graphic object from the bag. |
void |
reshapeObject(IlvGraphic graphic,
IlvRect newrect,
boolean redraw)
Changes the size of a graphic object. |
protected void |
setDelegateMoveResize(boolean delegateMoveResize)
Sets whether operations that change the position of the object are directly delegated to the referenced object. |
void |
setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the object. |
void |
setObject(IlvGraphic object)
Changes the referenced object. |
boolean |
setObjectName(IlvGraphic graphic,
String name)
Changes the name of a graphic object. |
| Methods inherited from class ilog.views.graphic.IlvGraphicHandle |
|---|
applyTransform, boundingBox, contains, draw, getIntersectionWithOutline, getObject, getOriginalPopupMenu, getPopupMenu, getToolTipText, inside, intersects, isPersistent, move, move, moveResize, resize, rotate, scale, setBackground, setForeground, setOwner, translate, write, zoomable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ilog.views.IlvGraphicBag |
|---|
getGraphicBag |
| Constructor Detail |
|---|
public IlvGraphicHandleBag(IlvGraphic object)
IlvGraphicHandleBag.
object - the referenced object.
protected IlvGraphicHandleBag(IlvGraphic object,
boolean delegateMoveResize)
IlvGraphicHandleBag.
This constructor is mainly useful when creating subclasses of this class.
object - the referenced object.delegateMoveResize - If true, operations that change
the position of the object are directly delegated to the referenced object.public IlvGraphicHandleBag(IlvGraphicHandleBag source)
IlvGraphicHandleBag by copying an existing one.
public IlvGraphicHandleBag(IlvInputStream stream)
throws IlvReadFileException
IlvInputStream.
stream - the input stream.
IlvReadFileException - if the format is not correct.| Method Detail |
|---|
public void setObject(IlvGraphic object)
IlvManager, this method can be called only using the method
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean) of the manager.
setObject in class IlvGraphicHandlepublic boolean isOwner()
This implementation always returns true.
isOwner in class IlvGraphicHandleIlvGraphicHandle.setOwner(boolean)protected void setDelegateMoveResize(boolean delegateMoveResize)
setDelegateMoveResize in class IlvGraphicHandlepublic IlvGraphic copy()
null if the contained object cannot be copied.
copy in class IlvGraphicHandleisOwner()protected void notifyObjectInteractorToManager(IlvObjectInteractor interactor)
notifyObjectInteractorToManager in class IlvGraphicpublic boolean isDelegateObjectInteractor(IlvObjectInteractor inter)
public void setGraphicBag(IlvGraphicBag bag)
Note: do not call this method directly unless you are creating a custom graphics bag.
setGraphicBag in class IlvGraphicbag - The graphic bag to contain this graphic object.IlvGraphic
public void addObject(IlvGraphic graphic,
boolean redraw)
IlvGraphicBag interface.
Since the graphic handle bag can contain only one object,
you can add only an object if the currently referenced object is
null. The passed object becomes the new
currently referenced object.
If the graphic handle bag is in a graphic bag, it automatically
calls applyToObject on its graphic bag while adding
the object.
addObject in interface IlvGraphicBaggraphic - The graphic object.redraw - If true the object is redrawn.
public void removeObject(IlvGraphic graphic,
boolean redraw)
IlvGraphicBag interface.
Since the graphic handle bag can contain only one object,
you can remove only the currently referenced object.
If the graphic handle bag is in a graphic bag, it automatically
calls applyToObject on its graphic bag while removing
the object.
removeObject in interface IlvGraphicBaggraphic - The graphic object.redraw - If true the object is redrawn.public IlvGraphicEnumeration getObjects()
IlvGraphicBag interface.
This returns an enumeration with one object: the referenced object.
getObjects in interface IlvGraphicBagpublic void reDrawObj(IlvGraphic graphic)
IlvGraphicBag interface.
If this graphic handle bag is inside a graphic bag, it redraws this
graphic handle bag.
reDrawObj in interface IlvGraphicBaggraphic - The graphic object.public void reDrawRegion(IlvRegion region)
IlvGraphicBag interface.
If this graphic handle bag is inside a graphic bag, it redraws this
graphic handle bag.
reDrawRegion in interface IlvGraphicBagregion - The region to redraw.
public void reshapeObject(IlvGraphic graphic,
IlvRect newrect,
boolean redraw)
IlvGraphicBag interface.
Since the graphic handle bag can contain only one object,
you can reshape only the currently referenced object.
If the graphic handle bag is in a graphic bag, it automatically
calls applyToObject on its graphic bag while reshaping
the object.
reshapeObject in interface IlvGraphicBaggraphic - The graphic object.newrect - The new desired bounding rectangle.redraw - If true the object is redrawn.
public void moveObject(IlvGraphic graphic,
float x,
float y,
boolean redraw)
IlvGraphicBag interface.
Since the graphic handle bag can contain only one object,
you can move only the currently referenced object.
If the graphic handle bag is in a graphic bag, it automatically
calls applyToObject on its graphic bag while moving
the object.
moveObject in interface IlvGraphicBaggraphic - The graphic object.x - The new desired x position.y - The new desired y position.redraw - If true the object is redrawn.
public void applyToObject(IlvGraphic graphic,
IlvApplyObject f,
Object arg,
boolean redraw)
IlvGraphicBag interface.
If the graphic handle bag is in a graphic bag, it automatically
calls applyToObject on its graphic bag while applying
the object.
applyToObject in interface IlvGraphicBaggraphic - The graphic object.f - The method to apply.arg - The arguments passed to the method f.redraw - If true the object is redrawn.
public boolean setObjectName(IlvGraphic graphic,
String name)
IlvGraphicBag interface.
Since the graphic handle bag can contain only one object,
you can only change the name of the currently referenced object.
setObjectName in interface IlvGraphicBaggraphic - The graphic object.name - The new name.
true if the name can be changed.public IlvGraphic getObject(String name)
null.
Since the graphic handle bag can contain only one object,
it returns currently referenced object if this matches the input name,
and null otherwise.
getObject in interface IlvGraphicBagname - The graphic object name.public void addGraphicBagHierarchyListener(GraphicBagHierarchyListener listener)
addGraphicBagHierarchyListener in interface GraphicBagHierarchyEventReceiverlistener - The listener.removeGraphicBagHierarchyListener(ilog.views.event.GraphicBagHierarchyListener)public void removeGraphicBagHierarchyListener(GraphicBagHierarchyListener listener)
removeGraphicBagHierarchyListener in interface GraphicBagHierarchyEventReceiverlistener - The listener.addGraphicBagHierarchyListener(ilog.views.event.GraphicBagHierarchyListener)public void enableGraphicBagHierarchyEventForwarding()
GraphicBagHierarchyEvent events, since
the objects contained in this graphic handle bag need to receive the events.
enableGraphicBagHierarchyEventForwarding in interface GraphicBagHierarchyEventReceiverpublic boolean needsGraphicBagHierarchyEvent()
GraphicBagHierarchyEvent events, either from itself or from its
ancestors.
needsGraphicBagHierarchyEvent in interface GraphicBagHierarchyEventReceiverpublic void fireGraphicBagHierarchyEvent(GraphicBagHierarchyEvent event)
fireGraphicBagHierarchyEvent in interface GraphicBagHierarchyEventReceiverpublic void addManagerViewsHierarchyListener(ManagerViewsChangedListener listener)
The hierarchy event mechanism is comparable to
java.awt.event.HierarchyEvent on swing components.
The view changed event is generated by a manager when a view is added
or removed, and passed down the nesting hierarchy.
The event is dispatched to every graphic handle bag that is contained in the
manager whose view has changed.
addManagerViewsHierarchyListener in interface ManagerViewsHierarchyEventReceiverlistener - The listener.removeManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener)public void removeManagerViewsHierarchyListener(ManagerViewsChangedListener listener)
removeManagerViewsHierarchyListener in interface ManagerViewsHierarchyEventReceiverlistener - The listener.addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener)public void enableManagerViewsHierarchyEventForwarding()
ManagerViewsChangedEvent events through the nesting hierarchy,
since the objects contained in this graphic handle bag need to receive the
events.
enableManagerViewsHierarchyEventForwarding in interface ManagerViewsHierarchyEventReceiverpublic boolean needsManagerViewsHierarchyEvent()
ManagerViewsChangedEvent events, either from its owning manager
or from its ancestors. It returns true, if a listener was installed though
addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener) on this graphic handle bag or on
any object contained in this graphic handle bag.
needsManagerViewsHierarchyEvent in interface ManagerViewsHierarchyEventReceiverpublic void fireManagerViewsHierarchyEvent(ManagerViewsChangedEvent event)
ManagerViewsChangedEvent event to all listeners
installed via addManagerViewsHierarchyListener(ilog.views.event.ManagerViewsChangedListener) on this graphic
set or contained objects.
fireManagerViewsHierarchyEvent in interface ManagerViewsHierarchyEventReceiver
|
||||||||||
| PREV CLASS Documentation homepage. NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||