ilog.tgo.composite
Class IltcCompositeGrapher

java.lang.Object
  extended by ilog.tgo.composite.IltcCompositeManager
      extended by ilog.tgo.composite.IltcCompositeGrapher
Direct Known Subclasses:
IltCompositeGrapher

public class IltcCompositeGrapher
extends IltcCompositeManager

This class is the counterpart of IlvGrapher for IltcCompositeGraphic objects. It manages composite objects, each of which takes the role of either a node or a link.

Since:
JTGO 1.0

Field Summary
 
Fields inherited from class ilog.tgo.composite.IltcCompositeManager
_context, _layerPolicy, _macroLayers, _manager, _managers, _parent, DefaultLayerPolicy
 
Constructor Summary
IltcCompositeGrapher(IlpContext appContext, IlvManager manager, boolean uniqueInIlvManager)
          Creates a new grapher for IltcCompositeGraphic objects.
IltcCompositeGrapher(IlvManager manager)
          Creates a new grapher for IltcCompositeGraphic objects.
 
Method Summary
protected  void addInteractiveProxyObject(IltcCompositeGraphic graphic)
          Adds a composite object's interactive proxy object to the IlvManager.
protected  void addLayoutProxyObject(IltcCompositeGraphic graphic)
          Adds a composite object's proxy object to the IlvManager.
 void addLink(IltcCompositeGraphic link, IltcCompositeGraphic fromNode, IltcCompositeGraphic toNode)
          Adds a link to the grapher.
 void addLink(IltcCompositeGraphic link, IltcCompositeGraphic fromNode, IltcCompositeGraphic toNode, IltcLayer mlayer)
          Adds a link to the grapher.
 void addNode(IltcCompositeGraphic node)
          Adds a node to the grapher.
 void addNode(IltcCompositeGraphic node, IltcLayer mlayer)
          Adds a node to the grapher.
protected  void addObject(IltcCompositeGraphic graphic, IltcLayer mlayer, boolean temporary)
          Adds a composite object to the manager.
protected  void applyToLayoutProxy(IltcCompositeGraphic graphic, IlvGraphic proxy, IlvApplyObject f, Object arg)
          Applies a function f, with a proxy object temporarily removed from the manager.
 Enumeration getAllLinks()
          Returns an enumeration of all the links.
 Enumeration getAllNodes()
          Returns an enumeration of all the nodes.
 IltcCompositeGraphic getFrom(IltcCompositeGraphic link)
          Returns the starting point of a link.
 Enumeration getLinks(IltcCompositeGraphic node)
          Returns an enumeration of all the links ending on a given node.
 Enumeration getLinksFrom(IltcCompositeGraphic node)
          Returns an enumeration of all the links originating from a given node.
 Enumeration getLinksTo(IltcCompositeGraphic node)
          Returns an enumeration of all the links going to a given node.
 IltcCompositeGraphic getTo(IltcCompositeGraphic link)
          Returns the ending point of a link.
 boolean isLink(IltcCompositeGraphic object)
          Determines whether an object is known as a link to the grapher.
 boolean isNode(IltcCompositeGraphic object)
          Determines whether an object is known as a node to the grapher.
 void linkAdded(IltcCompositeGraphic graphic)
          This function is called when a link in the manager is added.
 void linkChanged(IltcCompositeGraphic graphic, boolean mustLayout)
          This function is called when a link in the manager is changed or moved.
 void linkRemoved(IltcCompositeGraphic graphic)
          This function is called when a link in the manager is removed.
protected  boolean mustUpdateAdjacentLinks(IltcCompositeGraphic node)
           
 void nodeAdded(IltcCompositeGraphic graphic)
          This function is called when a node in the manager is added.
 void nodeChanged(IltcCompositeGraphic graphic, boolean mustLayout)
          This function is called when a node in the manager is changed or moved.
 void nodeRemoved(IltcCompositeGraphic graphic)
          This function is called when a node in the manager is removed.
 void objectChanged(IltcCompositeGraphic object, boolean mustLayout)
          This function is called when a composite object (present in the manager) is changed or moved.
protected  void removeAdjacentLinks(IltcCompositeGraphic node, Vector links)
          Removes a set of links, all incident with the same node, from the grapher, and notifies the world about it.
protected  void removeInteractiveProxyObject(IltcCompositeGraphic graphic)
          Removes a composite object's interactive proxy object from the IlvManager.
protected  void removeLayoutProxyObject(IltcCompositeGraphic graphic)
          Removes a composite object's proxy object from the IlvManager.
 void removeLink(IltcCompositeGraphic link)
          Removes a link from the grapher.
 void removeLinkNotify(IltcCompositeGraphic link)
          Removes a link from the grapher, and notifies the world about it.
 void removeNode(IltcCompositeGraphic node)
          Removes a node from the grapher.
protected  void removeObject(IltcCompositeGraphic graphic, boolean temporary)
          Removes a composite object from the manager.
 
