ilog.views.sdm.graphic
Class IlvSDMCompositeNode

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.graphic.IlvGraphicSet
          extended by ilog.views.graphic.composite.IlvCompositeGraphic
              extended by ilog.views.sdm.graphic.IlvSDMCompositeNode
All Implemented Interfaces:
GraphicBagHierarchyEventReceiver, ManagerSelectionListener, ManagerViewsHierarchyEventReceiver, IlvHotSpot, IlvComposite, IlvAttachmentBounds, IlvDefinitionRectInterface, IlvGraphicBag, IlvLabelInterface, IlvPersistentObject, ilog.views.sdm.internal.labellayout.IlvSDMLabeledNode, Transferable, Serializable, EventListener

public class IlvSDMCompositeNode
extends IlvCompositeGraphic
implements ilog.views.sdm.internal.labellayout.IlvSDMLabeledNode

This class adds layering features to the IlvSDMCompositeNode class.

Since:
JViews 6.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class ilog.views.graphic.IlvGraphicSet
IlvGraphicSet.DelegateObjectInteractor
 
Field Summary
 
Fields inherited from class ilog.views.graphic.composite.IlvCompositeGraphic
BaseBorderSelection, BaseHandleSelection, CompositeHandleSelection, InvisibleSelection, ResizingBase, ResizingComposite, TransformationModeAll, TransformationModeBaseOnly
 
Fields inherited from class ilog.views.graphic.IlvGraphicSet
list
 
Constructor Summary
IlvSDMCompositeNode()
          Creates an IlvSDMCompositeNode instance.
IlvSDMCompositeNode(IlvInputStream stream)
          Reads the object from an IlvInputStream.
IlvSDMCompositeNode(IlvLayoutManager layout)
          Creates an IlvCompositeGraphic instance with the specified layout.
IlvSDMCompositeNode(IlvSDMCompositeNode source)
          Creates a new IlvCompositeGraphic by copying an existing one.
 
Method Summary
 void applyTransform(IlvTransformer t)
          Applies a transformation to the shape of the object.
 IlvGraphic copy()
          Returns a copy of this composite node.
protected  IlvGraphic getGraphicBag(int index)
          Returns the graphic of the child at the specified position.
 int[] getLayers()
          Returns the layers of the children of this IlvSDMCompositeNode instance.
 int getLayers(int index)
          Returns the layer of the child at the specified position, or -1 if the child at the specified position is in the same layer as this IlvSDMCompositeNode.
protected  void removeChild(int index)
          Removes the child at the specified position.
 void removeCompositeParts(boolean redraw)
          Removes all the IlvCompositePart instances from the manager
 void selectionChanged(ManagerSelectionChangedEvent event)
          This method is called when the selection changes in a manager.
 void setGraphicBag(IlvGraphicBag bag)
          Changes the bag that contains the object.
 void setLayers(int[] layers)
          Sets the layers of all the children of this object.
 void setLayers(int index, int layer)
          Sets the layer of the child at the specified position.
 void updateLabelingModel(IlvSDMEngine engine, IlvAnnealingLabelLayout layout, ilog.views.sdm.internal.labellayout.IlvSDMLabelingModel model, Object node, IlvGraphic graphic)
          You should not call this method directly.
 void write(IlvOutputStream stream)
          Writes the object to an IlvOutputStream.
 
Methods inherited from class ilog.views.graphic.composite.IlvCompositeGraphic
addChild, boundingBox, contains, doLayout, drawCore, getAction, getAttachableGraphic, getAttachables, getAttachmentBounds, getAttachmentBounds, getChildren, getChildren, getConstraints, getConstraints, getDefinitionRect, getDefinitionTransformer, getEventMap, getEventMaps, getEventMaps, getHotSpot, getIntersectionWithOutline, getLabel, getLabelBBox, getLayout, getLinkClippables, getLinkClippables, getObject, getParent, getResizingPolicy, getRoot, getSelectionType, getTransformationMode, getVisibilityThresholds, getVisibilityThresholds, hasActions, invalidate, isEmpty, isJViews80BoundingBoxCompatibility, isSensitive, isValid, isVisible, makeSelection, moveResize, reshapeObject, resize, rotate, scale, setChildren, setChildren, setConstraints, setConstraints, setDefinitionRect, setEventMap, setEventMaps, setEventMaps, setJViews80BoundingBoxCompatibility, setLabel, setLayout, setLayoutEnabled, setLinkClippables, setLinkClippables, setResizingPolicy, setSelectionType, setSensitive, setTransformationMode, setVisibilityThresholds, setVisibilityThresholds, supportMultiline, validate, zoomable
 
Methods inherited from class ilog.views.graphic.IlvGraphicSet
addGraphicBagHierarchyListener, addManagerViewsHierarchyListener, addObject, addObjectAt, applyToObject, contains, draw, enableGraphicBagHierarchyEventForwarding, enableManagerViewsHierarchyEventForwarding, fireGraphicBagHierarchyEvent, fireManagerViewsHierarchyEvent, firstContains, getAlpha, getCardinal, getClip, getIndex, getObject, getObjectName, getObjects, getOriginalPopupMenu, getPopupMenu, getToolTipText, isPersistent, moveObject, needsGraphicBagHierarchyEvent, needsManagerViewsHierarchyEvent, reDrawObj, reDrawRegion, removeAll, removeGraphicBagHierarchyListener, removeManagerViewsHierarchyListener, removeObject, removeObjectAt, setAlpha, setClip, setObjectName
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isSelectable, move, move, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, setBackground, setEditable, setFillOn, setForeground, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, 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

