ilog.views.hypergraph
Class IlvHyperGrapher

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

public class IlvHyperGrapher
extends IlvGrapher

IlvHyperGrapher is a grapher that displays nodes and hyperedges. Nodes can be any type of graphic objects. Normal edges of type IlvLinkImage are supported. Additionally, hyperedges of of type IlvHyperEdge are supported.
A graphic object will become a node of a graph if it is added in the hypergrapher using the addNode method. A link of type IlvLinkImage must be added using the addLink method. A hyperedge must be added using the addHyperEdge method. When removing a node from the hypergrapher, all the links that come from and go to this node will be removed, and all hyperedges that come from and go to this node will loose the node as end point. The hyperedges remain in the grapher as long as they have the desired minimum number of end points (see getMinHyperEdgeEndCount()), otherwise they are automatically removed when their end node is removed.
When changing the location of a node, the connection points of the hyperedges will be recomputed automatically.

Since:
JViews 8.0
See Also:
IlvHyperEdge, 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
IlvHyperGrapher()
          Creates a new IlvHyperGrapher.
IlvHyperGrapher(IlvHyperGrapher origin)
          Creates a new IlvHyperGrapher by copying the specified one.
IlvHyperGrapher(IlvInputStream stream)
          Reads the hypergrapher from an IlvInputStream.
IlvHyperGrapher(int numlayers)
          Creates a new IlvHyperGrapher with a specified number of layers.
IlvHyperGrapher(int numlayers, int maxInList)
          Creates a new IlvHyperGrapher.
 
Method Summary
 void addHyperEdge(IlvHyperEdge obj, boolean redraw)
          Adds a hyperedge to this hypergrapher.
 void addHyperEdge(IlvHyperEdge obj, int layer, boolean redraw)
          Adds a hyperedge to this hypergrapher in a specified layer.
static void addInterGraphHyperEdge(IlvHyperEdge edge, boolean redraw)
          Adds an intergraph hyperedge.
static void addInterGraphHyperEdge(IlvHyperEdge edge, int layer, boolean redraw)
          Adds an intergraph hyperedge.
 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 hypergrapher.
protected  void afterHyperEdgeEndsChanged(Iterator hyperedges)
          This method is eventually called after the ends of some hyperedges that belong to this grapher have changed.
protected  boolean afterInvalidateRegion(IlvGraphic object, IlvRect objectBBox, IlvManagerView view, IlvTransformer t, Object info)
          Returns true if the region of the object must be invalidated.
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).
 boolean allowMoving(IlvGraphic obj)
          Returns true if the object can be moved with the selection interactor (IlvSelectInteractor).
protected  Object beforeInvalidateRegion(IlvGraphic object, IlvManagerView view, IlvTransformer t)
          Calculates the info necessary to decide whether the region of the object must be invalidated.
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 IlvHyperGrapher by copying this hypergrapher.
 void copySelection()
          Copies the selected graphic objects to the clipboard.
 void deleteSelections(boolean traverse, boolean redraw)
          Removes the selected objects.
 void disconnectHyperEdge(IlvGraphic node, IlvHyperEdge edge, boolean fromSide, boolean toSide, boolean redraw)
          Disconnects the input hyperedge from the input node.
 void disconnectHyperEdgesFrom(IlvGraphic node, boolean redraw)
          Disconnects all outgoing hyperedges from the input node.
 void disconnectHyperEdgesTo(IlvGraphic node, boolean redraw)
          Disconnects all incoming hyperedges from the input node.
 void duplicateSelections(int dx, int dy)
          Duplicates the selected objects.
