ilog.views
Class IlvGrapher

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.IlvManager
          extended by ilog.views.IlvGrapher
All Implemented Interfaces:
GraphicBagHierarchyEventReceiver, ManagerViewsHierarchyEventReceiver, IlvGraphicBag, IlvPersistentObject, ClipboardOwner, Transferable, Serializable
Direct Known Subclasses:
IltNetwork, IlvHyperGrapher

public class IlvGrapher
extends IlvManager

IlvGrapher is a subclass of IlvManager that uses graphic objects in the form of nodes and links to represent dynamic interconnected information. Application areas include network management, database visualization and knowledge engineering, circuit block diagrams, workflow and process diagrams, organizational charts.

Overview

A grapher is composed of nodes and links. A node is an instance of IlvGraphic or one of its subclasses; any graphic object can be used as a grapher node. A link is an instance of IlvLinkImage or one of its subclasses. Links are the visual representation of connections between nodes.

To add a node to a grapher, call addNode. Links are added by calling addLink. When a node is removed from a grapher, all the links connected to this node are removed.

A new link is connected to the default connection point of each node it is attached to. When the location of a node changes, the connection points of the links are recomputed automatically. For more information about connection points, see Connection Points.

Example

The following code example shows how to connect two nodes in a grapher with a link:

  IlvGraphic node1, node2;
  IlvGrapher grapher = new IlvGrapher();
  IlvLinkImage link;
  
  //Create new ellipse node and add it to the grapher.
  node1 = new IlvEllipse(new IlvRect(30,10,50,50), true, false);
  grapher.addNode(node1,false);
  
  //Add a new rectangular node to the grapher.
  node2 = new IlvRectangle(new IlvRect(220,80,50,50), false, true);
  grapher.addNode(node2, 2, true);
  
  //Link the two nodes and add them to a grapher.
  link = new IlvLinkImage(node1, node2, true);
  grapher.addLink(link,false);
  
  //Add the manager to different views.
  IlvManagerView view = new IlvManagerView(grapher);
  view.setBackground(Color.WHITE);
  
  JFrame frame = new JFrame("IlvLinkImage");
  frame.setLayout(new BorderLayout(2, 2));
  frame.getContentPane().add(view);
  frame.setSize(320,200);
  frame.setVisible(true);
 

The following image shows the grapher created between in the code example:

IlvLinkImage

Visibility

By default, nodes and links visibility is controlled independently. You can switch on or off the visibility of the nodes and links that compose a branch of a grapher by calling setVisibleBranch(IlvGraphic, int, boolean, boolean). For more information, see Visibility.

Nested Graphers

A grapher embedded inside another manager or grapher, is called a nested grapher. Like top level graphers, a nested grapher can be displayed in several different views simultaneously.

A nested grapher has two different representations:

Using nested graphers you can create applications that define graphs containing subgraphs, with links crossing the graph boundaries. Links that cross graph boundaries are called intergraph links. Call getInterGraphLinks() to retrieve the intergraph links stored in this grapher with an origin or destination node in another grapher. Call getExternalInterGraphLinks to retrieve the intergraph links stored in another grapher whose origin or destination node is stored in this grapher.

Events and Interactive Behavior

IlvGrapher is a subclass of IlvManager and inherits all the manager mechanisms for handling user events and supplying interactive behavior. For more information, see Handling Events and Setting Interactive User Information./

See Also:
IlvLinkImage, IlvLinkConnector, Serialized Form

Field Summary
 
Fields inherited from class ilog.views.IlvManager
HH_BLUR, HH_BRIGHTEN, HH_CUSTOM, HH_GRAYSCALE, HH_INVERT_COLORS, HH_NONE, HH_SHARPEN
 
Constructor Summary
IlvGrapher()
          Creates a new IlvGrapher.
IlvGrapher(IlvGrapher origin)
          Creates a new IlvGrapher by copying the specified one.
IlvGrapher(IlvInputStream stream)
          Reads the grapher from an IlvInputStream.
IlvGrapher(int numlayers)
          Creates a new IlvGrapher with a specified number of layers.
IlvGrapher(int numlayers, int maxInList)
          Creates a new IlvGrapher.
 
Method Summary
static void addInterGraphLink(IlvLinkImage link, boolean redraw)
          Adds an intergraph link.
 void addLink(IlvLinkImage obj, boolean redraw)
          Adds a link to this grapher.
 void addLink(IlvLinkImage obj, int layer, boolean redraw)
          Adds a link to this grapher in a specified layer.
 void addNode(IlvGraphic obj, boolean redraw)
          Adds a node to the grapher.
 void addNode(IlvGraphic obj, int layer, boolean redraw)
          Adds a node to the grapher in the specified layer.
 void addObject(IlvGraphic obj, int layer, boolean redraw)
          Adds the specified graphic object in the manager.
