public class IltcCompositeGraphic extends Object implements IlpGraphic, ilog.tgo.composite.internal.IltcGraphicModifier, IltWithProperties
IltcCompositeManager
AlarmBalloonBorderColor, AlarmBalloonColor, AlarmBalloonOrientation, AlarmBalloonPointerDepth, AlarmBalloonPointerDistance, AlarmBalloonRadius, AlarmBalloonShadowColor, AlarmBalloonShadowThickness, AlarmCountLabelBackgroundColor, AlarmCountOuterBorderColor, CenteredInsets, InfoBalloonBorderColor, InfoBalloonColor, InfoBalloonOrientation, InfoBalloonPointerDepth, InfoBalloonShadowColor, InfoBalloonShadowThickness, StackerAlignment, StackerOrientation, StackerSpacing
Modifier | Constructor and Description |
---|---|
protected |
IltcCompositeGraphic()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
IltcCompositeManager |
_getManager()
Returns the IltcCompositeManager containing this composite graphic object,
or
null if it is currently not in a manager. |
void |
addChild(IlpGraphic graphic)
Adds a new child node.
|
void |
addGraphicChangeListener(GraphicChangeListener l)
Adds a new listener to this graphic.
|
void |
apply(ilog.cpl.graphic.internal.IlpApplyToGraphic f)
Applies the given function to the graphic.
|
void |
apply(ilog.cpl.graphic.internal.IlpApplyToGraphic f,
boolean postOrder)
Applies the given function to the graphic in the
given order.
|
void |
apply(ilog.tgo.composite.internal.IltcApplyToElement f)
Recursively applies a function to all leaves.
|
void |
apply(IlvApplyObject f,
Object arg)
Recursively applies a function to all leaves.
|
void |
applyTransform(IlvTransformer t)
Deprecated.
Please use the two-argument
applyTransform method instead. |
void |
applyTransform(IlvTransformer t,
IlpPositionSource reason)
Applies a transform to this graphic object as a whole.
|
void |
applyZoomTransform(IlvTransformer t)
Applies a transform to this graphic object as a whole, but note it is
a zoom transform; the logical position/shape of the object shouldn't
change.
|
IlvRect |
boundingBoxAllParts(IlvTransformer t)
Returns the bounding box of all subobjects of the composite graphic
object.
|
Object |
call(ilog.cpl.graphic.views.internal.IlpCallObject f)
Recursively applies a function to all leaves, and returns the first
non-null value produced.
|
Object |
call(ilog.cpl.graphic.internal.IlpCallOnGraphic f)
Recursively applies a function to all leaves, and returns the first
non-null value produced.
|
Object |
call(ilog.tgo.composite.internal.IltcCallOnElement f)
Recursively applies a function to all leaves, and returns the first
non-null value produced.
|
void |
computeAttachmentCoordinates()
Computes the values of all attachments, recursively traversing the tree.
|
void |
computeFixedCoordinates()
Prepares the attachment rectangle.
|
boolean |
contains(Point p)
Returns if the given point is contained in this graphic instance.
|
boolean |
containsAllParts(IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within any of the subobjects of the composite
graphic object.
|
ilog.tgo.composite.internal.IltcCompositePart |
createCompositePart(IltcLayer macroLayer)
Returns a new per-layer part for this graphic object.
|
ilog.tgo.composite.internal.IltcCompositeInteractiveProxy |
createLinkInteractiveProxy()
Returns a new link interactive proxy for this graphic object.
|
ilog.tgo.composite.internal.IltcCompositeLinkLayoutProxy |
createLinkLayoutProxy(IltcCompositeGraphic from,
IltcCompositeGraphic to)
Returns a new link layout proxy for this graphic object.
|
ilog.tgo.composite.internal.IltcCompositeInteractiveProxy |
createNodeInteractiveProxy()
Returns a new interactive proxy for this graphic object.
|
ilog.tgo.composite.internal.IltcCompositeLayoutProxy |
createNodeLayoutProxy()
Returns a new layout proxy for this graphic object.
|
void |
dispose()
Helps garbage collection when this object is not needed any more.
|
void |
drawAllParts(Graphics g,
IlvTransformer t)
Draws all subobjects of the composite graphic object.
|
void |
drawAllPartsCorrectly(Graphics g,
IlvTransformer t)
Draws all subobjects of the composite graphic object.
|
protected void |
drawGhost(Graphics g,
IlvTransformer t)
Draws an outline of the composite graphic object.
|
void |
drawGhostCorrectly(Graphics g,
IlvTransformer t)
Draws an outline of the composite graphic object.
|
protected void |
dropResources() |
void |
fireEvent(GraphicChangeEvent ev)
Fires a change event to the listeners.
|
IlpRect |
getAttachmentBounds()
Returns the "attachment rectangle".
|
IlpAttachmentManager |
getAttachmentManager()
Returns the instance responsible for calculating the attachment
for this graphic.
|
IlpAttribute |
getAttribute()
Returns the attribute that this graphic is representing.
|
int |
getChildCount()
Returns the number of all children in the hierarchy.
|
Collection |
getChildren()
Returns a collection with all graphics present in
this composite.
|
JComponent |
getComponent()
Returns the Java component responsible for the display
of this graphic.
|
IltcGraphicElementAggregate |
getHierarchyRoot()
Returns the root of the hierarchy.
|
ilog.tgo.composite.internal.IltcCompositeInteractiveProxy |
getInteractiveProxy()
Returns the IlvGraphic that represents this composite graphic object,
or
null if it is currently not in a manager. |
IlvObjectInteractor |
getInteractor(ilog.tgo.composite.internal.IltcGraphicElement g)
Returns the interactor to be positioned on a graphic element.
|
IlvGraphic |
getLayoutProxy() |
Object |
getLayoutProxyShape()
Returns the information about the layout proxy that is relevant for
layout purposes.
|
IlpGraphic |
getParent()
Returns the parent node in the hierarchy, null if this is a root.
|
Object |
getProperty(Object name)
Returns the named property.
|
IlvGraphic |
getProxy()
Returns the IlvGraphic that represents this composite graphic object
for layout purposes, or
null if it is currently not in a
manager or not considered by the layout. |
IlpRepresentationObject |
getRepresentationObject()
Returns the object that this instance is representing.
|
IlpGraphicView |
getView()
Returns the view where this graphic is being used.
|
void |
invalidateRegion(ilog.tgo.composite.internal.IltcGraphicElement g)
Marks a graphic element for later redraw.
|
boolean |
isInteractiveProxyPresent() |
boolean |
isLayoutProxyPresent() |
boolean |
isMovable()
Returns if the given object can be moved or not through user
interactions.
|
boolean |
isSelectable()
Returns true if the graphic object shall be treated as selectable by
the IlvManager and IlvSelectInteractor.
|
protected boolean |
isSelected()
Returns if the composite graphic shall appear selected or not.
|
void |
layoutProxyApplyTransform(IlvTransformer translation)
Reacts to an applyTransform request from the layout proxy.
|
IlvRect |
layoutProxyBoundingBox(IlvTransformer t,
boolean topleftOnePixelCorrection)
Returns the bounding box of the layout proxy.
|
IlvRect |
linkConnectionRect()
Returns the rectangle to which links can connect.
|
IlvRect |
linkConnectionRect(double magnification,
boolean topleftOnePixelCorrection)
Returns the rectangle to which links can connect.
|
IlvSelection |
makeSelection()
Returns the graphic object which shall be displayed in the topmost
layer while the composite graphic object is selected.
|
void |
noteAddToCompositeManager(IltcCompositeManager manager)
This function is called when the graphic object is being added to a
manager.
|
void |
noteRemoveFromCompositeManager(IltcCompositeManager manager)
This function is called when the graphic object is is being removed from
a manager.
|
void |
reinitLayoutProxy() |
void |
reinitLayoutProxy(IlvGraphic newProxy) |
void |
removeChild(IlpGraphic graphic)
Removes a child node.
|
void |
removeChildren()
Removes all children objects.
|
void |
removeGraphicChangeListener(GraphicChangeListener l)
Removes a listener from the list.
|
void |
removeProperty(Object name)
Removes the named property.
|
void |
setAttribute(IlpAttribute attribute)
Sets the attribute that this graphic is representing.
|
void |
setHierarchyRoot(IltcGraphicElementAggregate elements)
Sets the root of the hierarchy.
|
void |
setInteractiveProxyPresent(boolean present) |
void |
setLayoutProxyPresent(boolean present) |
void |
setParent(IlpGraphic g)
This operation is not supported because IltcCompositeGraphic instances are
always the parent graphic.
|
void |
setProperty(Object name,
Object value)
Sets the named property.
|
void |
setRepresentationObject(IlpRepresentationObject ro)
Sets the object that this instance is representing.
|
void |
setSelected(boolean selected)
Changes the composite graphic object so that is appears selected.
|
void |
setView(IlpGraphicView view)
Sets the graphic view for this instance.
|
protected IltcCompositeGraphic()
public IlpGraphicView getView()
getView
in interface IlpGraphic
public void setView(IlpGraphicView view)
public IlpRepresentationObject getRepresentationObject()
getRepresentationObject
in interface IlpGraphic
public void setRepresentationObject(IlpRepresentationObject ro)
public void setAttribute(IlpAttribute attribute)
public IlpAttribute getAttribute()
getAttribute
in interface IlpGraphic
public JComponent getComponent()
getComponent
in interface IlpGraphic
public void addGraphicChangeListener(GraphicChangeListener l)
addGraphicChangeListener
in interface IlpGraphic
public void removeGraphicChangeListener(GraphicChangeListener l)
removeGraphicChangeListener
in interface IlpGraphic
public void fireEvent(GraphicChangeEvent ev)
fireEvent
in interface IlpGraphic
public IlpGraphic getParent()
getParent
in interface IlpGraphic
public void setParent(IlpGraphic g)
setParent
in interface IlpGraphic
public boolean contains(Point p)
contains
in interface IlpGraphic
public IlpRect getAttachmentBounds()
getAttachmentBounds
in interface IlpAttachable
public IlpAttachmentManager getAttachmentManager()
getAttachmentManager
in interface IlpAttachable
public void computeFixedCoordinates()
computeFixedCoordinates
in interface IlpAttachable
public void computeAttachmentCoordinates()
computeAttachmentCoordinates
in interface IlpAttachable
public Collection getChildren()
getChildren
in interface IlpGraphicContainment
public int getChildCount()
getChildCount
in interface IlpGraphicContainment
public void addChild(IlpGraphic graphic)
addChild
in interface IlpGraphicContainment
public void removeChild(IlpGraphic graphic)
removeChild
in interface IlpGraphicContainment
public void removeChildren()
removeChildren
in interface IlpGraphicContainment
public void apply(ilog.tgo.composite.internal.IltcApplyToElement f)
apply
in interface ilog.tgo.composite.internal.IltcGraphicModifier
public void apply(IlvApplyObject f, Object arg)
apply
in interface ilog.tgo.composite.internal.IltcGraphicModifier
public Object call(ilog.tgo.composite.internal.IltcCallOnElement f)
call
in interface ilog.tgo.composite.internal.IltcGraphicModifier
public Object call(ilog.cpl.graphic.views.internal.IlpCallObject f)
call
in interface ilog.tgo.composite.internal.IltcGraphicModifier
public void apply(ilog.cpl.graphic.internal.IlpApplyToGraphic f)
apply
in interface ilog.cpl.graphic.internal.IlpGraphicModifier
public void apply(ilog.cpl.graphic.internal.IlpApplyToGraphic f, boolean postOrder)
apply
in interface ilog.cpl.graphic.internal.IlpGraphicModifier
public Object call(ilog.cpl.graphic.internal.IlpCallOnGraphic f)
call
in interface ilog.cpl.graphic.internal.IlpGraphicModifier
public IltcGraphicElementAggregate getHierarchyRoot()
public void setHierarchyRoot(IltcGraphicElementAggregate elements)
@Deprecated public void applyTransform(IlvTransformer t)
applyTransform
method instead.public void applyTransform(IlvTransformer t, IlpPositionSource reason)
t
- The transformer.reason
- The reason for the transform, or null
if unknownpublic void applyZoomTransform(IlvTransformer t)
public IlvObjectInteractor getInteractor(ilog.tgo.composite.internal.IltcGraphicElement g)
null
means no interactor. This function is called by
the manager.
The default implementation always returns null
;
subclasses may want to override it.
Note: If an application wishes to change the interactor of
an existing graphic element, it is not sufficient to ensure that
getInteractor
returns the new value. Additionally,
the application must position the new interactor through the manager.
public IlvRect linkConnectionRect()
public IlvRect linkConnectionRect(double magnification, boolean topleftOnePixelCorrection)
magnification
- magnification factor, a hint for the computations, > 0public IlvRect layoutProxyBoundingBox(IlvTransformer t, boolean topleftOnePixelCorrection)
public void layoutProxyApplyTransform(IlvTransformer translation)
public ilog.tgo.composite.internal.IltcCompositePart createCompositePart(IltcLayer macroLayer)
public ilog.tgo.composite.internal.IltcCompositeLayoutProxy createNodeLayoutProxy()
public ilog.tgo.composite.internal.IltcCompositeLinkLayoutProxy createLinkLayoutProxy(IltcCompositeGraphic from, IltcCompositeGraphic to)
public ilog.tgo.composite.internal.IltcCompositeInteractiveProxy createNodeInteractiveProxy()
public ilog.tgo.composite.internal.IltcCompositeInteractiveProxy createLinkInteractiveProxy()
public void drawGhostCorrectly(Graphics g, IlvTransformer t)
g
- a graphics context in XOR modet
- a transformer, normally composed from the view's transformer
and a translationprotected void drawGhost(Graphics g, IlvTransformer t)
The default implementation draws all subobjects. Subclasses may want to override this in order to draw a simpler figure.
g
- a graphics context in XOR modepublic void drawAllPartsCorrectly(Graphics g, IlvTransformer t)
t
- a transformer, normally composed from the view's transformer
and a translationpublic void drawAllParts(Graphics g, IlvTransformer t)
public IlvRect boundingBoxAllParts(IlvTransformer t)
public boolean containsAllParts(IlvPoint p, IlvPoint tp, IlvTransformer t)
public void invalidateRegion(ilog.tgo.composite.internal.IltcGraphicElement g)
public boolean isSelectable()
public IlvSelection makeSelection()
The default implementation returns an invisible object.
public void setSelected(boolean selected)
protected final boolean isSelected()
public void noteAddToCompositeManager(IltcCompositeManager manager)
public void noteRemoveFromCompositeManager(IltcCompositeManager manager)
public Object getProperty(Object name)
getProperty
in interface IlWithProperties
name
- Property identifierpublic void setProperty(Object name, Object value)
setProperty
in interface IlWithProperties
name
- Property identifiervalue
- Property valuepublic void removeProperty(Object name)
removeProperty
in interface IlWithProperties
public final IltcCompositeManager _getManager()
null
if it is currently not in a manager.public void reinitLayoutProxy(IlvGraphic newProxy)
public void reinitLayoutProxy()
public IlvGraphic getLayoutProxy()
public boolean isLayoutProxyPresent()
public void setLayoutProxyPresent(boolean present)
public IlvGraphic getProxy()
null
if it is currently not in a
manager or not considered by the layout. This returns a proxy with the
right geometric properties, but no graphic properties at all.protected void dropResources()
public Object getLayoutProxyShape()
equals
.public ilog.tgo.composite.internal.IltcCompositeInteractiveProxy getInteractiveProxy()
null
if it is currently not in a manager. This returns
a proxy with the right geometric properties, but no graphic properties
at all.public boolean isInteractiveProxyPresent()
public void setInteractiveProxyPresent(boolean present)
public boolean isMovable()
public void dispose()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.