protected  HashSet getBoundingBoxDependentObjects(IlvGraphic obj, boolean includeExternals)
          Returns the dependent objects of this object.
 IlvGraphicEnumeration getExternalInterGraphHyperEdges()
          Returns the intergraph hyperedges that have any end node stored in this hypergrapher.
 int getExternalInterGraphHyperEdgesCount()
          Returns the number of intergraph hyperedges that have any end node stored in this hypergrapher.
 Iterator getHyperEdgeEndsFrom(IlvGraphic node)
          Returns an the ends of hyperedges that have the input node as source.
 int getHyperEdgeEndsFromCount(IlvGraphic node)
          Returns the number of ends of hyperedges that have the input node as source.
 Iterator getHyperEdgeEndsTo(IlvGraphic node)
          Returns an the ends of hyperedges that have the input node as target.
 int getHyperEdgeEndsToCount(IlvGraphic node)
          Returns the number of ends of hyperedges that have the input node as target.
 IlvGraphicEnumeration getHyperEdges()
          Returns the regular hyperedges stored in this hypergrapher.
 int getHyperEdgesCount()
          Returns the number of regular hyperedges stored in this hypergrapher.
 IlvGraphicEnumeration getHyperEdgesFrom(IlvGraphic node)
          Returns an enumeration of all the hyperedges that have the input node as source.
 int getHyperEdgesFromCount(IlvGraphic node)
          Returns the number of hyperedges that have the input node as source.
 IlvGraphicEnumeration getHyperEdgesTo(IlvGraphic node)
          Returns an enumeration of all the hyperedges that have the input node as target.
 int getHyperEdgesToCount(IlvGraphic node)
          Returns the number of hyperedges that have the input node as target.
 IlvGraphicEnumeration getHyperEdgesVisibleFrom(IlvGraphic node)
          Returns an enumeration of all the hyperedges that have the input node as visible origin node.
 int getHyperEdgesVisibleFromCount(IlvGraphic node)
          Returns the number of hyperedges that have the input node as visible origin node.
 IlvGraphicEnumeration getHyperEdgesVisibleTo(IlvGraphic node)
          Returns an enumeration of all the hyperedges that have the input node as visible destination node.
 int getHyperEdgesVisibleToCount(IlvGraphic node)
          Returns the number of hyperedges that have the input node as visible destination node.
 IlvGraphicEnumeration getHyperGraphFromNeighbors(IlvGraphic node)
          Returns an enumeration of all nodes (IlvGraphic) that are the hyperedge "from neighbors" of node.
 IlvGraphicEnumeration getHyperGraphNeighbors(IlvGraphic node)
          Returns an enumeration of all nodes (IlvGraphic) that are the hyperedge "neighbors" of node.
 IlvGraphicEnumeration getHyperGraphToNeighbors(IlvGraphic node)
          Returns an enumeration of all nodes (IlvGraphic) that are the hyperedge "to neighbors" of node.
 IlvGraphicEnumeration getInterGraphHyperEdges()
          Returns the intergraph hyperedges stored in this hypergrapher.
 int getInterGraphHyperEdgesCount()
          Returns the number of intergraph hyperedges stored in this hypergrapher.
static IlvHyperGrapher getLowestCommonHyperGrapher(IlvHyperEdge obj)
          Returns the lowest common grapher of all end nodes of the hyperedge.
static IlvHyperGrapher getLowestCommonHyperGrapher(Iterator iter)
          Returns the lowest common hyper grapher of a set of nodes.
 int getMinHyperEdgeEndCount()
          Returns the minimum number of end point a hyperedge should have.
 IlvGraphicEnumeration getSelectedMovingObjects(boolean[] flags)
          Returns the selected objects that should be moved by the select interactor
 IlvGraphicEnumeration getTreeExternalInterGraphHyperEdges()
          Returns an enumeration of the nesting tree external intergraph hyperegdes for this grapher.
 int getTreeExternalInterGraphHyperEdgesCount()
          Returns the number of nesting tree external intergraph hyperedges for this grapher.
 boolean isHyperEdge(IlvGraphic obj)
          Returns true if the object is a hyperedge contained in this IlvGrapher.
 boolean isWaitingForAdjustmentEnd(IlvHyperEdge edge)
          Returns true if the hyperedge is registered as waiting for adjustment end notification.
protected  IlvObjectProperty makeObjectProperty(IlvGraphic obj)
          Creates the object property for the input object.