protected  void afterTransformDependentObjs(HashSet objs, boolean redraw, boolean ifneeded)
          Called from IlvManager.afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean).
protected  void afterTransformObj(IlvGraphic obj, boolean redraw, boolean ifneeded, boolean parent, boolean fireEvent)
          Called from IlvManager.afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean).
protected  void beforeTransformDependentObjs(HashSet objs, boolean redraw, boolean ifneeded)
          Called from IlvManager.afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean).
protected  void beforeTransformObj(IlvGraphic obj, boolean redraw, boolean ifneeded, boolean parent)
          Called from IlvManager.beforeTransform(ilog.views.IlvGraphic, boolean, boolean, boolean).
 IlvGraphic copy()
          Creates a new IlvGrapher by copying this grapher.
protected  HashSet getBoundingBoxDependentObjects(IlvGraphic obj, boolean includeExternals)
          Returns the dependent objects of this object.
 IlvGraphicEnumeration getExternalInterGraphLinks()
          Returns the intergraph links whose origin or destination node is stored in this grapher.
 int getExternalInterGraphLinksCount()
          Returns the number of intergraph links whose origin or destination node is stored in this grapher.
 IlvGraphicEnumeration getFromNeighbors(IlvGraphic node)
          Returns an enumeration of all nodes (IlvGraphic) that are the "from neighbors" of node.
 IlvGraphicEnumeration getInterGraphLinks()
          Returns the intergraph links stored in this grapher.
 int getInterGraphLinksCount()
          Returns the number of intergraph links stored in this grapher.
 IlvGraphicEnumeration getLinks(IlvGraphic node)
          Returns an enumeration of all the links going from/to a node.
 int getLinksCount(IlvGraphic node)
          Returns the number of links going from/to a node.
 IlvGraphicEnumeration getLinksFrom(IlvGraphic node)
          Returns an enumeration of all the links originating from a node.
 int getLinksFromCount(IlvGraphic node)
          Returns the number of links originating from a node.
 int getLinksInsertionLayer()
          Returns the index of the layer where links are inserted when addLink(IlvLinkImage, boolean) is called.
 IlvGraphicEnumeration getLinksTo(IlvGraphic node)
          Returns an enumeration of all the links going to a node.
 int getLinksToCount(IlvGraphic node)
          Returns the number of links going to a node.
 IlvGraphicEnumeration getLinksVisibleFrom(IlvGraphic node)
          Returns an enumeration of all the links that have the input node as visible origin node.
 int getLinksVisibleFromCount(IlvGraphic node)
          Returns the number of links that have the input node as visible origin node.
 IlvGraphicEnumeration getLinksVisibleTo(IlvGraphic node)
          Returns an enumeration of all the links that have the input node as visible destination node.
 int getLinksVisibleToCount(IlvGraphic node)
          Returns an enumeration of all the links that have the input node as visible destination node.
static IlvGrapher getLowestCommonGrapher(IlvGraphic obja, IlvGraphic objb)
          Returns the lowest common grapher of two graphic objects or null if the two objects do not have a common ancestor.
 IlvGraphicEnumeration getNeighbors(IlvGraphic node)
          Returns an enumeration of all nodes (IlvGraphic) that are the "neighbors" of node.
 IlvGraphicEnumeration getSelectedMovingObjects(boolean[] flags)
          Returns the selected objects that should be moved by the select interactor.
 IlvGraphicEnumeration getToNeighbors(IlvGraphic node)
          Returns an enumeration of all nodes (IlvGraphic) that are the "to neighbors" of node.
 IlvGraphicEnumeration getTreeExternalInterGraphLinks()
          Returns an enumeration of the nesting tree external intergraph links for this grapher.
 int getTreeExternalInterGraphLinksCount()
          Returns the number of nesting tree external intergraph links for this grapher.
 boolean isInterGraphLink(IlvGraphic obj)
          Returns true if the object is a link contained in this IlvGrapher and if the link is an intergraph link.
 boolean isLink(IlvGraphic obj)
          Returns true if the object is a link contained in this IlvGrapher.
 boolean isLinkBetween(IlvGraphic node1, IlvGraphic node2)
          Tests whether a link exists between two nodes.
 boolean isMarked(IlvGraphic obj)
          Returns true if the object is marked.
 boolean isNode(IlvGraphic obj)
          Returns true if the object is a node contained in this IlvGrapher.
 boolean isNodeOrLink(IlvGraphic obj)
          Returns true if the object is a node or a link.
 void makeNode(IlvGraphic obj)
          Allows a graphic object to become a node of the grapher.
