ilog.tgo.graphic
Class IltNetwork

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

public class IltNetwork
extends IlvGrapher

This subclass of IlvGrapher instantiates its own IltCompositeGrapher, and optionally it instantiates a sample network.

Since:
JTGO 2.0
See Also:
Serialized Form

Field Summary
protected  IltObjectSource _sampleNetwork
          Deprecated.  
 
Fields inherited from class ilog.views.IlvManager
HH_BLUR, HH_BRIGHTEN, HH_CUSTOM, HH_GRAYSCALE, HH_INVERT_COLORS, HH_NONE, HH_SHARPEN
 
Constructor Summary
IltNetwork()
          Deprecated. Please use the Network Component instead.
IltNetwork(boolean createSampleNetwork)
          Deprecated. Please use the Network Component instead.
IltNetwork(IlpContext context)
          Instantiates an IltCompositeGrapher and attaches it to this IltNetwork.
IltNetwork(IlpContext context, boolean createSampleNetwork)
          Deprecated. Please use the Network Component instead.
 
Method Summary
 void addManagerContentChangedListener(ManagerContentChangedListener listener)
          Catch a frequent mistake of many customers: they add a graph layout directly to the IlvGrapher, or create a new IltGrapherAdapter().
 void addNetwork(IltNetwork aSubNetwork)
          Adds a subnetwork to the network.
 void addNetwork(IltNetwork aSubNetwork, boolean visible)
           
 void addPropertyChangeListener(PropertyChangeListener listener)
           
static void ApplyScaleToSubNetwork(IlvManager grapher, IlvManager subgrapher, double factor)
          Applies a scale factor to an expanded subnetwork.
 IlvRect computeExpansionBBox()
          This method is used by IltExpandCollapseInteractor (method SetCollapsed) instead of the corresponding computeBBox(IlvTransformer) in IlvManager.
protected  IltCompositeGrapher createCompositeGrapher(IlpContext context)
          Creates the IltCompositeGrapher used by this instance.
 IltCompositeGrapher getCompositeGrapher()
          Returns the IltCompositeGrapher attached to this IltNetwork.
 URL getFileName()
          Returns the IVL file read in the background of the IltNetwork.
 IlvGraphLayout getLinkLayout()
          Deprecated. Use IlpGraphView.getLinkLayout() instead.
 IlvGraphLayout getNodeLayout()
          Deprecated. Use IlpGraphView.getNodeLayout() instead.
 IltCompositeGraphic getOverviewCompositeGraphic()
          Returns the graphic representation of the overview object (in the parent IlvManager).
 ilog.tgo.model.internal.IltSubNetwork getSubNetwork()
          Returns the associated IltSubNetwork, used for interactors.
 IltCompositeGraphic getSubNetworkCompositeGraphic()
          Returns the associated IltSubNetwork's graphic representation, used for interactors.
 IltZoomPolicy getZoomPolicy()
          Returns the zoom policy of this manager.
 boolean isBackgroundSelectable()
          Returns the values set using setBackgroundSelectable.
 boolean isCreateSampleNetwork()
          Deprecated. Please use the Network Component instead.
 IlvSelection makeSelection()
          Creates a selection object for this object.
static void MoveSubNetwork(IlvManager grapher, IlvManager subgrapher, double centerX, double centerY)
          Moves an expanded subnetwork to a given point in manager coordinates.
 void removeNetwork(IltNetwork aSubNetwork)
          Removes a subnetwork from the network.
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void setBackgroundSelectable(boolean selectable)
          Specifies whether the background loaded using setFileName should be selectable or not.
 void setContentsAdjusting(boolean set)
          Tells the manager that it is the beginning or the end of a major modification of its contents.
protected  void setContentsAdjustingInHierarchy(boolean set)
           
 void setCreateSampleNetwork(boolean create)
          Deprecated. Please use the Network Component instead.
 void setFileName(URL backgroundURL)
          Loads an IVL file in the IltNetwork and places it in the background.
 void setLinkLayout(IlvGraphLayout layout)
          Deprecated. Use IlpGraphView.setLinkLayout(IlvGraphLayout) instead.
 void setNodeLayout(IlvGraphLayout layout)
          Deprecated. Use IlpGraphView.setGraphLayouts(IlvGraphLayout[]) instead.
 void setOverviewCompositeGraphic(IltCompositeGraphic overviewCompositeGraphic)
          Sets the graphic representation of the overview object.
 void setZoomPolicy(IltZoomPolicy zoomPolicy)
          Changes the zoom policy of this manager.
 void updateNetworkLayer(IltNetwork aSubNetwork)
          Updates the subnetwork layer's according to the layer policy.
 