Methods inherited from class ilog.tgo.composite.IltcCompositeManager
_composeZoomTransformer, _getInverseZoomTransformer, _getZoomTransformer, _setZoomTransformer, addIlvManagerLayerBelow, addIlvManagerLayerBelow, addIlvManagerLayerOnTop, addIlvManagerLayerOnTop, addLayerAtBottom, addLayerBelow, addLayerBelow, addLayerOnTop, addLayerOnTop, addLayerOnTop, addManager, addObject, addObject, AddZoomListener, AddZoomSupport, applyToObject, applyToObject, applyToObject, applyTransformObject, ApplyTransformObject, attachView, composeInverseZoomTransformerWith, detachView, dispose, endDelayingOptimizeLayout, endDelayingUpdates, fireSelectionEventSeriesBegin, fireSelectionEventSeriesEnd, fireTreeSelectionEventSeriesBegin, fireTreeSelectionEventSeriesEnd, GetCompositeGraphic, GetCompositeGraphicFromProxy, GetCompositeManagers, getContext, getInsertionLayer, getInteractiveProxyLayer, getInvisibleLayer, getLayer, GetLayer, getLayerCloseBelow, getLayerCloseOnTop, getLayerPolicy, getLayers, getManager, getManagers, getManagersCount, GetObject, GetObjectOnlyJTGO, getParentManager, getProxyLayer, getRelativeTransformer, getTopLevelManager, getTopLevelTransformer, getZoomPolicy, getZoomTransformer, isManaged, isVisible, isVisible, layerFullName, reDrawObject, removeLayer, removeLayer, removeManager, removeObject, RemoveZoomListener, removeZoomPolicy, RemoveZoomSupport, replaceHierarchyRoot, ReplaceHierarchyRoot, setForcedInvisible, setInsertionLayer, setLayerPolicy, setParent, setVisible, setVisible, startDelayingOptimizeLayout, startDelayingUpdates, translateObject, TranslateObject, updatePositions, UpdatePositions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltcCompositeGrapher

public IltcCompositeGrapher(IlvManager manager)
Creates a new grapher for IltcCompositeGraphic objects. The leaves of the composite objects will be inserted into the given IlvManager.


IltcCompositeGrapher

public IltcCompositeGrapher(IlpContext appContext,
                            IlvManager manager,
                            boolean uniqueInIlvManager)
Creates a new grapher for IltcCompositeGraphic objects. The leaves of the composite objects will be inserted into the given IlvManager.

Since:
JTGO 3.1
Internal method or field: do not use!
Method Detail

addNode

public void addNode(IltcCompositeGraphic node)
Adds a node to the grapher.


addNode

public void addNode(IltcCompositeGraphic node,
                    IltcLayer mlayer)
Adds a node to the grapher.

Parameters:
node - The node to be added.
mlayer - Layer to put the node into.

addLink

public void addLink(IltcCompositeGraphic link,
                    IltcCompositeGraphic fromNode,
                    IltcCompositeGraphic toNode)
Adds a link to the grapher.


addLink

public void addLink(IltcCompositeGraphic link,
                    IltcCompositeGraphic fromNode,
                    IltcCompositeGraphic toNode,
                    IltcLayer mlayer)
Adds a link to the grapher.

Parameters:
link - The link to be added.
fromNode - The from end-point.
toNode - The to end-point.
mlayer - The layer to put the node into.

getAllNodes

public Enumeration getAllNodes()
Returns an enumeration of all the nodes.

Returns:
an enumeration of IltcCompositeGraphic
See Also:
IltCompositeGrapher.getNodes()

getAllLinks

public Enumeration getAllLinks()
Returns an enumeration of all the links.

Returns:
an enumeration of IltcCompositeGraphic
See Also:
IltCompositeGrapher.getLinks()

getFrom

public IltcCompositeGraphic getFrom(IltcCompositeGraphic link)
Returns the starting point of a link.


getTo

public IltcCompositeGraphic getTo(IltcCompositeGraphic link)
Returns the ending point of a link.


getLinks

public Enumeration getLinks(IltcCompositeGraphic node)
Returns an enumeration of all the links ending on a given node. Links which start and end in the same node will only be listed once.

Returns:
an enumeration of IltcCompositeGraphic

getLinksFrom

public Enumeration getLinksFrom(IltcCompositeGraphic node)
Returns an enumeration of all the links originating from a given node.

Returns:
an enumeration of IltcCompositeGraphic

getLinksTo

public Enumeration getLinksTo(IltcCompositeGraphic node)
Returns an enumeration of all the links going to a given node.

Returns:
an enumeration of IltcCompositeGraphic

removeLink

public void removeLink(IltcCompositeGraphic link)
Removes a link from the grapher.

Note: In order to remove a link temporarily from the grapher (while keeping its ends the same) it is more efficient to use removeObject() and addObject().

Note: This function does not maintain the coherence between IltObjects and the grapher. Please use the function IltObject.removeGraphic instead.

See Also:
IltObject.removeGraphic(ilog.tgo.graphic.IltGraphicManager)

removeLinkNotify

public void removeLinkNotify(IltcCompositeGraphic link)
Removes a link from the grapher, and notifies the world about it.