protected  IlvObjectProperty makeObjectProperty(IlvGraphic obj)
          Creates the object property for the input object.
 boolean nodeHasSons(IlvGraphic node)
          Returns true if there are links from the specified node to other nodes.
 void removeLink(IlvLinkImage link, boolean redraw)
          Removes a link from the grapher.
 void removeNode(IlvGraphic node, boolean redraw)
          Removes a node from the grapher.
 void removeObject(IlvGraphic obj, boolean redraw)
          Removes an object from the grapher.
 void replaceObject(IlvGraphic oldObject, IlvGraphic newObject, boolean redraw)
          This method overrides the replaceObject method of IlvManager to take node and link properties into account.
 void setLinksInsertionLayer(int layer)
          Sets the index of the layer where links are inserted when addLink(IlvLinkImage, boolean) is called.
 void setMarked(IlvGraphic obj, boolean value)
          Marks or unmarks an object.
 void setVisibleBranch(IlvGraphic node, boolean visible, boolean origin)
          Shows or hides a branch that originates from or has as destination the input node.
 void setVisibleBranch(IlvGraphic node, int level, boolean visible, boolean origin)
          Shows or hides a branch that originates from or has as destination the input node, starting at level levels away from node.
 void unmakeNode(IlvGraphic obj)
          Allows a graphic object that was added as a node to become a regular object.
 
Methods inherited from class ilog.views.IlvManager
abortReDraws, addAccelerator, addGraphicBagHierarchyListener, addLayer, addLayer, addManagerContentChangedListener, addManagerExpansionListener, addManagerLayerListener, addManagerSelectionListener, addManagerTreeContentChangedListener, addManagerTreeSelectionListener, addManagerViewsHierarchyListener, addManagerViewsListener, addObject, afterInvalidateRegion, afterTransform, allowMoving, applyToObject, applyToObjects, applyToObjects, applyToObjects, applyToObjects, applyTransform, beforeInvalidateRegion, beforeTransform, boundingBox, check, computeBBox, computeBBox, contains, containsFrame, contentsChanged, copySelection, createInputStream, createManagerLayer, createOutputStream, deleteAll, deleteAll, deleteSelections, deleteSelections, deSelectAll, deSelectAll, deSelectAll, dispatchToObjects, draw, draw, duplicateSelections, duplicateSelections, enableGraphicBagHierarchyEventForwarding, enableManagerViewsHierarchyEventForwarding, fireGraphicBagHierarchyEvent, fireManagerViewsHierarchyEvent, getAccelerators, getAllObjects, getAllObjects, getCardinal, getCardinal, getCardinal, getCollapsedGraphic, getDrawingTransformer, getFileName, getFrame, getHoverHighlightingImageOperation, getHoverHighlightingMode, getInsertionLayer, getIntersectionWithOutline, getLayer, getLayer, getLayerName, getLayersCount, getManagerLayer, getManagerLayer, getManagerLayer, getManagers, getManagers, getManagersCount, getManagersCount, getObject, getObject, getObject, getObject, getObjectInteractor, getObjectName, getObjectProperty, getObjects, getObjects, getObjects, getOptimizedLayerThreshold, getParent, getProperty, getSelectedObjects, getSelectedObjects, getSelectedObjectsCount, getSelectedObjectsCount, getSelection, getSelection, getSelection, getSelectionFactory, getSelections, getSizeLimitToDrawSubmanagerContents, getStreamFactory, getTopLevelTransformer, getTransformer, getTreeLock, getUserData, getViews, handleAccelerators, hasProperty, init, initReDraws, invalidateRegion, invalidateRegion, invalidateRegion, isCollapsed, isContentsAdjusting, isEditable, isInvalidating, isKeepingAspectRatio, isManaged, isMovable, isSelectable, isSelectable, isSelected, isSelectionAdjusting, isVisible, isVisible, isVisible, isVisible, lostOwnership, map, map, mapInside, mapInside, mapIntersects, mapIntersects, moveObject, moveResize, needsDrawSubmanagerContents, needsGraphicBagHierarchyEvent, needsManagerViewsHierarchyEvent, objectIsSelectable, objectRemoved, pasteSelection, print, processEvent, processEvent, processHoverHighlightingEvent, read, read, read, reDraw, reDrawObj, reDrawRegion, reDrawViews, removeAccelerator, removeGraphicBagHierarchyListener, removeLayer, removeManagerContentChangedListener, removeManagerExpansionListener, removeManagerLayerListener, removeManagerSelectionListener, removeManagerTreeContentChangedListener, removeManagerTreeSelectionListener, removeManagerViewsHierarchyListener, removeManagerViewsListener, removeProperty, replaceProperty, reshapeObject, selectAll, selectAll, selectAll, selectionChanged, setAccelerators, setCollapsed, setCollapsedGraphic, setContentsAdjusting, setContentsAdjusting, setEditable, setFileName, setFrame, setGraphicBag, setHoverHighlightingImageOperation, setHoverHighlightingMode, setInsertionLayer, setKeepingAspectRatio, setLayer, setLayerName, setMovable, setNameImpl, setNumberOfLayer, setObjectInteractor, setObjectName, setOptimizedLayerThreshold, setProperty, setSelectable, setSelectable, setSelected, setSelected, setSelectionAdjusting, setSelectionEventSource, setSelectionFactory, setSizeLimitToDrawSubmanagerContents, setStreamFactory, setTransformer, setUserData, setVisible, setVisible, setVisible, shortCut, swapLayers, translateObjects, translateSelections, viewAdded, viewRemoved, write, write, write, write, write, writeIt, zoomable
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, makeSelection, move, move, notifyObjectInteractorToManager, processActionEvent, removeActionListener, removeNamedProperty, removeNamedPropertyListener, resize, rotate, scale, setBackground, setEditable, setFillOn, setForeground, setInApplyToObject, setMovable, setName, setNamedProperty, setObjectInteractor, setPopupMenu, setPopupMenuName, setSelectable, setStrokeOn, setToolTipText, setVisible, toString, translate
 
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