Methods inherited from class ilog.views.IlvGrapher
addInterGraphLink, addLink, addLink, addNode, addNode, addObject, afterTransformDependentObjs, afterTransformObj, beforeTransformDependentObjs, beforeTransformObj, copy, getBoundingBoxDependentObjects, getExternalInterGraphLinks, getExternalInterGraphLinksCount, getFromNeighbors, getInterGraphLinks, getInterGraphLinksCount, getLinks, getLinksCount, getLinksFrom, getLinksFromCount, getLinksInsertionLayer, getLinksTo, getLinksToCount, getLinksVisibleFrom, getLinksVisibleFromCount, getLinksVisibleTo, getLinksVisibleToCount, getLowestCommonGrapher, getNeighbors, getSelectedMovingObjects, getToNeighbors, getTreeExternalInterGraphLinks, getTreeExternalInterGraphLinksCount, isInterGraphLink, isLink, isLinkBetween, isMarked, isNode, isNodeOrLink, makeNode, makeObjectProperty, nodeHasSons, removeLink, removeNode, removeObject, replaceObject, setLinksInsertionLayer, setMarked, setVisibleBranch, setVisibleBranch, unmakeNode
 
Methods inherited from class ilog.views.IlvManager
abortReDraws, addAccelerator, addGraphicBagHierarchyListener, addLayer, addLayer, 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, 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, setEditable, 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, 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
 

Field Detail

_sampleNetwork

protected IltObjectSource _sampleNetwork
Deprecated. 
Internal method or field: do not use!
Constructor Detail

IltNetwork

public IltNetwork()
Deprecated. Please use the Network Component instead.

Instantiates an IltCompositeGrapher and attaches it to this IltNetwork. A sample network is created and displayed. The result is identical to instantiating the IltNetwork with new IltNetwork(true).

See Also:
IlpNetwork
Deprecated Since:
JTGO 3.5

IltNetwork

public IltNetwork(boolean createSampleNetwork)
Deprecated. Please use the Network Component instead.

Instantiates an IltCompositeGrapher and attaches it to this IltNetwork.

Note: This constructor calls IltSystem.Init().

Parameters:
createSampleNetwork - Indicates whether a sample network should be created or not. This feature is mainly provided for the JavaBeans version of the IltNetwork.
See Also:
IlpNetwork
Deprecated Since:
JTGO 3.5

IltNetwork

public IltNetwork(IlpContext context,
                  boolean createSampleNetwork)
Deprecated. Please use the Network Component instead.

Instantiates an IltCompositeGrapher and attaches it to this IltNetwork.

Note: This constructor calls IltSystem.Init().

Parameters:
createSampleNetwork - Indicates whether a sample network should be created or not. This feature is mainly provided for the JavaBeans version of the IltNetwork.
Since:
JTGO 3.1
Deprecated Since:
JTGO 3.5

IltNetwork

public IltNetwork(IlpContext context)
Instantiates an IltCompositeGrapher and attaches it to this IltNetwork.

Parameters:
context - The JViews TGO context to be applied.
Since:
JTGO 4.5
See Also:
IlpGraphView.createGrapher(IlpContext)
Method Detail

createCompositeGrapher

protected IltCompositeGrapher createCompositeGrapher(IlpContext context)
Creates the IltCompositeGrapher used by this instance.

Parameters:
context - Application context
Returns:
Composite grapher
Since:
JViews 7.5

getCompositeGrapher

public IltCompositeGrapher getCompositeGrapher()
Returns the IltCompositeGrapher attached to this IltNetwork.


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Internal method or field: do not use!

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Internal method or field: do not use!

setFileName

public void setFileName(URL backgroundURL)
                 throws IOException,
                        IlvReadFileException
Loads an IVL file in the IltNetwork and places it in the background.

This method does not remove any object from the manager before reading the specified IVL file. Note that before loading the contents of the file, all the layers used by any previously read file will be removed from the manager; other layers, such as those containing ILOG JTGO objects will not be removed. If the backgroundURL argument is null, the previously read background will be removed.

Overrides:
setFileName in class IlvManager
Parameters:
backgroundURL - The URL of an IVL file, or null.
Throws:
IOException
IlvReadFileException
See Also:
getFileName()

getFileName