IlvSDMCompositeNode

public IlvSDMCompositeNode()
Creates an IlvSDMCompositeNode instance.

Since:
JViews 6.0

IlvSDMCompositeNode

public IlvSDMCompositeNode(IlvLayoutManager layout)
Creates an IlvCompositeGraphic instance with the specified layout.

Parameters:
layout - The layout to be used to position the children of this object.
See Also:
IlvCompositeGraphic.setLayout(ilog.views.graphic.composite.layout.IlvLayoutManager), IlvCompositeGraphic.getLayout(), IlvAttachmentLayout, IlvCenteredLayout, IlvStackerLayout

IlvSDMCompositeNode

public IlvSDMCompositeNode(IlvInputStream stream)
                    throws IlvReadFileException
Reads the object from an IlvInputStream.

Parameters:
stream - The input stream.
Throws:
IlvReadFileException - if the format is not correct.

IlvSDMCompositeNode

public IlvSDMCompositeNode(IlvSDMCompositeNode source)
Creates a new IlvCompositeGraphic by copying an existing one.

Method Detail

copy

public IlvGraphic copy()
Returns a copy of this composite node.

Overrides:
copy in class IlvCompositeGraphic
Returns:
A new composite node that is a copy of this one.
See Also:
IlvGraphic

setLayers

public void setLayers(int[] layers)
Sets the layers of all the children of this object.

Parameters:
layers - The array of the layers for the children of this object. Each value is an integer that denotes the layer for the child at the specified position. If the value is -1 the child belongs to the layer of this IlvCompositeGraphic instance.

setLayers

public void setLayers(int index,
                      int layer)
Sets the layer of the child at the specified position.

Parameters:
index - The index of the child.
layer - The layer in which the child should be inserted. Note that if the manager does not have a layer that corresponds to this index, the manager automatically increases the number of layers by calling setNumberOfLayer. If the value is -1, the child at the specified position belongs to the layer of this IlvCompositeGraphic instance.

getLayers

public int getLayers(int index)
Returns the layer of the child at the specified position, or -1 if the child at the specified position is in the same layer as this IlvSDMCompositeNode.

Overrides:
getLayers in class IlvCompositeGraphic
Returns:
The layer of the child at the specified position, or -1 if the child at the specified position is in the same layer as this IlvSDMCompositeNode.

getLayers

public int[] getLayers()
Returns the layers of the children of this IlvSDMCompositeNode instance.

Returns:
An array of integer. At each position, there is the layer of the corresponding child or -1 if the child is in the same layer as this IlvCompositeGraphic.

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the object to an IlvOutputStream. You should not call this method directly; instead, you should use the write methods of the manager.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvCompositeGraphic
Parameters:
stream - The output stream.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

removeChild

protected void removeChild(int index)
Removes the child at the specified position.

Overrides:
removeChild in class IlvCompositeGraphic
Parameters:
index - The position of the child to be removed.

getGraphicBag

protected IlvGraphic getGraphicBag(int index)
Returns the graphic of the child at the specified position.

Overrides:
getGraphicBag in class IlvCompositeGraphic

selectionChanged

public void selectionChanged(ManagerSelectionChangedEvent event)
This method is called when the selection changes in a manager.

Specified by:
selectionChanged in interface ManagerSelectionListener
Overrides:
selectionChanged in class IlvCompositeGraphic
Parameters:
event - The "selection changed" event.
See Also:
IlvManager.addManagerSelectionListener(ilog.views.event.ManagerSelectionListener), IlvManager.removeManagerSelectionListener(ilog.views.event.ManagerSelectionListener), IlvManager.addManagerTreeSelectionListener(ilog.views.event.ManagerSelectionListener), IlvManager.removeManagerTreeSelectionListener(ilog.views.event.ManagerSelectionListener), IlvManager.selectionChanged(ilog.views.IlvGraphic)

setGraphicBag

public void setGraphicBag(IlvGraphicBag bag)
Changes the bag that contains the object. You should not call this method directly unless you are creating a new type of bag.

Overrides:
setGraphicBag in class IlvCompositeGraphic
Parameters:
bag - The graphic bag.
See Also:
IlvGraphic

removeCompositeParts

public void removeCompositeParts(boolean redraw)
Removes all the IlvCompositePart instances from the manager

Parameters:
redraw - If true the object is redrawn.

applyTransform

public void applyTransform(IlvTransformer t)
Applies a transformation to the shape of the object.

Note that the method must never be called with a null argument.

Overrides:
applyTransform in class IlvCompositeGraphic
Parameters:
t - The transformer to be applied.
See Also:
IlvGraphic

updateLabelingModel

public void updateLabelingModel(IlvSDMEngine engine,
                                IlvAnnealingLabelLayout layout,
                                ilog.views.sdm.internal.labellayout.IlvSDMLabelingModel model,
                                Object node,
                                IlvGraphic graphic)
You should not call this method directly.

Specified by:
updateLabelingModel in interface ilog.views.sdm.internal.labellayout.IlvSDMLabeledNode


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