IlvGrapher

public IlvGrapher()
Creates a new IlvGrapher. By default the grapher has 2 layers.


IlvGrapher

public IlvGrapher(int numlayers)
Creates a new IlvGrapher with a specified number of layers.

Parameters:
numlayers - The number of layers.

IlvGrapher

public IlvGrapher(int numlayers,
                  int maxInList)
Creates a new IlvGrapher.

Parameters:
numlayers - The number of layers.
maxInList - The number of objects before using the quadtree.

IlvGrapher

public IlvGrapher(IlvInputStream stream)
           throws IOException,
                  IlvReadFileException
Reads the grapher from an IlvInputStream. You should not call this method directly. To read an IVL formatted file, use the setFileName or read methods of the superclass. This method is used only to read a grapher used as a graphic object inside another manager.

Throws:
IOException
IlvReadFileException
Since:
JViews 5.0

IlvGrapher

public IlvGrapher(IlvGrapher origin)
Creates a new IlvGrapher by copying the specified one.

Parameters:
origin - The grapher to copy.
Since:
JViews 5.0
See Also:
copy()
Method Detail

copy

public IlvGraphic copy()
Creates a new IlvGrapher by copying this grapher.

Overrides:
copy in class IlvManager
Returns:
A new IlvGrapher instance.
Since:
JViews 5.0
See Also:
IlvGraphic

addObject

public void addObject(IlvGraphic obj,
                      int layer,
                      boolean redraw)
Adds the specified graphic object in the manager. Note that a graphic object can be added to one manager only.
When an object is added, the manager fires a ManagerContentChangedEvent event.

Overrides:
addObject in class IlvManager
Parameters:
obj - The object to be added.
layer - The layer where the object should be inserted. Note that if the manager does not have a layer that corresponds to this index, the manager automatically increases the number of layers by calling setNumberOfLayer.
redraw - If true, the object is redrawn.
See Also:
IlvManager.addObject(ilog.views.IlvGraphic, boolean), removeObject(ilog.views.IlvGraphic, boolean), IlvManager.setNumberOfLayer(int)

addNode

public void addNode(IlvGraphic obj,
                    boolean redraw)
Adds a node to the grapher. The node is added in the node insertion layer.

Parameters:
obj - The node.
redraw - If true, the object is drawn.
See Also:
addNode(ilog.views.IlvGraphic, int, boolean), removeNode(ilog.views.IlvGraphic, boolean), IlvManager.getInsertionLayer()

addNode

public void addNode(IlvGraphic obj,
                    int layer,
                    boolean redraw)
Adds a node to the grapher in the specified layer.

Parameters:
obj - The node.
layer - The index of the layer where the node is to be added.
redraw - If true, the object is drawn.
See Also:
addNode(ilog.views.IlvGraphic, boolean), removeNode(ilog.views.IlvGraphic, boolean)

addLink

public void addLink(IlvLinkImage obj,
                    boolean redraw)
Adds a link to this grapher. The link is added in the links insertion layer.

Note: Before adding a link, the origin and destination nodes for the link must already exist. These nodes must be contained either in this IlvGrapher instance or one of its subgraphs. They must have been added using the addNode(ilog.views.IlvGraphic, boolean) method.