protected  void objectRemoved(IlvGraphic obj)
          This method is called when an object is removed from the manager.
 IlvGraphicEnumeration pasteSelection(IlvPoint p, boolean select)
          Pastes the graphic objects saved in the clipboard into the manager.
 boolean read(InputStream stream)
          Reads an ILOG JViews formatted file in the manager.
 void registerWaitingForAdjustmentEnd(IlvHyperEdge edge)
          Registers that a hyperedge is waiting for adjustment end notification.
 void removeHyperEdge(IlvHyperEdge edge, boolean redraw)
          Removes a hyperedge from the grapher.
 void removeHyperEdgesFrom(IlvGraphic node, boolean redraw)
          Remove all hyperedges that are incident to the input source node.
 void removeHyperEdgesTo(IlvGraphic node, boolean redraw)
          Remove all hyperedges that are incident to the input target node.
 void removeNode(IlvGraphic node, boolean redraw)
          Removes a node from the grapher.
 void removeObject(IlvGraphic obj, boolean redraw)
          Removes an object from the hypergrapher.
 void replaceObject(IlvGraphic oldObject, IlvGraphic newObject, boolean redraw)
          This method overrides the replaceObject method of IlvGrapher to take hyperedge properties into account.
 void setContentsAdjusting(boolean set)
          Tells the manager that it is the beginning or the end of a major modification of its contents.
 void setLayer(IlvGraphic obj, int newLayer, boolean redraw)
          Changes the layer of a graphic object.
 void setMinHyperEdgeEndCount(int count)
          Sets the minimum number of end point a hyperedge should have.
 void setSelected(IlvGraphic obj, boolean select, boolean redraw)
          Selects or deselects the specified graphic object.
 void setSelected(IlvGraphic obj, IlvPoint p, IlvManagerView view)
          Selects or the specified graphic object.
 void translateObjects(IlvGraphicEnumeration enumeration, float dx, float dy, IlvTransformer t)
          Translates the input objects that must belong to this manager.
 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.IlvGrapher
addInterGraphLink, addLink, addLink, addNode, getExternalInterGraphLinks, getExternalInterGraphLinksCount, getFromNeighbors, getInterGraphLinks, getInterGraphLinksCount, getLinks, getLinksCount, getLinksFrom, getLinksFromCount, getLinksInsertionLayer, getLinksTo, getLinksToCount, getLinksVisibleFrom, getLinksVisibleFromCount, getLinksVisibleTo, getLinksVisibleToCount, getLowestCommonGrapher, getNeighbors, getToNeighbors, getTreeExternalInterGraphLinks, getTreeExternalInterGraphLinksCount, isInterGraphLink, isLink, isLinkBetween, isMarked, isNode, isNodeOrLink, makeNode, nodeHasSons, removeLink, setLinksInsertionLayer, setMarked, setVisibleBranch, setVisibleBranch
 
Methods inherited from class ilog.views.IlvManager
abortReDraws, addAccelerator, addGraphicBagHierarchyListener, addLayer, addLayer, addManagerContentChangedListener, addManagerExpansionListener, addManagerLayerListener, addManagerSelectionListener, addManagerTreeContentChangedListener, addManagerTreeSelectionListener, addManagerViewsHierarchyListener, addManagerViewsListener, addObject, afterTransform, applyToObject, applyToObjects, applyToObjects, applyToObjects, applyToObjects, applyTransform, beforeTransform, boundingBox, check, computeBBox, computeBBox, contains, containsFrame, contentsChanged, createInputStream, createManagerLayer, createOutputStream, deleteAll, deleteAll, deleteSelections, deSelectAll, deSelectAll, deSelectAll, dispatchToObjects, draw, draw, 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, print, processEvent, processEvent, processHoverHighlightingEvent, 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, setEditable, setFileName, setFrame, setGraphicBag, setHoverHighlightingImageOperation, setHoverHighlightingMode, setInsertionLayer, setKeepingAspectRatio, setLayerName, setMovable, setNameImpl, setNumberOfLayer, setObjectInteractor, setObjectName, setOptimizedLayerThreshold, setProperty, setSelectable, setSelectable, setSelectionAdjusting, setSelectionEventSource, setSelectionFactory, setSizeLimitToDrawSubmanagerContents, setStreamFactory, setTransformer, setUserData, setVisible, setVisible, setVisible, shortCut, swapLayers, 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