Internal method or field: do not use!

removeAdjacentLinks

protected void removeAdjacentLinks(IltcCompositeGraphic node,
                                   Vector links)
Removes a set of links, all incident with the same node, from the grapher, and notifies the world about it.

Internal method or field: do not use!

removeNode

public void removeNode(IltcCompositeGraphic node)
Removes a node from the grapher.

Note: In order to remove a node temporarily from the grapher (while keeping its links intact), you have to use removeObject() and addObject(), not removeNode().

Note: This function does not maintain the coherence between IltObjects and the grapher. Please use the function IltObject.removeGraphic instead.

See Also:
IltObject.removeGraphic(ilog.tgo.graphic.IltGraphicManager)

isNode

public boolean isNode(IltcCompositeGraphic object)
Determines whether an object is known as a node to the grapher.


isLink

public boolean isLink(IltcCompositeGraphic object)
Determines whether an object is known as a link to the grapher.


addLayoutProxyObject

protected void addLayoutProxyObject(IltcCompositeGraphic graphic)
Description copied from class: IltcCompositeManager
Adds a composite object's proxy object to the IlvManager.

Overrides:
addLayoutProxyObject in class IltcCompositeManager
Internal method or field: do not use!

removeLayoutProxyObject

protected void removeLayoutProxyObject(IltcCompositeGraphic graphic)
Description copied from class: IltcCompositeManager
Removes a composite object's proxy object from the IlvManager.

Overrides:
removeLayoutProxyObject in class IltcCompositeManager
Internal method or field: do not use!

applyToLayoutProxy

protected void applyToLayoutProxy(IltcCompositeGraphic graphic,
                                  IlvGraphic proxy,
                                  IlvApplyObject f,
                                  Object arg)
Applies a function f, with a proxy object temporarily removed from the manager.

Overrides:
applyToLayoutProxy in class IltcCompositeManager
Internal method or field: do not use!

mustUpdateAdjacentLinks

protected boolean mustUpdateAdjacentLinks(IltcCompositeGraphic node)
Internal method or field: do not use!

addInteractiveProxyObject

protected void addInteractiveProxyObject(IltcCompositeGraphic graphic)
Description copied from class: IltcCompositeManager
Adds a composite object's interactive proxy object to the IlvManager.

Overrides:
addInteractiveProxyObject in class IltcCompositeManager
Internal method or field: do not use!

removeInteractiveProxyObject

protected void removeInteractiveProxyObject(IltcCompositeGraphic graphic)
Description copied from class: IltcCompositeManager
Removes a composite object's interactive proxy object from the IlvManager.

Overrides:
removeInteractiveProxyObject in class IltcCompositeManager
Internal method or field: do not use!

addObject

protected void addObject(IltcCompositeGraphic graphic,
                         IltcLayer mlayer,
                         boolean temporary)
Adds a composite object to the manager.

Note: This does not call addNode() or addLink(). On the contrary, this function is called by addNode() and addLink(), and it calls nodeAdded() or linkAdded(), respectively.

Overrides:
addObject in class IltcCompositeManager
Internal method or field: do not use!

removeObject

protected void removeObject(IltcCompositeGraphic graphic,
                            boolean temporary)
Removes a composite object from the manager.

Note: This does not call removeNode() or removeLink(). On the contrary, this function is called by removeNode() and removeLink(), and it calls nodeRemoved() or linkRemoved(), respectively.

Overrides:
removeObject in class IltcCompositeManager
Internal method or field: do not use!

objectChanged

public void objectChanged(IltcCompositeGraphic object,
                          boolean mustLayout)
Description copied from class: IltcCompositeManager
This function is called when a composite object (present in the manager) is changed or moved.

Subclasses should override this method.

Overrides:
objectChanged in class IltcCompositeManager
Parameters:
object - the graphic object which has changed
mustLayout - whether the layout proxy's size has changed
Internal method or field: do not use!

nodeAdded

public void nodeAdded(IltcCompositeGraphic graphic)
This function is called when a node in the manager is added.

Subclasses should override this method.


nodeChanged

public void nodeChanged(IltcCompositeGraphic graphic,
                        boolean mustLayout)
This function is called when a node in the manager is changed or moved.

Subclasses should override this method.

Parameters:
graphic - the graphic object which has changed
mustLayout - whether the layout proxy's size has changed

nodeRemoved

public void nodeRemoved(IltcCompositeGraphic graphic)
This function is called when a node in the manager is removed.

Subclasses should override this method.


linkAdded

public void linkAdded(IltcCompositeGraphic graphic)
This function is called when a link in the manager is added.

Subclasses should override this method.


linkChanged

public void linkChanged(IltcCompositeGraphic graphic,
                        boolean mustLayout)
This function is called when a link in the manager is changed or moved.

Subclasses should override this method.

Parameters:
graphic - the graphic object which has changed
mustLayout - whether the layout proxy's shape and size have changed

linkRemoved

public void linkRemoved(IltcCompositeGraphic graphic)
This function is called when a link in the manager is removed.

Subclasses should override this method.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.