Parameters:
obj - The link.
redraw - If true, the object is drawn.
See Also:
getLinksInsertionLayer(), addLink(ilog.views.IlvLinkImage, int, boolean), removeLink(ilog.views.IlvLinkImage, boolean), addInterGraphLink(ilog.views.IlvLinkImage, boolean)

addLink

public void addLink(IlvLinkImage obj,
                    int layer,
                    boolean redraw)
Adds a link to this grapher in a specified layer.

Note: Before adding a link, the origin and destination nodes for the link must already exist. These nodes must be contained either in this IlvGrapher instance or one of its subgraphs. They must have been added using the addNode(ilog.views.IlvGraphic, boolean) method.

Parameters:
obj - The link.
layer - The index of the layer where the node is added.
redraw - If true, the object is drawn.
See Also:
addLink(ilog.views.IlvLinkImage, boolean), removeLink(ilog.views.IlvLinkImage, boolean), addInterGraphLink(ilog.views.IlvLinkImage, boolean)

getExternalInterGraphLinks

public final IlvGraphicEnumeration getExternalInterGraphLinks()
Returns the intergraph links whose origin or destination node is stored in this grapher. The link itself is not stored in this grapher.

Since:
JViews 5.0
See Also:
addInterGraphLink(ilog.views.IlvLinkImage, boolean), getExternalInterGraphLinksCount()

getExternalInterGraphLinksCount

public final int getExternalInterGraphLinksCount()
Returns the number of intergraph links whose origin or destination node is stored in this grapher. The link itself is not stored in this grapher.

Since:
JViews 5.0
See Also:
getExternalInterGraphLinks()

getTreeExternalInterGraphLinks

public final IlvGraphicEnumeration getTreeExternalInterGraphLinks()
Returns an enumeration of the nesting tree external intergraph links for this grapher.

Each link in the enumeration has one node inside and one node outside the grapher nesting tree. That is, the inside node is in this grapher or in a subgrapher nested within this grapher, and the outside node is neither in this grapher nor any nested subgraphers. The link is not stored in this grapher.

Since:
JViews 7.5
See Also:
addInterGraphLink(ilog.views.IlvLinkImage, boolean), getTreeExternalInterGraphLinksCount()

getTreeExternalInterGraphLinksCount

public final int getTreeExternalInterGraphLinksCount()
Returns the number of nesting tree external intergraph links for this grapher.

Each link counted has one node inside and one node outside the grapher nesting tree. That is, the inside node is in this grapher or in a subgrapher nested within this grapher, and the outside node is neither in this grapher nor any nested subgraphers. The link is not stored in this grapher.

Since:
JViews 7.5
See Also:
addInterGraphLink(ilog.views.IlvLinkImage, boolean), getTreeExternalInterGraphLinks()

getInterGraphLinks

public final IlvGraphicEnumeration getInterGraphLinks()
Returns the intergraph links stored in this grapher. An intergraph link has its origin or destination node stored in another grapher.

Since:
JViews 5.0
See Also:
getInterGraphLinksCount(), isInterGraphLink(ilog.views.IlvGraphic), addInterGraphLink(ilog.views.IlvLinkImage, boolean)

getInterGraphLinksCount

public final int getInterGraphLinksCount()
Returns the number of intergraph links stored in this grapher. An intergraph link has its origin or destination node stored in another grapher.

Since:
JViews 5.0
See Also:
getInterGraphLinks(), isInterGraphLink(ilog.views.IlvGraphic), addInterGraphLink(ilog.views.IlvLinkImage, boolean)

addInterGraphLink

public static void addInterGraphLink(IlvLinkImage link,
                                     boolean redraw)
Adds an intergraph link. This method allows you to add a link in a grapher when the origin and destination nodes of the link are not in the same grapher. This methods adds the specified link in the lowest common grapher of the grapher hierarchy of the destination and origin nodes of the link.

Parameters:
link - The link to add.
redraw - If true, the link will be drawn.
Since:
JViews 5.0
See Also:
getLowestCommonGrapher(ilog.views.IlvGraphic, ilog.views.IlvGraphic), getExternalInterGraphLinks(), addLink(ilog.views.IlvLinkImage, boolean), isInterGraphLink(ilog.views.IlvGraphic)

getLowestCommonGrapher

public static IlvGrapher getLowestCommonGrapher(IlvGraphic obja,
                                                IlvGraphic objb)
Returns the lowest common grapher of two graphic objects or null if the two objects do not have a common ancestor.

Parameters:
obja - The first graphic object.
objb - The second graphic object.
Since:
JViews 5.0
See Also:
IlvManager.getParent()

removeObject

public void removeObject(IlvGraphic obj,
                         boolean redraw)