IlvHyperGrapher

public IlvHyperGrapher()
Creates a new IlvHyperGrapher. By default the hypergrapher has 2 layers.


IlvHyperGrapher

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

Parameters:
numlayers - The number of layers.

IlvHyperGrapher

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

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

IlvHyperGrapher

public IlvHyperGrapher(IlvInputStream stream)
                throws IOException,
                       IlvReadFileException
Reads the hypergrapher 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 hypergrapher used as a graphic object inside another grapher.

Throws:
IOException
IlvReadFileException

IlvHyperGrapher

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

Parameters:
origin - The hypergrapher to copy.
See Also:
copy()
Method Detail

copy

public IlvGraphic copy()
Creates a new IlvHyperGrapher by copying this hypergrapher.

Overrides:
copy in class IlvGrapher
Returns:
A new IlvGrapher instance.
See Also:
IlvGraphic

addObject

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

Overrides:
addObject in class IlvGrapher
Parameters:
obj - The object to be added.
layer - The layer where the object should be inserted. Note that if the hypergrapher does not have a layer that corresponds to this index, the hypergrapher 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,
                    int layer,
                    boolean redraw)
Adds a node to the grapher in the specified layer.

Overrides:
addNode in class IlvGrapher
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:
removeNode(ilog.views.IlvGraphic, boolean), IlvGrapher.addNode(ilog.views.IlvGraphic, boolean), IlvManager.setNumberOfLayer(int)

unmakeNode

public void unmakeNode(IlvGraphic obj)
Allows a graphic object that was added as a node to become a regular object. This is the inverse operation of IlvGrapher.makeNode(IlvGraphic). If the specified graphic object has been added to the grapher using the addNode method, this object is considered as a node of the grapher. After calling this method, the object will no longer be considered as a node. You can call this method only if the object has no incident links and no incident hyperedges.

Overrides:
unmakeNode in class IlvGrapher
Parameters:
obj - The graphic object.
Since:
JViews 5.0
See Also:
IlvGrapher.makeNode(IlvGraphic)

addHyperEdge

public void addHyperEdge(IlvHyperEdge obj,
                         boolean redraw)
Adds a hyperedge to this hypergrapher. The hyperedge is added in the insertion layer for links.

Note that the origin and destination nodes of the edge must be already added using the method addNode(ilog.views.IlvGraphic, int, boolean), and they must be contained either in this IlvHyperGrapher, or in subhypergraphs of it. The hyperedge must have the minimal number of ends (see getMinHyperEdgeEndCount()). It is not possible to add a hyperedge that has no end node at all.

Parameters:
obj - The hyperedge.
redraw - If true, the object is drawn.
See Also:
IlvGrapher.getLinksInsertionLayer(), addHyperEdge(IlvHyperEdge, int, boolean), removeHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean), addInterGraphHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)

addHyperEdge

public void addHyperEdge(IlvHyperEdge obj,
                         int layer,
                         boolean redraw)
Adds a hyperedge to this hypergrapher in a specified layer.

Note that the origin and destination nodes of the edge must be already added using the method addNode(ilog.views.IlvGraphic, int, boolean), and they must be contained either in this IlvGrapher, or in subhypergraphs of it. The hyperedge must have the minimal number of ends (see getMinHyperEdgeEndCount()). It is not possible to add a hyperedge that has no end node at all.

Parameters:
obj - The hyperedge.
layer - The index of the layer where the hyperedge is added.
redraw - If true, the object is drawn.
See Also:
addHyperEdge(IlvHyperEdge, boolean), removeHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean), addInterGraphHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)

addInterGraphHyperEdge

public static void addInterGraphHyperEdge(IlvHyperEdge edge,
                                          boolean redraw)