public URL getFileName()
Returns the IVL file read in the background of the IltNetwork. This method returns the URL of the IVL file read by the method setFileName, or it returns null if no IVL file was read by this same method.

Overrides:
getFileName in class IlvManager
See Also:
setFileName(java.net.URL)

setBackgroundSelectable

public void setBackgroundSelectable(boolean selectable)
Specifies whether the background loaded using setFileName should be selectable or not.

The default value is false.

This implementation makes selectable or not selectable all the layers created when loading a background. The layers containing ILOG JTGO objects are not modified.

See Also:
setFileName(java.net.URL)

isBackgroundSelectable

public boolean isBackgroundSelectable()
Returns the values set using setBackgroundSelectable.

The default value is false.

See Also:
setBackgroundSelectable(boolean)

getNodeLayout

public IlvGraphLayout getNodeLayout()
Deprecated. Use IlpGraphView.getNodeLayout() instead.

Returns this manager's graph layout for nodes.

This method is equivalent to getCompositeGrapher().getNodeLayout();.

Returns:
A graph layout, or null if none has been specified.
Deprecated Since:
JTGO 7.5

getLinkLayout

public IlvGraphLayout getLinkLayout()
Deprecated. Use IlpGraphView.getLinkLayout() instead.

Returns this manager's graph layout for links.

This method is equivalent to getCompositeGrapher().getLinkLayout();.

Returns:
A graph layout, or null if none has been specified.
Deprecated Since:
JTGO 7.5

setNodeLayout

public void setNodeLayout(IlvGraphLayout layout)
Deprecated. Use IlpGraphView.setGraphLayouts(IlvGraphLayout[]) instead.

Changes the node layout of this manager.

This method is equivalent to getCompositeGrapher().setNodeLayout();.

Parameters:
layout - A graph layout or null.
Deprecated Since:
JTGO 7.5

setLinkLayout

public void setLinkLayout(IlvGraphLayout layout)
Deprecated. Use IlpGraphView.setLinkLayout(IlvGraphLayout) instead.

Changes the link layout of this manager.

This method is equivalent to getCompositeGrapher().setLinkLayout();.

Parameters:
layout - A graph layout or null.
Deprecated Since:
JTGO 7.5

getZoomPolicy

public IltZoomPolicy getZoomPolicy()
Returns the zoom policy of this manager.


setZoomPolicy

public void setZoomPolicy(IltZoomPolicy zoomPolicy)
Changes the zoom policy of this manager.

This method is equivalent to zoomPolicy.setManager(getCompositeGrapher()).

Parameters:
zoomPolicy - A zoom policy.

getSubNetwork

public ilog.tgo.model.internal.IltSubNetwork getSubNetwork()
Returns the associated IltSubNetwork, used for interactors.

Internal method or field: do not use!

getSubNetworkCompositeGraphic

public IltCompositeGraphic getSubNetworkCompositeGraphic()
Returns the associated IltSubNetwork's graphic representation, used for interactors.

Internal method or field: do not use!

getOverviewCompositeGraphic

public IltCompositeGraphic getOverviewCompositeGraphic()
Returns the graphic representation of the overview object (in the parent IlvManager).

Internal method or field: do not use!

setOverviewCompositeGraphic

public void setOverviewCompositeGraphic(IltCompositeGraphic overviewCompositeGraphic)
Sets the graphic representation of the overview object.

Internal method or field: do not use!

addNetwork

public void addNetwork(IltNetwork aSubNetwork)
Adds a subnetwork to the network.

Parameters:
aSubNetwork - A subnetwork
Since:
JTGO 3.0

addNetwork

public void addNetwork(IltNetwork aSubNetwork,
                       boolean visible)
Parameters:
aSubNetwork - Subnetwork
visible - Visibility status
Internal method or field: do not use!

removeNetwork

public void removeNetwork(IltNetwork aSubNetwork)
Removes a subnetwork from the network.

Since:
JTGO 3.0

updateNetworkLayer

public void updateNetworkLayer(IltNetwork aSubNetwork)
Updates the subnetwork layer's according to the layer policy.

Internal method or field: do not use!

computeExpansionBBox

public IlvRect computeExpansionBBox()
This method is used by IltExpandCollapseInteractor (method SetCollapsed) instead of the corresponding computeBBox(IlvTransformer) in IlvManager.