Removes an object from the grapher. This method calls removeNode if the object is a node and removeLink if the object is a link.

Note: It is not allowed to remove graphic objects while browsing the enumeration returned by the methods IlvManager.getObjects(), IlvManager.getObjects(int), getLinksFrom(ilog.views.IlvGraphic), getLinksTo(ilog.views.IlvGraphic), getLinks(ilog.views.IlvGraphic), and getNeighbors(ilog.views.IlvGraphic).

Specified by:
removeObject in interface IlvGraphicBag
Overrides:
removeObject in class IlvManager
Parameters:
obj - The graphic object to remove.
redraw - If true, the area where the object was located is redrawn.
See Also:
removeNode(ilog.views.IlvGraphic, boolean), removeLink(ilog.views.IlvLinkImage, boolean)

removeLink

public void removeLink(IlvLinkImage link,
                       boolean redraw)
Removes a link from the grapher.

Note: It is not allowed to remove links while browsing the enumeration returned by the methods IlvManager.getObjects(), IlvManager.getObjects(int), getLinksFrom(ilog.views.IlvGraphic), getLinksTo(ilog.views.IlvGraphic), and getLinks(ilog.views.IlvGraphic).

Parameters:
link - The link to remove.
redraw - If true, the area where the link was located is redrawn
See Also:
addLink(ilog.views.IlvLinkImage, boolean), addLink(ilog.views.IlvLinkImage, int, boolean)

removeNode

public void removeNode(IlvGraphic node,
                       boolean redraw)
Removes a node from the grapher. All links from and to this node are also removed.

Note: It is not allowed to remove graphic objects while browsing the enumeration returned by the methods IlvManager.getObjects(), IlvManager.getObjects(int), and getNeighbors(ilog.views.IlvGraphic).

Parameters:
node - The node to remove.
redraw - If true, the area where the node was located is redrawn.
See Also:
addNode(ilog.views.IlvGraphic, int, boolean), addNode(ilog.views.IlvGraphic, boolean)

getLinksInsertionLayer

public final int getLinksInsertionLayer()
Returns the index of the layer where links are inserted when addLink(IlvLinkImage, boolean) is called. If setLinksInsertionLayer(int) has never been called or was set to -1, this method returns the same value as IlvManager.getInsertionLayer().

Returns:
The default link insertion layer.
Since:
JViews 6.5
See Also:
setLinksInsertionLayer(int), addLink(ilog.views.IlvLinkImage,boolean), IlvManager.setInsertionLayer(int)

setLinksInsertionLayer

public final void setLinksInsertionLayer(int layer)
Sets the index of the layer where links are inserted when addLink(IlvLinkImage, boolean) is called. If layer is set to -1, the result of IlvManager.getInsertionLayer() is used when inserting links.

Parameters:
layer - The insertion layer.
Since:
JViews 6.5
See Also:
getLinksInsertionLayer(), addLink(ilog.views.IlvLinkImage,boolean), IlvManager.getInsertionLayer()

replaceObject

public void replaceObject(IlvGraphic oldObject,
                          IlvGraphic newObject,
                          boolean redraw)
This method overrides the replaceObject method of IlvManager to take node and link properties into account. The replaced node will keep the IlvLinkConnector of the previous node. The replaced link will keep the to and the from node of the previous link.

Overrides:
replaceObject in class IlvManager
Parameters:
oldObject - The old object.
newObject - The new object.
redraw - If true, the objects are redrawn.

getLinksFrom

public final IlvGraphicEnumeration getLinksFrom(IlvGraphic node)
Returns an enumeration of all the links originating from a node.

Parameters:
node - The node.
See Also:
getLinksFromCount(ilog.views.IlvGraphic), getLinksTo(ilog.views.IlvGraphic)

getLinksFromCount

public final int getLinksFromCount(IlvGraphic node)
Returns the number of links originating from a node.

Parameters:
node - The node.
See Also:
getLinksFrom(ilog.views.IlvGraphic)

getLinksTo

public final IlvGraphicEnumeration getLinksTo(IlvGraphic node)
Returns an enumeration of all the links going to a node. The method returns null if there are no links.

Parameters:
node - The node.
See Also:
getLinksToCount(ilog.views.IlvGraphic), getLinksFrom(ilog.views.IlvGraphic)

getLinksToCount

public final int getLinksToCount(IlvGraphic node)
Returns the number of links going to a node.

Parameters:
node - The node.
See Also:
getLinksTo(ilog.views.IlvGraphic)

getLinks

public final IlvGraphicEnumeration getLinks(IlvGraphic node)
Returns an enumeration of all the links going from/to a node.