Adds an intergraph hyperedge. This method allows you to add a hyperedge in a hypergrapher when the origin and destination nodes of the edge are not in the same grapher. This methods adds the specified edge in the lowest common hypergrapher of the grapher hierarchy of the destination and origin nodes of the edge. The hyperedge is added in the insertion layer of the grapher.

The hyperedge must have the minimal number of ends specified for the grapher where it is added (see getMinHyperEdgeEndCount()). It is not possible to add a hyperedge that has no end node at all.

Parameters:
edge - The edge to add.
redraw - If true, the edge will be drawn.
See Also:
getLowestCommonHyperGrapher(ilog.views.hypergraph.IlvHyperEdge), getInterGraphHyperEdges(), getExternalInterGraphHyperEdges(), addHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean), IlvHyperEdge.isInterGraphHyperEdge()

addInterGraphHyperEdge

public static void addInterGraphHyperEdge(IlvHyperEdge edge,
                                          int layer,
                                          boolean redraw)
Adds an intergraph hyperedge. This method allows you to add a hyperedge in a hypergrapher when the origin and destination nodes of the edge are not in the same grapher. This methods adds the specified edge in the lowest common grapher of the grapher hierarchy of the destination and origin nodes of the edge.

The hyperedge must have the minimal number of ends specified for the grapher where it is added (see getMinHyperEdgeEndCount()). It is not possible to add a hyperedge that has no end node at all.

Parameters:
edge - The edge to add.
layer - The index of the layer where the hyperedge is added.
redraw - If true, the edge will be drawn.
See Also:
getLowestCommonHyperGrapher(ilog.views.hypergraph.IlvHyperEdge), getInterGraphHyperEdges(), getExternalInterGraphHyperEdges(), addHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)

getLowestCommonHyperGrapher

public static IlvHyperGrapher getLowestCommonHyperGrapher(IlvHyperEdge obj)
Returns the lowest common grapher of all end nodes of the hyperedge. Returns null if the end nodes have no common ancestor that is a hypergrapher.

Parameters:
obj - The hyperedge.

getLowestCommonHyperGrapher

public static IlvHyperGrapher getLowestCommonHyperGrapher(Iterator iter)
Returns the lowest common hyper grapher of a set of nodes. Returns null if the nodes have no common ancestor that is a hypergrapher.

Parameters:
iter - The iterator over the nodes.

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 IlvGrapher

removeObject

public void removeObject(IlvGraphic obj,
                         boolean redraw)
Removes an object from the hypergrapher. This method calls removeNode if the object is a node, removeLink if the object is a regular edge, and removeHyperEdge if the object is a hyperedge.

Note that it is not allowed to remove graphic objects while browsing the enumeration returned by the methods IlvManager.getObjects(), IlvManager.getObjects(int), IlvManager.getObjects(boolean), IlvManager.getSelections(), IlvManager.getSelectedObjects(), IlvManager.getSelectedObjects(boolean), IlvManager.getManagers(), IlvManager.getManagers(int), IlvGrapher.getLinksFrom(ilog.views.IlvGraphic), IlvGrapher.getLinksTo(ilog.views.IlvGraphic), IlvGrapher.getLinks(ilog.views.IlvGraphic), IlvGrapher.getNeighbors(ilog.views.IlvGraphic), IlvGrapher.getInterGraphLinks(), IlvGrapher.getExternalInterGraphLinks(), getHyperEdgesFrom(ilog.views.IlvGraphic), getHyperEdgesTo(ilog.views.IlvGraphic), getHyperEdges(), getInterGraphHyperEdges(), getExternalInterGraphHyperEdges(), IlvHyperEdge.getFromEnds() and IlvHyperEdge.getToEnds().

Specified by:
removeObject in interface IlvGraphicBag
Overrides:
removeObject in class IlvGrapher
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), IlvGrapher.removeLink(IlvLinkImage, boolean)

removeNode

public void removeNode(IlvGraphic node,
                       boolean redraw)
