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.
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.
IlvHyperEdge
,
Serialized FormHH_BLUR, HH_BRIGHTEN, HH_CUSTOM, HH_GRAYSCALE, HH_INVERT_COLORS, HH_NONE, HH_SHARPEN
Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
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<? extends IlvHyperEdge> 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)
|
protected void |
afterTransformObj(IlvGraphic obj,
boolean redraw,
boolean ifneeded,
boolean parent,
boolean fireEvent)
|
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)
|
protected void |
beforeTransformObj(IlvGraphic obj,
boolean redraw,
boolean ifneeded,
boolean parent)
|
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<IlvHyperEdgeEnd> |
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<IlvHyperEdgeEnd> |
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 a Perforce 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,
double dx,
double 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.
|
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, isCrossingAwareLinksFrozen, isInterGraphLink, isLink, isLinkBetween, isMarked, isNode, isNodeOrLink, makeNode, nodeHasSons, readPrefix, readSuffix, removeLink, setCrossingAwareLinksFrozen, setLinksInsertionLayer, setMarked, setVisibleBranch, setVisibleBranch, setVisibleBranch, write, writePrefix, writeSuffix
abortReDraws, addAccelerator, addGraphicBagHierarchyListener, addLayer, addLayer, addManagerContentChangedListener, addManagerExpansionListener, addManagerLayerListener, addManagerSelectionListener, addManagerTreeContentChangedListener, addManagerTreeSelectionListener, addManagerViewsHierarchyListener, addManagerViewsListener, addObject, afterTransform, applyToObject, applyToObjects, applyToObjects, applyToObjects, applyToObjects, applyTransform, baseTextDirectionChanged, beforeTransform, blinkingReDraw, boundingBox, check, componentOrientationChanged, 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, getAllSelectableObjects, getCardinal, getCardinal, getCardinal, getCollapsedGraphic, getCollapseExpandObject, getComponentOrientation, 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, getSelectableObject, getSelectedObjects, getSelectedObjects, getSelectedObjects, getSelectedObjectsCount, getSelectedObjectsCount, getSelectedObjectsCount, getSelection, getSelection, getSelection, getSelectionFactory, getSelections, getSizeLimitToDrawSubmanagerContents, getStoredComponentOrientation, getStoredULocale, getStreamFactory, getTopLevelTransformer, getTransformer, getTreeLock, getULocale, getUserData, getViews, handleAccelerators, hasProperty, init, initReDraws, invalidateRegion, invalidateRegion, invalidateRegion, isAutoLabelForCollapsedGraphic, isBaseTextDirectionSensitive, isCollapsed, isCollapsible, isComponentOrientationSensitive, isContentsAdjusting, isDebugBoundingBoxes, isEditable, isInsertionAdjusting, isInvalidating, isKeepingAspectRatio, isLocaleSensitive, isManaged, isMovable, isSelectable, isSelectable, isSelected, isSelectionAdjusting, isSelectionInvariantSubManagerBounds, isVisible, isVisible, isVisible, isVisible, localeChanged, lostOwnership, map, map, mapInside, mapInside, mapIntersects, mapIntersects, moveObject, moveResize, needsDrawSubmanagerContents, needsGraphicBagHierarchyEvent, needsManagerViewsHierarchyEvent, objectIsSelectable, print, processEvent, processEvent, processHoverHighlightingEvent, 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, setAutoLabelForCollapsedGraphic, setBaseTextDirection, setCollapsed, setCollapsedGraphic, setComponentOrientation, setComponentOrientation, setContentsAdjusting, setDebugBoundingBoxes, setDebugBoundingBoxesGlobal, setEditable, setFileName, setFrame, setGraphicBag, setHoverHighlightingImageOperation, setHoverHighlightingMode, setInsertionAdjusting, setInsertionLayer, setKeepingAspectRatio, setLayerName, setMovable, setNameImpl, setNumberOfLayer, setObjectInteractor, setObjectName, setOptimizedLayerThreshold, setProperty, setSelectable, setSelectable, setSelectionAdjusting, setSelectionEventSource, setSelectionFactory, setSelectionInvariantSubManagerBounds, setSizeLimitToDrawSubmanagerContents, setStreamFactory, setTransformer, setULocale, setULocale, setUserData, setVisible, setVisible, setVisible, shortCut, swapLayers, translateSelections, viewAdded, viewRemoved, write, write, write, write, writeIt, zoomable
calcResolvedBaseTextDirection, getBaseTextDirection, getResolvedBaseTextDirection, invalidateBidiCache, setBaseTextDirection, setBaseTextDirectionDuringConstruction
addActionListener, addNamedPropertyListener, allViewsRemoved, blinkingStateOn, boundingBox, callDraw, getAndAssociateObjectInteractor, getBlinkingAction, getBlinkingObjectOwner, getBlinkingOffPeriod, getBlinkingOnPeriod, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getLocale, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getToolTipBaseTextDirection, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, getZOrderIndex, inside, intersects, invalidateBBoxCache, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, makeSelection, move, move, needsViewNotification, notifyObjectInteractorToManager, processActionEvent, registerBlinkingResource, removeActionListener, removeNamedProperty, removeNamedPropertyListener, resize, rotate, scale, setBackground, setBlinkingAction, setBlinkingOffPeriod, setBlinkingOnPeriod, setEditable, setFillOn, setForeground, setInApplyToObject, setMovable, setName, setNamedProperty, setObjectInteractor, setPopupMenu, setPopupMenuName, setSelectable, setStrokeOn, setToolTipBaseTextDirection, setToolTipText, setVisible, setZOrderIndex, toString, translate, updateNeedsViewNotification, usesBidiMarkers, viewAddedOrRemoved
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGraphicBag
public IlvHyperGrapher()
IlvHyperGrapher
.
By default the hypergrapher has 2 layers.public IlvHyperGrapher(int numlayers)
IlvHyperGrapher
with a specified number of
layers.numlayers
- The number of layers.public IlvHyperGrapher(int numlayers, int maxInList)
IlvHyperGrapher
.numlayers
- The number of layers.maxInList
- The number of objects before using the quadtree.public IlvHyperGrapher(IlvInputStream stream) throws IOException, IlvReadFileException
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.IOException
IlvReadFileException
public IlvHyperGrapher(IlvHyperGrapher origin)
IlvHyperGrapher
by copying the
specified one.origin
- The hypergrapher to copy.copy()
public IlvGraphic copy()
IlvHyperGrapher
by copying this
hypergrapher.copy
in class IlvGrapher
IlvGrapher
instance.IlvGraphic
public void addObject(IlvGraphic obj, int layer, boolean redraw)
ManagerContentChangedEvent
event.addObject
in class IlvGrapher
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.IlvManager.addObject(ilog.views.IlvGraphic, boolean)
,
removeObject(ilog.views.IlvGraphic, boolean)
,
IlvManager.setNumberOfLayer(int)
public void addNode(IlvGraphic obj, int layer, boolean redraw)
addNode
in class IlvGrapher
obj
- The node.layer
- The index of the layer where the node is to be added.redraw
- If true
, the object is drawn.removeNode(ilog.views.IlvGraphic, boolean)
,
IlvGrapher.addNode(ilog.views.IlvGraphic, boolean)
,
IlvManager.setNumberOfLayer(int)
public void unmakeNode(IlvGraphic obj)
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.unmakeNode
in class IlvGrapher
obj
- The graphic object.IlvGrapher.makeNode(IlvGraphic)
public void addHyperEdge(IlvHyperEdge obj, boolean redraw)
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.
obj
- The hyperedge.redraw
- If true
, the object is drawn.IlvGrapher.getLinksInsertionLayer()
,
addHyperEdge(IlvHyperEdge, int, boolean)
,
removeHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)
,
addInterGraphHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)
public void addHyperEdge(IlvHyperEdge obj, int layer, boolean redraw)
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.
obj
- The hyperedge.layer
- The index of the layer where the hyperedge is added.redraw
- If true
, the object is drawn.addHyperEdge(IlvHyperEdge, boolean)
,
removeHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)
,
addInterGraphHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)
public static void addInterGraphHyperEdge(IlvHyperEdge edge, boolean redraw)
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.
edge
- The edge to add.redraw
- If true
, the edge will be drawn.getLowestCommonHyperGrapher(ilog.views.hypergraph.IlvHyperEdge)
,
getInterGraphHyperEdges()
,
getExternalInterGraphHyperEdges()
,
addHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)
,
IlvHyperEdge.isInterGraphHyperEdge()
public static void addInterGraphHyperEdge(IlvHyperEdge edge, int layer, boolean redraw)
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.
edge
- The edge to add.layer
- The index of the layer where the hyperedge is added.redraw
- If true
, the edge will be drawn.getLowestCommonHyperGrapher(ilog.views.hypergraph.IlvHyperEdge)
,
getInterGraphHyperEdges()
,
getExternalInterGraphHyperEdges()
,
addHyperEdge(ilog.views.hypergraph.IlvHyperEdge, boolean)
public static IlvHyperGrapher getLowestCommonHyperGrapher(IlvHyperEdge obj)
null
if the end nodes have no common ancestor
that is a hypergrapher.obj
- The hyperedge.public static IlvHyperGrapher getLowestCommonHyperGrapher(Iterator<?> iter)
null
if the nodes have no common ancestor
that is a hypergrapher.iter
- The iterator over the nodes.protected IlvObjectProperty makeObjectProperty(IlvGraphic obj)
makeObjectProperty
in class IlvGrapher
public void removeObject(IlvGraphic obj, boolean redraw)
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()
.
removeObject
in interface IlvGraphicBag
removeObject
in class IlvGrapher
obj
- The graphic object to remove.redraw
- If true
, the area where the object was located
is redrawn.removeNode(ilog.views.IlvGraphic, boolean)
,
IlvGrapher.removeLink(IlvLinkImage, boolean)
public void removeNode(IlvGraphic node, boolean redraw)
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.
removeNode
in class IlvGrapher
node
- The node to remove.redraw
- If true
, the area where the node was
located is redrawn.addNode(ilog.views.IlvGraphic, int, boolean)
,
IlvGrapher.addNode(ilog.views.IlvGraphic, boolean)
public void removeHyperEdge(IlvHyperEdge edge, boolean redraw)
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.
edge
- The hyperedge to remove.redraw
- If true
, the area where the hyperedge was
located is redrawn.addHyperEdge(IlvHyperEdge, int, boolean)
,
addHyperEdge(IlvHyperEdge, boolean)
protected void objectRemoved(IlvGraphic obj)
objectRemoved
in class IlvManager
obj
- The graphic object.public void removeHyperEdgesFrom(IlvGraphic node, boolean redraw)
node
- The origin node.redraw
- If true
, the area where the hyperedges were
located is redrawn.removeHyperEdgesTo(ilog.views.IlvGraphic, boolean)
public void removeHyperEdgesTo(IlvGraphic node, boolean redraw)
node
- The destination node.redraw
- If true
, the area where the hyperedges were
located is redrawn.removeHyperEdgesFrom(ilog.views.IlvGraphic, boolean)
public final boolean isHyperEdge(IlvGraphic obj)
true
if the object is a hyperedge contained
in this IlvGrapher
.obj
- The graphic object to test.protected void beforeTransformObj(IlvGraphic obj, boolean redraw, boolean ifneeded, boolean parent)
IlvManager.beforeTransform(ilog.views.IlvGraphic, boolean, boolean, boolean)
.
This method is part of JViews internals. You should
not use it.beforeTransformObj
in class IlvGrapher
protected void afterTransformObj(IlvGraphic obj, boolean redraw, boolean ifneeded, boolean parent, boolean fireEvent)
IlvManager.afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean)
.
This method is part of JViews internals. You should
not use it.afterTransformObj
in class IlvGrapher
protected void beforeTransformDependentObjs(HashSet objs, boolean redraw, boolean ifneeded)
IlvManager.afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean)
.
This method is part of JViews internals. You should
not use it.beforeTransformDependentObjs
in class IlvGrapher
protected void afterTransformDependentObjs(HashSet objs, boolean redraw, boolean ifneeded)
IlvManager.afterTransform(ilog.views.IlvGraphic, boolean, boolean, boolean, boolean)
.
This method is part of JViews internals. You should
not use it.afterTransformDependentObjs
in class IlvGrapher
public void replaceObject(IlvGraphic oldObject, IlvGraphic newObject, boolean redraw)
replaceObject
method of
IlvGrapher
to take hyperedge properties into account.
The replaced hyperedge will have the same ends at the original hyperedge.replaceObject
in class IlvGrapher
oldObject
- The old object.newObject
- The new object.redraw
- If true
, the objects are redrawn.public void setSelected(IlvGraphic obj, boolean select, boolean redraw)
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.
ManagerSelectionChangedEvent
event
by calling the method selectionChanged
.setSelected
in interface IlvObjectWithSelection
setSelected
in class IlvManager
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).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()
,
IlvManager.addManagerSelectionListener(ilog.views.event.ManagerSelectionListener)
,
IlvManager.removeManagerSelectionListener(ilog.views.event.ManagerSelectionListener)
public void setSelected(IlvGraphic obj, IlvPoint p, IlvManagerView view)
This implementation calls
setSelected(obj, true, true)
and additionally handles
the selection of pins of IlvHyperEdgePinConnector
.
Subclasses can override this method to select subparts of the input
object located on the input point.
setSelected
in interface IlvObjectWithSelection
setSelected
in class IlvManager
obj
- The object to be selectedp
- The point in the manager view where the mouse click occurred.view
- The view currently handled by the select interactor.setSelected(IlvGraphic, boolean, boolean)
public boolean read(InputStream stream) throws IOException, IlvReadFileException
read
in class IlvManager
stream
- An InputStream.true
if the stream contains binary IVL data,
and false
if the stream contains ASCII IVL data.IOException
- An I/O error occurs.IlvReadFileException
- when
the manager cannot read the file, either because the file
is not a Perforce JViews formatted file, the format is not correct,
or some graphic classes cannot be found.IlvManager.read(String)
,
IlvManager.read(java.net.URL)
public void deleteSelections(boolean traverse, boolean redraw)
deleteSelections
in class IlvManager
traverse
- If true
, the method removes the selected
objects in this manager and its submanagers.redraw
- If true
, the manager views are redrawn.IlvManager.getManagers()
public void duplicateSelections(int dx, int dy)
duplicateSelections
in class IlvManager
dx
- Copied objects are translated by dx on the x axis.dy
- Copied objects are translated by dy on the y axis.public IlvGraphicEnumeration pasteSelection(IlvPoint p, boolean select)
pasteSelection
in class IlvManager
p
- The location for the new objects. This point corresponds to
the top-left corner of the rectangle that contains the new objects. The
point must be given in the manager's coordinate system.select
- If true
, then all new objects are selected.IlvGraphicSet
). This method
returns null
if no objects were created.copySelection()
,
IlvManager.lostOwnership(java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable)
public void copySelection()
public IlvGraphicEnumeration getSelectedMovingObjects(boolean[] flags)
flag[0]
is true
, the
links are moved if both end nodes are selected and move.
If flag[1]
is true
, the
hyperedges are moved if all end nodes are selected and move.getSelectedMovingObjects
in class IlvGrapher
flags
- The flags of the select interactor that control what should be
moved. If flag[0]
is true
, the
links are moved if both end nodes are selected.IlvSelectInteractor.getSelectedMovingObjects(ilog.views.IlvManager)
protected void afterHyperEdgeEndsChanged(Iterator<? extends IlvHyperEdge> hyperedges)
IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
session has finished.
For the input edges, one of the following methods has been called inside
the IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
session while the edge was in this grapher:
IlvHyperEdge.setFrom(ilog.views.IlvGraphicVector)
IlvHyperEdge.setTo(ilog.views.IlvGraphicVector)
IlvHyperEdge.addFrom(ilog.views.IlvGraphic)
IlvHyperEdge.addTo(ilog.views.IlvGraphic)
IlvHyperEdge.removeFrom(IlvGraphic)
IlvHyperEdge.removeFrom(IlvHyperEdgeEnd)
IlvHyperEdge.removeTo(IlvGraphic)
IlvHyperEdge.removeTo(IlvHyperEdgeEnd)
The default implementation of this method checks whether each hyperedge
has the minimal number of ends (see getMinHyperEdgeEndCount()
)
and removes those hyperedges that have less ends.
You can override this method if you need more complex tests when a edge is considered valid for your application.
hyperedges
- The hyperedges whose ends have changed.public void setMinHyperEdgeEndCount(int count)
This default value is 2, that is, hyperedges with only 0 or 1 end are automatically removed. If you set the value to 0, no hyperedge is automatically removed.
getMinHyperEdgeEndCount()
public int getMinHyperEdgeEndCount()
setMinHyperEdgeEndCount(int)
protected HashSet getBoundingBoxDependentObjects(IlvGraphic obj, boolean includeExternals)
This implementation returns the links and all hyperedges that may move when the input object is a moving node.
getBoundingBoxDependentObjects
in class IlvGrapher
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.null
if there are no
dependent objects.public final Iterator<IlvHyperEdgeEnd> getHyperEdgeEndsFrom(IlvGraphic node)
The returned iterator does not support the Iterator.remove()
operation.
Use IlvHyperEdge.removeFrom(ilog.views.IlvGraphic)
to remove a hyped edge end.
node
- The source node.IlvHyperEdgeEnd
.getHyperEdgeEndsFromCount(ilog.views.IlvGraphic)
,
getHyperEdgesFrom(ilog.views.IlvGraphic)
,
getHyperEdgeEndsTo(ilog.views.IlvGraphic)
public final Iterator<IlvHyperEdgeEnd> getHyperEdgeEndsTo(IlvGraphic node)
The returned iterator does not support the Iterator.remove()
operation.
Use IlvHyperEdge.removeTo(ilog.views.IlvGraphic)
to remove a hyped edge end.
node
- The target node.IlvHyperEdgeEnd
.getHyperEdgeEndsToCount(ilog.views.IlvGraphic)
,
getHyperEdgesTo(ilog.views.IlvGraphic)
,
getHyperEdgeEndsFrom(ilog.views.IlvGraphic)
public final int getHyperEdgeEndsFromCount(IlvGraphic node)
node
- The source node.getHyperEdgeEndsFrom(ilog.views.IlvGraphic)
,
getHyperEdgesFromCount(ilog.views.IlvGraphic)
,
getHyperEdgeEndsToCount(ilog.views.IlvGraphic)
public final int getHyperEdgeEndsToCount(IlvGraphic node)
node
- The target node.getHyperEdgeEndsTo(ilog.views.IlvGraphic)
,
getHyperEdgesToCount(ilog.views.IlvGraphic)
,
getHyperEdgeEndsFromCount(ilog.views.IlvGraphic)
public final IlvGraphicEnumeration getHyperEdgesFrom(IlvGraphic node)
node
- The source node.getHyperEdgeEndsFrom(ilog.views.IlvGraphic)
,
getHyperEdgesFromCount(ilog.views.IlvGraphic)
,
getHyperEdgesTo(ilog.views.IlvGraphic)
public final IlvGraphicEnumeration getHyperEdgesTo(IlvGraphic node)
node
- The target node.getHyperEdgeEndsTo(ilog.views.IlvGraphic)
,
getHyperEdgesToCount(ilog.views.IlvGraphic)
,
getHyperEdgesFrom(ilog.views.IlvGraphic)
public final int getHyperEdgesFromCount(IlvGraphic node)
getHyperEdgeEndsFromCount(ilog.views.IlvGraphic)
, each
hyperedge occurs only one time in this count even if the
hyperedge ends multiple times at the input node.node
- The source node.getHyperEdgesFrom(ilog.views.IlvGraphic)
,
getHyperEdgesToCount(ilog.views.IlvGraphic)
public final int getHyperEdgesToCount(IlvGraphic node)
getHyperEdgeEndsToCount(ilog.views.IlvGraphic)
, each
hyperedge occurs only one time in this count even if the
hyperedge ends multiple times at the input node.node
- The target node.getHyperEdgesTo(ilog.views.IlvGraphic)
,
getHyperEdgesFromCount(ilog.views.IlvGraphic)
public void disconnectHyperEdgesFrom(IlvGraphic node, boolean redraw)
IlvHyperEdge.removeFrom(IlvGraphic)
for all
incident hyperedges that have the input node as origin.
The hyperedges remain in the grapher.node
- The origin node.redraw
- If true
, the area where the hyperedges were
located is redrawn.removeHyperEdgesFrom(ilog.views.IlvGraphic, boolean)
,
disconnectHyperEdgesTo(ilog.views.IlvGraphic, boolean)
public void disconnectHyperEdgesTo(IlvGraphic node, boolean redraw)
IlvHyperEdge.removeTo(IlvGraphic)
for all
incident hyperedges that have the input node as destination.
The hyperedges remain in the grapher.node
- The destination node.redraw
- If true
, the area where the hyperedges were
located is redrawn.removeHyperEdgesTo(ilog.views.IlvGraphic, boolean)
,
disconnectHyperEdgesFrom(ilog.views.IlvGraphic, boolean)
public void disconnectHyperEdge(IlvGraphic node, IlvHyperEdge edge, boolean fromSide, boolean toSide, boolean redraw)
IlvHyperEdge.removeFrom(ilog.views.IlvGraphic)
and IlvHyperEdge.removeTo(ilog.views.IlvGraphic)
since no applyToObject session is
necessary (see IlvManager.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
).node
- The node to be disconnected.edge
- The hyperedge to be disconnected.fromSide
- If true
, all origin ends at the node are
removed from the hyperedge.toSide
- If true
, all destination ends at the node are
removed from the hyperedge.redraw
- If true
, the area where the hyperedge is
located is redrawn.public final IlvGraphicEnumeration getHyperEdgesVisibleFrom(IlvGraphic node)
hyperedge.isVisibleFrom(node)
returns true.
Each hyperedge occurs only one time in this enumeration.
Some hyperedges 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 hyperedges that are really connected to the origin node, and additionally all hyperedges that appear visually connected to this origin node if it is a collapsed grapher.
To be precise: this method returns all non-intergraph hyperedges starting from the input origin node. Furthermore it returns all intergraph hyperedges 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 hyperedges 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 any other end of the hyperedge is not nested inside, hence outside the collapsed grapher.
node
- The origin node.getHyperEdgesVisibleFromCount(ilog.views.IlvGraphic)
,
getHyperEdgesFrom(ilog.views.IlvGraphic)
,
IlvHyperEdge.isInterGraphHyperEdge()
,
getTreeExternalInterGraphHyperEdges()
,
IlvHyperEdge.getVisibleEndNode(ilog.views.IlvGraphic)
,
IlvHyperEdge.isVisibleFrom(ilog.views.IlvGraphic)
public final int getHyperEdgesVisibleFromCount(IlvGraphic node)
hyperedge.isVisibleFrom(node)
returns true.
node
- The origin node.getHyperEdgesVisibleFrom(ilog.views.IlvGraphic)
,
IlvHyperEdge.getVisibleEndNode(ilog.views.IlvGraphic)
,
IlvHyperEdge.isVisibleFrom(ilog.views.IlvGraphic)
public final IlvGraphicEnumeration getHyperEdgesVisibleTo(IlvGraphic node)
hyperedge.isVisibleTo(node)
returns true.
Each hyperedge occurs only one time in this enumeration.
Some hyperedges 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 hyperedges that are really connected to the destination node, and additionally all hyperedges that appear visually connected to this destination node if it is a collapsed grapher.
To be precise: this method returns all non-intergraph hyperedges starting from the input destination node. Furthermore it returns all intergraph hyperedges starting from 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 hyperedges 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 any other end of the hyperedge is not nested inside, hence outside the collapsed grapher.
node
- The destination node.getHyperEdgesVisibleToCount(ilog.views.IlvGraphic)
,
getHyperEdgesTo(ilog.views.IlvGraphic)
,
IlvHyperEdge.isInterGraphHyperEdge()
,
getTreeExternalInterGraphHyperEdges()
,
IlvHyperEdge.getVisibleEndNode(ilog.views.IlvGraphic)
,
IlvHyperEdge.isVisibleTo(ilog.views.IlvGraphic)
public final int getHyperEdgesVisibleToCount(IlvGraphic node)
hyperedge.isVisibleTo(node)
returns true.
node
- The destination node.getHyperEdgesVisibleTo(ilog.views.IlvGraphic)
,
IlvHyperEdge.getVisibleEndNode(ilog.views.IlvGraphic)
,
IlvHyperEdge.isVisibleTo(ilog.views.IlvGraphic)
public final IlvGraphicEnumeration getHyperGraphNeighbors(IlvGraphic node)
IlvGraphic
)
that are the hyperedge "neighbors" of node
. That is, the
nodes are connected to the input node by a hyperedge.
Normal links (IlvLinkImage
) are not considered.
See IlvGrapher.getNeighbors(ilog.views.IlvGraphic)
for a similar method that considers normal links.
The input node is not a considered a neighbor to itself. Each node occurs only once, even if it is connected to many hyper edges.
public final IlvGraphicEnumeration getHyperGraphFromNeighbors(IlvGraphic node)
IlvGraphic
)
that are the hyperedge "from neighbors" of node
. That is,
the nodes are connected to the input node by a hyperedge, where
node
is the origin of the hyperedge, and the "from neighbors"
are destinations of those hyperedges.
Normal links (IlvLinkImage
) are not considered.
See IlvGrapher.getFromNeighbors(ilog.views.IlvGraphic)
for a similar method that considers
normal links.
The input node may be a neighbor to itself, if it is origin and destination of the same hyperedge. Each node occurs only once, even if it is connected to many hyper edges.
public final IlvGraphicEnumeration getHyperGraphToNeighbors(IlvGraphic node)
IlvGraphic
)
that are the hyperedge "to neighbors" of node
. That is,
the nodes are connected to the input node by a hyperedge, where
node
is the destination of the hyperedge, and the
"to neighbors" are origins of those hyperedges.
Normal links (IlvLinkImage
) are not considered.
See IlvGrapher.getToNeighbors(ilog.views.IlvGraphic)
for a similar method that considers
normal links.
The input node may be a neighbor to itself, if it is origin and destination of the same hyperedge. Each node occurs only once, even if it is connected to many hyper edges.
public void translateObjects(IlvGraphicEnumeration enumeration, double dx, double dy, IlvTransformer t)
translateObjects
in class IlvManager
enumeration
- The enumeration of the input objects.dx
- The translation on the x axis.dy
- The translation on the y axis.t
- The transformer. If you pass null
,
the translation (dx, dy)
is in the manager
coordinate system; otherwise it is in the transformed coordinate system.public boolean allowMoving(IlvGraphic obj)
true
if the object can be moved with
the selection interactor (IlvSelectInteractor
).
You should not call this. It exists for internal reasons.
It returns true
if the object was set to movable, or
if the object can move because of an internal mechanism.allowMoving
in class IlvManager
IlvSelectInteractor
,
IlvManager.isMovable(ilog.views.IlvGraphic)
public void registerWaitingForAdjustmentEnd(IlvHyperEdge edge)
IlvHyperEdge.actOnAdjustmentEnd()
when the adjusting
session is finished. This feature allows the hyperedge to delay certain
time-consuming internal cleanup mechanism until the adjusting session
is finished.public boolean isWaitingForAdjustmentEnd(IlvHyperEdge edge)
true
if the hyperedge is registered as waiting
for adjustment end notification.public void setContentsAdjusting(boolean set)
setContentsAdjusting
in class IlvManager
IlvManager.setContentsAdjusting(boolean)
public final IlvGraphicEnumeration getHyperEdges()
public final int getHyperEdgesCount()
getHyperEdges()
public final IlvGraphicEnumeration getExternalInterGraphHyperEdges()
public final int getExternalInterGraphHyperEdgesCount()
getExternalInterGraphHyperEdges()
public final IlvGraphicEnumeration getTreeExternalInterGraphHyperEdges()
Each hyperedge in the enumeration has at least one end node inside and at least one end 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 hyperedge is not stored in this grapher.
Each hyperedge occurs at most once in the enumeration.
public final int getTreeExternalInterGraphHyperEdgesCount()
Each hyperedge counted has at least one end node inside and at least one end 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 hyperedge is not stored in this grapher.
public final IlvGraphicEnumeration getInterGraphHyperEdges()
public final int getInterGraphHyperEdgesCount()
getInterGraphHyperEdges()
public void setLayer(IlvGraphic obj, int newLayer, boolean redraw)
ManagerContentChangedEvent
event.
Note that it is not allowed to change the layer of graphic objects
while browsing the enumeration returned by IlvManager.getObjects()
or IlvManager.getObjects(int)
.
setLayer
in class IlvGrapher
obj
- The graphic object.newLayer
- The index of the new layer. This layer must exist;
otherwise, an IllegalArgumentException
is thrown.redraw
- If true
, the object is redrawn.IlvManager.getLayer(ilog.views.IlvGraphic)
,
IlvManager.getManagerLayer(ilog.views.IlvGraphic)
protected Object beforeInvalidateRegion(IlvGraphic object, IlvManagerView view, IlvTransformer t)
beforeInvalidateRegion
in class IlvManager
protected boolean afterInvalidateRegion(IlvGraphic object, IlvRect objectBBox, IlvManagerView view, IlvTransformer t, Object info)
afterInvalidateRegion
in class IlvManager
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.