Parameters:
node - The node.
See Also:
getLinksCount(ilog.views.IlvGraphic), getLinksTo(ilog.views.IlvGraphic), getLinksFrom(ilog.views.IlvGraphic)

getLinksCount

public final int getLinksCount(IlvGraphic node)
Returns the number of links going from/to a node.

Parameters:
node - The node.
See Also:
getLinks(ilog.views.IlvGraphic), getLinksToCount(ilog.views.IlvGraphic), getLinksFromCount(ilog.views.IlvGraphic)

getNeighbors

public final IlvGraphicEnumeration getNeighbors(IlvGraphic node)
Returns an enumeration of all nodes (IlvGraphic) that are the "neighbors" of node. That is, the nodes that have a common link (IlvLinkImage) with node.

Note: The same "neighbor" node will be returned by the method nextElement an equal number of times to the number of links between node and this neighbor.

See Also:
getFromNeighbors(IlvGraphic), getToNeighbors(IlvGraphic)

getFromNeighbors

public final IlvGraphicEnumeration getFromNeighbors(IlvGraphic node)
Returns an enumeration of all nodes (IlvGraphic) that are the "from neighbors" of node. That is, the nodes that have a common link (IlvLinkImage) with node, where node is the origin of the link.

Note: The same "neighbor" node is returned by the method nextElement an equal number of times to the number of links between node and this neighbor that has the appropriate orientation.

Since:
JViews 8.0
See Also:
getNeighbors(IlvGraphic), getToNeighbors(IlvGraphic)

getToNeighbors

public final IlvGraphicEnumeration getToNeighbors(IlvGraphic node)
Returns an enumeration of all nodes (IlvGraphic) that are the "to neighbors" of node. That is, the nodes that have a common link (IlvLinkImage) with node, where node is the destination of the link.

Note: The same "neighbor" node is returned by the method nextElement an equal number of times to the number of links between node and this neighbor that has the appropriate orientation.

Since:
JViews 8.0
See Also:
getNeighbors(IlvGraphic), getFromNeighbors(IlvGraphic)

getLinksVisibleFrom

public final IlvGraphicEnumeration getLinksVisibleFrom(IlvGraphic node)
Returns an enumeration of all the links that have the input node as visible origin node. This means, link.getVisibleFrom() == node.

Some links on the screen appear to be connected to the input origin node when the input node is a collapsed grapher. In reality, the connection is not to the collapsed grapher but to a node currently invisible nested inside the collapsed grapher. Hence, this method returns all links that are really connected to the origin node, and additionally all links that appear visually connected to this origin node if it is a collapsed grapher.

To be precise: this method returns all non-intergraph links starting from the input origin node. Furthermore it returns all intergraph links starting from the input origin node that don't go beyond the border of any collapsed grapher. Furthermore, if the input node is a collapsed grapher, it returns all tree external intergraph links of the collapsed grapher that don't go beyond the border of any other collapsed grapher. Going beyond the border of a collapsed grapher means that the node is recursively nested in subgraphers, one of these subgraphers is collapsed and the destination node of the link is not nested inside, hence outside the collapsed grapher.

Parameters:
node - The origin node.
Since:
JViews 7.5
See Also:
getLinksVisibleFromCount(ilog.views.IlvGraphic), getLinksFrom(ilog.views.IlvGraphic), isInterGraphLink(ilog.views.IlvGraphic), getTreeExternalInterGraphLinks(), IlvLinkImage.getVisibleFrom()

getLinksVisibleFromCount

public final int getLinksVisibleFromCount(IlvGraphic node)
Returns the number of links that have the input node as visible origin node. This means, link.getVisibleFrom() == node.

Parameters:
node - The origin node.
Since:
JViews 7.5
See Also:
getLinksVisibleFrom(ilog.views.IlvGraphic), IlvLinkImage.getVisibleFrom()

getLinksVisibleTo

public final IlvGraphicEnumeration getLinksVisibleTo(IlvGraphic node)
Returns an enumeration of all the links that have the input node as visible destination node. This means, link.getVisibleTo() == node.

Some links on the screen appear to be connected to the input destination node when the input node is a collapsed grapher. In reality, the connection is not to the collapsed grapher but to a node currently invisible nested inside the collapsed grapher. Hence, this method returns all links that are really connected to the destination node, and additionally all links that appear visually connected to this destination node if it is a collapsed grapher.

To be precise: this method returns all non-intergraph links ending at the input destination node. Furthermore it returns all intergraph links ending at the input destination node that don't go beyond the border of any collapsed grapher. Furthermore, if the input node is a collapsed grapher, it returns all tree external intergraph links of the collapsed grapher that don't go beyond the border of any other collapsed grapher. Going beyond the border of a collapsed grapher means that the node is recursively nested in subgraphers, one of these subgraphers is collapsed and the origin node of the link is not nested inside, hence outside the collapsed grapher.

