public class IltcCompositeManager extends Object
Modifier and Type | Field and Description |
---|---|
protected IlpContext |
_context
Application context
|
protected IltcLayerPolicy |
_layerPolicy
The layer policy
|
protected Vector |
_macroLayers
The list of macro-layers.
|
protected IlvManager |
_manager |
protected Vector |
_managers
The child nodes.
|
protected IltcCompositeManager |
_parent |
protected static IltcLayerPolicyFactory |
DefaultLayerPolicy
This is the default layer policy factory for IltcCompositeManager
instances.
|
Constructor and Description |
---|
IltcCompositeManager(IlpContext appContext,
IlvManager manager,
boolean uniqueInIlvManager)
Creates a new manager for IltcCompositeGraphic objects.
|
IltcCompositeManager(IlvManager manager)
Creates a new manager for IltcCompositeGraphic objects.
|
Modifier and Type | Method and Description |
---|---|
void |
_composeZoomTransformer(IlvTransformer t)
Modifies the zoom transform: _zoomTransformer := _zoomTransformer t.
|
IlvTransformer |
_getInverseZoomTransformer()
Returns the inverse of the zoom transform.
|
IlvTransformer |
_getZoomTransformer()
Returns the zoom transform.
|
void |
_setZoomTransformer(IlvTransformer t)
Sets the zoom transform.
|
IlvManagerLayer |
addIlvManagerLayerBelow(IltcLayer mlayer)
Adds a new JViews layer below a layer.
|
void |
addIlvManagerLayerBelow(IlvManagerLayer layer,
IltcLayer mlayer)
Adds a given JViews layer below a layer.
|
IlvManagerLayer |
addIlvManagerLayerOnTop(IltcLayer mlayer)
Adds a new JViews layer on top of a layer.
|
void |
addIlvManagerLayerOnTop(IlvManagerLayer layer,
IltcLayer mlayer)
Adds a given JViews layer on top of a layer.
|
protected void |
addInteractiveProxyObject(IltcCompositeGraphic graphic)
Adds a composite object's interactive proxy object to the IlvManager.
|
IltcLayer |
addLayerAtBottom()
Adds a new layer below all other layers.
|
IltcLayer |
addLayerBelow(IltcLayer mlayer)
Adds a new layer below another layer.
|
IltcLayer |
addLayerBelow(IlvManagerLayer ilvlayer)
Adds a new layer below a JViews layer.
|
IltcLayer |
addLayerOnTop()
Adds a new layer on top of all other layers.
|
IltcLayer |
addLayerOnTop(IltcLayer mlayer)
Adds a new layer on top of another layer.
|
IltcLayer |
addLayerOnTop(IlvManagerLayer ilvlayer)
Adds a new layer on top of a JViews layer.
|
protected void |
addLayoutProxyObject(IltcCompositeGraphic graphic)
Adds a composite object's proxy object to the IlvManager.
|
void |
addManager(IltcCompositeManager cm)
Adds a composite submanager to this manager.
|
void |
addObject(IltcCompositeGraphic graphic)
Adds a composite object to the manager.
|
void |
addObject(IltcCompositeGraphic graphic,
IltcLayer mlayer)
Adds a composite object to the manager.
|
protected void |
addObject(IltcCompositeGraphic graphic,
IltcLayer mlayer,
boolean temporary) |
static void |
AddZoomListener(IlvManager manager,
IltcZoomListener listener)
Adds a zoom listener to an IlvManager.
|
static void |
AddZoomSupport(IlvManagerView view)
Adds support for zooming a view.
|
protected void |
applyToLayoutProxy(IltcCompositeGraphic graphic,
IlvGraphic proxy,
IlvApplyObject f,
Object arg)
Applies a function f, with a proxy object temporarily removed from the
manager.
|
void |
applyToObject(IltcCompositeGraphic graphic,
IltcApplyToComposite f)
Applies a function to a composite graphic object.
|
void |
applyToObject(IltcCompositeGraphic graphic,
ilog.tgo.composite.internal.IltcApplyToElement f)
Applies a method to all leaves of a composite object.
|
void |
applyToObject(IltcCompositeGraphic graphic,
IlvApplyObject f,
Object arg)
Applies a method to all leaves of a composite object.
|
void |
applyTransformObject(IltcCompositeGraphic graphic,
IlvTransformer t)
Applies a transform to a composite object.
|
void |
ApplyTransformObject(IltcCompositeGraphic graphic,
IlvTransformer t)
Applies a transform to a composite object.
|
void |
attachView(IlvManagerView view)
This function is called when a view is added to the manager to which this
instance is attached.
|
IlvTransformer |
composeInverseZoomTransformerWith(IlvTransformer t)
Returns the composition of the inverse zoom transformer and the argument.
|
void |
detachView(IlvManagerView view)
This function is called when a view is removed from the manager to which
this instance is attached.
|
void |
dispose()
Cleans up the manager, and drops references to objects, to
help garbage collection.
|
void |
endDelayingOptimizeLayout()
Tells the manager that a temporary inhibition of layout optimization
is terminated, and performs the layout optimization if it was requested
since the last call to
startDelayingOptimizeLayout . |
void |
endDelayingUpdates()
Terminates delaying redraws and updates.
|
void |
fireSelectionEventSeriesBegin()
Broadcasts the beginning of a series of selection change events in this manager.
|
void |
fireSelectionEventSeriesEnd()
Broadcasts the end of a series of selection change events in this manager.
|
void |
fireTreeSelectionEventSeriesBegin()
Broadcasts the beginning of a series of selection change events in this manager
or a submanager.
|
void |
fireTreeSelectionEventSeriesEnd()
Broadcasts the end of a series of selection change events in this manager
or a submanager.
|
static IltcCompositeGraphic |
GetCompositeGraphic(IlvGraphic gg)
Returns the composite graphic object a given IlvGraphic belongs to,
null if none. |
static IltcCompositeGraphic |
GetCompositeGraphicFromProxy(IlvGraphic gg)
Returns the composite graphic object a given proxy represents,
null if none. |
static Enumeration |
GetCompositeManagers(IlvManager manager)
Returns an enumeration of all IltcCompositeManagers which use a given
IlvManager for display.
|
IlpContext |
getContext()
Returns the application context.
|
IltcLayer |
getInsertionLayer()
Returns the default layer where objects are inserted.
|
IlvManagerLayer |
getInteractiveProxyLayer()
Returns the IlvManager layer containing the IltcCompositeInteractiveProxy
for the composite objects.
|
IltcLayer |
getInvisibleLayer()
Returns the special invisible layer.
|
IltcLayer |
getLayer(IltcCompositeGraphic graphic)
Returns the layer a composite object belongs to.
|
static IltcLayer |
GetLayer(IltcCompositeGraphic graphic) |
IltcLayer |
getLayerCloseBelow(IltcLayer mlayer)
Returns the layer sitting below a given layer, with an infinitely
small distance.
|
IltcLayer |
getLayerCloseOnTop(IltcLayer mlayer)
Returns the layer sitting on top of a given layer, with an infinitely
small distance.
|
IltcLayerPolicy |
getLayerPolicy()
Returns this manager's layer policy.
|
Enumeration |
getLayers()
Returns an enumeration of the layers.
|
IlvManager |
getManager()
Returns the IlvGraphic manager.
|
Enumeration |
getManagers()
Returns an enumeration of all the composite managers that have
been added in this manager.
|
int |
getManagersCount()
Returns the number of managers in this composite manager.
|
static IlvGraphic |
GetObject(IlvPoint p,
IlvManagerView view)
Returns the IlvGraphic at a given point in a given view.
|
static IlvGraphic |
GetObjectOnlyJTGO(IlvPoint p,
IlvManagerView view)
Like GetObject(p,view), except that it is free to ignore non-JTGO layers.
|
protected IltcCompositeManager |
getParentManager()
Returns the parent of this composite manager.
|
IlvManagerLayer |
getProxyLayer()
Returns the IlvManager layer containing the IltcCompositeProxy for
the composite objects.
|
IlvTransformer |
getRelativeTransformer(IltcCompositeManager supermanager)
Returns the transformer that allows converting from the coordinate
system of this composite manager to the coordinate system of a
containing composite manager.
|
IltcCompositeManager |
getTopLevelManager()
Returns the top-level manager of this composite manager.
|
IlvTransformer |
getTopLevelTransformer()
Returns the transformer that allows converting from the coordinate
system of this composite manager to the coordinate system of the
top-level composite manager.
|
IltZoomPolicy |
getZoomPolicy() |
IlvTransformer |
getZoomTransformer()
Returns the zoom transform of the associated manager.
|
boolean |
isManaged(IltcCompositeGraphic graphic)
Tests whether a composite graphic object is in this manager.
|
boolean |
isVisible(IltcLayer mlayer)
Returns the global visibility of a layer.
|
boolean |
isVisible(IlvManagerView view,
IltcLayer mlayer)
Returns the visibility of a layer in a given view.
|
String |
layerFullName(String name)
Returns the full name for a layer, given its principal name.
|
void |
objectChanged(IltcCompositeGraphic graphic,
boolean mustLayout)
This function is called when a composite object (present in the
manager) is changed or moved.
|
void |
reDrawObject(IltcCompositeGraphic graphic)
Redraws a composite object.
|
protected void |
removeInteractiveProxyObject(IltcCompositeGraphic graphic)
Removes a composite object's interactive proxy object from the IlvManager.
|
void |
removeLayer(IltcLayer mlayer)
Removes a layer.
|
void |
removeLayer(IltcLayer mlayer,
boolean removeCloseOnes)
Removes a layer.
|
protected void |
removeLayoutProxyObject(IltcCompositeGraphic graphic)
Removes a composite object's proxy object from the IlvManager.
|
void |
removeManager(IltcCompositeManager cm)
Removes a composite submanager from this manager.
|
void |
removeObject(IltcCompositeGraphic graphic)
Removes a composite object from the manager.
|
protected void |
removeObject(IltcCompositeGraphic graphic,
boolean temporary) |
static void |
RemoveZoomListener(IlvManager manager,
IltcZoomListener listener)
Removes a zoom listener from an IlvManager.
|
void |
removeZoomPolicy()
Sets the zoom policy back to the default.
|
static void |
RemoveZoomSupport(IlvManagerView view)
Removes support for zooming a view.
|
void |
replaceHierarchyRoot(IltcCompositeGraphic graphic,
IltcGraphicElementAggregate newRoot)
Replaces the hierarchy root of a composite object with another one.
|
static void |
ReplaceHierarchyRoot(IltcCompositeGraphic graphic,
IltcGraphicElementAggregate newRoot)
Replaces the hierarchy root of a composite object with another one.
|
void |
setForcedInvisible(IltcCompositeGraphic graphic,
boolean invisible)
Makes a graphic object forcibly invisible.
|
void |
setInsertionLayer(IltcLayer mlayer)
Sets the default layer where objects are inserted.
|
void |
setLayerPolicy(IltcLayerPolicy policy)
Changes layer policy for this manager.
|
protected void |
setParent(IltcCompositeManager parent) |
void |
setVisible(IltcLayer mlayer,
boolean visible)
Changes the global visibility of a layer.
|
void |
setVisible(IlvManagerView view,
IltcLayer mlayer,
boolean visible)
Changes the visibility of a layer in a given view.
|
void |
startDelayingOptimizeLayout()
Tells the manager temporarily not to bother with layout optimization,
if the manager is a grapher supporting layout optimization.
|
void |
startDelayingUpdates()
Starts delaying redraws and updates.
|
void |
translateObject(IltcCompositeGraphic graphic,
double dx,
double dy)
Moves a composite object.
|
static void |
TranslateObject(IltcCompositeGraphic graphic,
double dx,
double dy)
Moves a composite object.
|
void |
updatePositions(IltcCompositeGraphic graphic)
Updates the sizes and positions of all leaves of a composite object.
|
static void |
UpdatePositions(ilog.tgo.composite.internal.IltcGraphicModifier graphic)
Updates the sizes and positions of all leaves of a composite object.
|
protected IlpContext _context
protected IlvManager _manager
protected Vector _macroLayers
protected IltcLayerPolicy _layerPolicy
protected static IltcLayerPolicyFactory DefaultLayerPolicy
protected IltcCompositeManager _parent
protected Vector _managers
public IltcCompositeManager(IlvManager manager)
public IltcCompositeManager(IlpContext appContext, IlvManager manager, boolean uniqueInIlvManager)
uniqueInIlvManager
- true if this IltcCompositeManager will be the only one in the IlvManagerpublic IlvManager getManager()
public IlpContext getContext()
public IltcLayerPolicy getLayerPolicy()
public void setLayerPolicy(IltcLayerPolicy policy)
policy
- The new layer policy.IltLayerPolicy.attach(ilog.tgo.composite.IltcCompositeManager)
,
IltLayerPolicy.detach(ilog.tgo.composite.IltcCompositeManager)
public IltcLayer getInsertionLayer()
null
, objects are inserted according to the layer
policy.public void setInsertionLayer(IltcLayer mlayer)
Note: The default layer, when non-null
, overrides the
ruling given by the layer policy.
public IlvManagerLayer getProxyLayer()
protected void addLayoutProxyObject(IltcCompositeGraphic graphic)
protected void removeLayoutProxyObject(IltcCompositeGraphic graphic)
protected void applyToLayoutProxy(IltcCompositeGraphic graphic, IlvGraphic proxy, IlvApplyObject f, Object arg)
public IlvManagerLayer getInteractiveProxyLayer()
protected void addInteractiveProxyObject(IltcCompositeGraphic graphic)
protected void removeInteractiveProxyObject(IltcCompositeGraphic graphic)
public IltcLayer getInvisibleLayer()
public void setForcedInvisible(IltcCompositeGraphic graphic, boolean invisible)
public boolean isManaged(IltcCompositeGraphic graphic)
public void addObject(IltcCompositeGraphic graphic)
public void addObject(IltcCompositeGraphic graphic, IltcLayer mlayer)
mlayer
- Layer to put the object into.protected void addObject(IltcCompositeGraphic graphic, IltcLayer mlayer, boolean temporary)
public void removeObject(IltcCompositeGraphic graphic)
protected void removeObject(IltcCompositeGraphic graphic, boolean temporary)
public void reDrawObject(IltcCompositeGraphic graphic)
public void objectChanged(IltcCompositeGraphic graphic, boolean mustLayout)
Subclasses should override this method.
graphic
- the graphic object which has changedmustLayout
- whether the layout proxy's size has changedpublic static void TranslateObject(IltcCompositeGraphic graphic, double dx, double dy)
Note: This function is only for composite objects which are not
stored in an IltcCompositeManager
.
public void translateObject(IltcCompositeGraphic graphic, double dx, double dy)
public void ApplyTransformObject(IltcCompositeGraphic graphic, IlvTransformer t)
Note: This function is only for composite objects which are not
stored in an IltcCompositeManager
.
public void applyTransformObject(IltcCompositeGraphic graphic, IlvTransformer t)
public static void UpdatePositions(ilog.tgo.composite.internal.IltcGraphicModifier graphic)
Note: This function is only for composite objects which are not
stored in an IltcCompositeManager
.
public void updatePositions(IltcCompositeGraphic graphic)
public static void ReplaceHierarchyRoot(IltcCompositeGraphic graphic, IltcGraphicElementAggregate newRoot)
Note: This function is only for composite objects which are not
stored in an IltcCompositeManager
.
public void replaceHierarchyRoot(IltcCompositeGraphic graphic, IltcGraphicElementAggregate newRoot)
Both the old and new hierarchy are destructively modified.
public void applyToObject(IltcCompositeGraphic graphic, IltcApplyToComposite f)
applyToObject
. This function temporarily
removes the composite object from the manager, then applies your
function, and then puts back the composite object.public void applyToObject(IltcCompositeGraphic graphic, ilog.tgo.composite.internal.IltcApplyToElement f)
public void applyToObject(IltcCompositeGraphic graphic, IlvApplyObject f, Object arg)
public Enumeration getLayers()
IltcLayer
public IltcLayer addLayerOnTop(IltcLayer mlayer)
public IltcLayer addLayerBelow(IltcLayer mlayer)
public IltcLayer addLayerOnTop(IlvManagerLayer ilvlayer)
public IltcLayer addLayerBelow(IlvManagerLayer ilvlayer)
public IlvManagerLayer addIlvManagerLayerOnTop(IltcLayer mlayer)
public void addIlvManagerLayerOnTop(IlvManagerLayer layer, IltcLayer mlayer)
public IlvManagerLayer addIlvManagerLayerBelow(IltcLayer mlayer)
public void addIlvManagerLayerBelow(IlvManagerLayer layer, IltcLayer mlayer)
public IltcLayer addLayerOnTop()
public IltcLayer addLayerAtBottom()
public IltcLayer getLayerCloseOnTop(IltcLayer mlayer)
The given layer and the resulting layer work identically when
passed as arguments to addLayerOnTop
and
addLayerBelow
.
public IltcLayer getLayerCloseBelow(IltcLayer mlayer)
The given layer and the resulting layer work identically when
passed as arguments to addLayerOnTop
and
addLayerBelow
.
public void removeLayer(IltcLayer mlayer, boolean removeCloseOnes)
removeCloseOnes
- if true, also removes all infinitely close layerspublic void removeLayer(IltcLayer mlayer)
public IltcLayer getLayer(IltcCompositeGraphic graphic)
Note: Parts of the composite object may belong to other layers than the one returned.
public static IltcLayer GetLayer(IltcCompositeGraphic graphic)
public boolean isVisible(IltcLayer mlayer)
public boolean isVisible(IlvManagerView view, IltcLayer mlayer)
Note: For a layer to be visible in a view, both the value returned
by this function and the global visibility of the layer must be
true
.
public void setVisible(IltcLayer mlayer, boolean visible)
public void setVisible(IlvManagerView view, IltcLayer mlayer, boolean visible)
Note: For the layer to become actually visible in the view, its global
visibility must be true
.
public String layerFullName(String name)
public static IlvGraphic GetObject(IlvPoint p, IlvManagerView view)
IlvManager.getObject
would return a transparent
proxy belonging to a composite object, this function returns the
real IlvGraphic.public static IlvGraphic GetObjectOnlyJTGO(IlvPoint p, IlvManagerView view)
public static IltcCompositeGraphic GetCompositeGraphic(IlvGraphic gg)
null
if none.
This function is useful in the following contexts:
IlvManager.getObject
, in order to access the composite
graphic object on which a mouse event occurred.IlvManager.getSelectedObjects()
or IlvManager.getObjects()
.IltcCompositeGraphic.getProxy()
public static IltcCompositeGraphic GetCompositeGraphicFromProxy(IlvGraphic gg)
null
if none.
This function is useful for filtering the enumeration returned by
IlvManager.getSelectedObjects()
.
GetCompositeGraphic(ilog.views.IlvGraphic)
public static Enumeration GetCompositeManagers(IlvManager manager)
public void startDelayingOptimizeLayout()
IltCompositeGrapher.optimizeLayout
will
be inhibited until the next call to
endDelayingOptimizeLayout
.public void endDelayingOptimizeLayout()
startDelayingOptimizeLayout
.public void startDelayingUpdates()
endDelayingUpdates
.public void endDelayingUpdates()
startDelayingUpdates
.protected IltcCompositeManager getParentManager()
public void addManager(IltcCompositeManager cm)
cm
- A composite managerpublic void removeManager(IltcCompositeManager cm)
cm
- A composite managerprotected void setParent(IltcCompositeManager parent)
public Enumeration getManagers()
public int getManagersCount()
public IltcCompositeManager getTopLevelManager()
public IlvTransformer getTopLevelTransformer()
public IlvTransformer getRelativeTransformer(IltcCompositeManager supermanager)
public void attachView(IlvManagerView view)
public void detachView(IlvManagerView view)
public IlvTransformer _getZoomTransformer()
public IlvTransformer _getInverseZoomTransformer()
public void _setZoomTransformer(IlvTransformer t)
public void _composeZoomTransformer(IlvTransformer t)
public IlvTransformer composeInverseZoomTransformerWith(IlvTransformer t)
t
- a IlvTransformerpublic IltZoomPolicy getZoomPolicy()
public void removeZoomPolicy()
public static void AddZoomSupport(IlvManagerView view)
Note: When a zoom change occurs, JTGO will change the coordinates of JViews objects present in the manager by calling IlvGraphic.applyTransform on each of them.
Note: When multiple IlvManagerView instances are attached to the same IlvManager, AddZoomSupport should be called only for one of these views. It will have an effect on all of these views, however.
public static void RemoveZoomSupport(IlvManagerView view)
This function must be called before another view can get zooming support on the same IlvManager.
Note: This function does not move back the JViews objects to their original coordinates before AddZoomSupport was applied. If this is desired, you have to change the view's zoom transformer to a translation before calling RemoveZoomSupport.
public static void AddZoomListener(IlvManager manager, IltcZoomListener listener)
public static void RemoveZoomListener(IlvManager manager, IltcZoomListener listener)
public IlvTransformer getZoomTransformer()
null
is returned,
which stands for the identity transform.public void fireSelectionEventSeriesBegin()
public void fireSelectionEventSeriesEnd()
public void fireTreeSelectionEventSeriesBegin()
public void fireTreeSelectionEventSeriesEnd()
public void dispose()
Note: After calling this function, this manager is not functional any more.
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.