Removes a node from the grapher. All links incident to this node are also removed. All hyperedges incident to this node loose the ends that are attached to this node. The hyperedges remain in the grapher if they still have enough end points. A hyperedge is automatically removed from the grapher if the number of remaining ends on the hyperedge is smaller than the value specified by getMinHyperEdgeEndCount().

If the node is a hypergrapher, all intergraph hyperedges that go outside the node loose the ends that are inside the node.

Note that it is not allowed to remove graphic objects while browsing the enumeration returned by the certain methods. See removeObject() for the list of forbidden methods.

Overrides:
removeNode in class IlvGrapher
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), IlvGrapher.addNode(ilog.views.IlvGraphic, boolean)

removeHyperEdge

public void removeHyperEdge(IlvHyperEdge edge,
                            boolean redraw)
Removes a hyperedge from the grapher.

Note that it is not allowed to remove graphic objects while browsing the enumeration returned by the certain methods. See removeObject() for the list of forbidden methods.

Parameters:
edge - The hyperedge to remove.
redraw - If true, the area where the hyperedge was located is redrawn.
See Also:
addHyperEdge(IlvHyperEdge, int, boolean), addHyperEdge(IlvHyperEdge, boolean)

objectRemoved

protected void objectRemoved(IlvGraphic obj)
This method is called when an object is removed from the manager.

Overrides:
objectRemoved in class IlvManager
Parameters:
obj - The graphic object.

removeHyperEdgesFrom

public void removeHyperEdgesFrom(IlvGraphic node,
                                 boolean redraw)
Remove all hyperedges that are incident to the input source node.

Parameters:
node - The origin node.
redraw - If true, the area where the hyperedges were located is redrawn.
See Also:
removeHyperEdgesTo(ilog.views.IlvGraphic, boolean)

removeHyperEdgesTo

public void removeHyperEdgesTo(IlvGraphic node,
                               boolean redraw)
Remove all hyperedges that are incident to the input target node.

Parameters:
node - The destination node.
redraw - If true, the area where the hyperedges were located is redrawn.
See Also:
removeHyperEdgesFrom(ilog.views.IlvGraphic, boolean)

isHyperEdge

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

Parameters:
obj - The graphic object to test.

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 IlvGrapher

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 IlvGrapher

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.

Overrides:
beforeTransformDependentObjs in class IlvGrapher
Since:
JViews 8.0

afterTransformDependentObjs

protected void afterTransformDependentObjs(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.

Overrides:
afterTransformDependentObjs in class IlvGrapher
Since:
JViews 8.0

replaceObject

public void replaceObject(IlvGraphic oldObject,
                          IlvGraphic newObject,
                          boolean redraw)
This method overrides the replaceObject method of IlvGrapher to take hyperedge properties into account. The replaced hyperedge will have the same ends at the original hyperedge.

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

setSelected

public void setSelected(IlvGraphic obj,
                        boolean select,
                        boolean redraw)
Selects or deselects the specified graphic object. When a graphic object is selected, another graphic object is created to show that this object is selected. This new graphic object is called the selection object and is an instance of the class IlvSelection. If a selection factory is installed on the manager (see setSelectionFactory), this factory is responsible for creating the selection object. Otherwise, the method makeSelection of the class IlvGraphic is called.
This method also fires a ManagerSelectionChangedEvent event by calling the method selectionChanged.

Overrides:
setSelected in class IlvManager
Parameters:
obj - The graphic object to select or deselect.
select - If true the object will be selected, and deselected otherwise.
redraw - If true, the object is redrawn (or its region is invalidated, if we are in an initRedraws/reDrawViews session).
See Also:
IlvManager.isSelected(ilog.views.IlvGraphic), IlvManager.getSelection(ilog.views.IlvPoint, ilog.views.IlvManagerView), IlvManager.selectAll(boolean), IlvManager.selectAll(boolean,boolean), IlvManager.deSelectAll(boolean), IlvManager.deSelectAll(int, boolean), IlvManager.selectAll(IlvManagerView,boolean), IlvManager.getSelectedObjects(), IlvManager.getSelectedObjectsCount(), IlvManager.getSelections(),