Parameters:
node - The destination node.
Since:
JViews 7.5
See Also:
getLinksVisibleToCount(ilog.views.IlvGraphic), getLinksTo(ilog.views.IlvGraphic), isInterGraphLink(ilog.views.IlvGraphic), getTreeExternalInterGraphLinks(), IlvLinkImage.getVisibleTo()

getLinksVisibleToCount

public final int getLinksVisibleToCount(IlvGraphic node)
Returns an enumeration of all the links that have the input node as visible destination node. This means, link.getVisibleTo() == node.

Parameters:
node - The destination node.
Since:
JViews 7.5
See Also:
getLinksVisibleTo(ilog.views.IlvGraphic), IlvLinkImage.getVisibleTo()

isNode

public final boolean isNode(IlvGraphic obj)
Returns true if the object is a node contained in this IlvGrapher.

Parameters:
obj - The graphic object to test.
See Also:
isLink(ilog.views.IlvGraphic), isNodeOrLink(ilog.views.IlvGraphic)

isLink

public final boolean isLink(IlvGraphic obj)
Returns true if the object is a link contained in this IlvGrapher.

Parameters:
obj - The graphic object to test.
See Also:
isInterGraphLink(ilog.views.IlvGraphic), isNode(ilog.views.IlvGraphic), isNodeOrLink(ilog.views.IlvGraphic)

isNodeOrLink

public final boolean isNodeOrLink(IlvGraphic obj)
Returns true if the object is a node or a link.

Parameters:
obj - The graphic object to test.
Since:
JViews 3.0
See Also:
isNode(ilog.views.IlvGraphic), isLink(ilog.views.IlvGraphic)

isInterGraphLink

public final boolean isInterGraphLink(IlvGraphic obj)
Returns true if the object is a link contained in this IlvGrapher and if the link is an intergraph link. A link is an intergraph link if the origin or destination node is not in this grapher.

Parameters:
obj - The graphic object to test.
Since:
JViews 5.0
See Also:
isLink(ilog.views.IlvGraphic), isNode(ilog.views.IlvGraphic), isNodeOrLink(ilog.views.IlvGraphic), addInterGraphLink(ilog.views.IlvLinkImage, boolean), getInterGraphLinks(), getInterGraphLinksCount()

setMarked

public final void setMarked(IlvGraphic obj,
                            boolean value)
Marks or unmarks an object.

Parameters:
obj - The object.
value - Set to true to mark the object, false otherwise.
See Also:
isMarked(ilog.views.IlvGraphic)

isMarked

public final boolean isMarked(IlvGraphic obj)
Returns true if the object is marked.

Parameters:
obj - The object.
See Also:
setMarked(ilog.views.IlvGraphic, boolean)

makeObjectProperty

protected IlvObjectProperty makeObjectProperty(IlvGraphic obj)
Creates the object property for the input object. This method is part of JViews internals. You should not use it.

Overrides:
makeObjectProperty in class IlvManager
Since:
JViews 8.0

getBoundingBoxDependentObjects

protected HashSet getBoundingBoxDependentObjects(IlvGraphic obj,
                                                 boolean includeExternals)
Returns the dependent objects of this object. The dependent objects may change their bounding box if the input object changes its bounding box.

The default implementation returns the links that may move when the input object is a moving node.

Parameters:
obj - The object that changes its bounding box.
includeExternals - If true and the input object is a grapher, include the external intergraph links to the depending objects.
Returns:
The objects whose bounding box depends on the bounding box of the input object. May be null if there are no dependent objects.
Since:
JViews 8.0

beforeTransformObj

protected void beforeTransformObj(IlvGraphic obj,
                                  boolean redraw,
                                  boolean ifneeded,
                                  boolean parent)
Called from IlvManager.beforeTransform(ilog.views.IlvGraphic, boolean, boolean, boolean). This method is part of JViews internals. You should not use it.

Overrides:
beforeTransformObj in class IlvManager
Since:
JViews 8.0

afterTransformObj

protected void afterTransformObj(IlvGraphic obj,
                                 boolean redraw,
                                 boolean ifneeded,
                                 boolean parent,
                                 boolean fireEvent)
Called from IlvManager.afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean). This method is part of JViews internals. You should not use it.

Overrides:
afterTransformObj in class IlvManager
Since:
JViews 8.0

beforeTransformDependentObjs

protected void beforeTransformDependentObjs(HashSet objs,
                                            boolean redraw,
                                            boolean ifneeded)
Called from IlvManager.afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean). This method is part of JViews internals. You should not use it.

Since:
JViews 8.0