The difference between both methods is that IlvManager will compute the bbox of every visible graphic on every visible layer and this method will only take into account the proxies for business objects (instances of IltcCompositeLayoutProxy - IltcCompositeLinkLayoutProxy is *not* taken into account).

This is needed when collapsing and expanding the subnetwork, only the position of children nodes must be taken into account, otherwise the collapsed representation would be moved when alarm balloons, opened system windows and other borders are present on a children object. This is also true for the links, the shape of the link should not be taken into account.

Returns:
The computed bounding box of surrounding only the (proxy to) children objects, no border nor decorations are considered.
Internal method or field: do not use!

setContentsAdjusting

public void setContentsAdjusting(boolean set)
Description copied from class: IlvManager
Tells the manager that it is the beginning or the end of a major modification of its contents. This method allows you to notify the manager that you are doing a major modification of its contents, for example by adding or removing many objects.

The method must be used in the following way:

    manager.setContentsAdjusting(true);
    try {
      add or remove a lot of objects.
    } finally {
      manager.setContentsAdjusting(false);
    }
 

When setContentsAdjusting is called with true, the ManagerContentChangedEvent events sent by methods such as addObject, removeObject, or applyToObject will contain a flag indicating that the contents of the manager are currently being adjusted. To test this flag use the isAdjusting method.

When called with false, to notify the end of a major modification of the contents, this method fires a ManagerContentChangedEvent of type ADJUSTMENT_END. Note that this event is fired only if a change occurred in the manager (an object was added, for example).

Calls to setContentsAdjusting can be nested, as in the following code:

   manager.setContentsAdjusting(true);
     manager.setContentsAdjusting(true);
      // add or remove a lot of objects
     manager.setContentsAdjusting(false);
   manager.setContentsAdjusting(false);
 
The method isContentsAdjusting still returns true between the two calls to setContentsAdjusting(false). Only the last call ends the adjustment section and sends the event to notify the end of adjustment.

Overrides:
setContentsAdjusting in class IlvManager
See Also:
IlvManager.isContentsAdjusting(), IlvManager.setContentsAdjusting(boolean, boolean)
Internal method or field: do not use!

setContentsAdjustingInHierarchy

protected void setContentsAdjustingInHierarchy(boolean set)
Internal method or field: do not use!

makeSelection

public IlvSelection makeSelection()
Description copied from class: IlvGraphic
Creates a selection object for this object. The default implementation creates an instance of IlvDrawSelection.

Override this method in your custom graphic object to use a different selection object.

You should normally not call this method directly.

Overrides:
makeSelection in class IlvGraphic
See Also:
IlvDrawSelection
Internal method or field: do not use!

addManagerContentChangedListener

public void addManagerContentChangedListener(ManagerContentChangedListener listener)
Catch a frequent mistake of many customers: they add a graph layout directly to the IlvGrapher, or create a new IltGrapherAdapter().

Overrides:
addManagerContentChangedListener in class IlvManager
Parameters:
listener - The listener.
See Also:
IlvManager.removeManagerContentChangedListener(ilog.views.event.ManagerContentChangedListener), IlvManager.addManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener), IlvManager.removeManagerTreeContentChangedListener(ilog.views.event.ManagerContentChangedListener)
Internal method or field: do not use!

setCreateSampleNetwork

public void setCreateSampleNetwork(boolean create)
Deprecated. Please use the Network Component instead.

Specifies whether a sample network should be created or not.

See Also:
IlpNetwork
Deprecated Since:
JTGO 3.5

isCreateSampleNetwork

public boolean isCreateSampleNetwork()
Deprecated. Please use the Network Component instead.

Returns true if a sample network has been created or false if not.

See Also:
IlpNetwork
Deprecated Since:
JTGO 3.5

MoveSubNetwork

public static void MoveSubNetwork(IlvManager grapher,
                                  IlvManager subgrapher,
                                  double centerX,
                                  double centerY)

Moves an expanded subnetwork to a given point in manager coordinates.

Parameters:
grapher - The subnetwork parent grapher
subgrapher - The subnetwork grapher
centerX - The new center point (X coordinate)
centerY - The new center point (Y coordinate)
Internal method or field: do not use!

ApplyScaleToSubNetwork

public static void ApplyScaleToSubNetwork(IlvManager grapher,
                                          IlvManager subgrapher,
                                          double factor)

Applies a scale factor to an expanded subnetwork.

Parameters:
grapher - The subnetwork parent grapher
subgrapher - The subnetwork grapher
factor - The scale factor to be applied
Internal method or field: do not use!


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