ilog.cpl.network
Class IlpDefaultNetworkSelectionModel

java.lang.Object
  extended by ilog.cpl.graph.IlpAbstractGraphSelectionModel
      extended by ilog.cpl.network.IlpAbstractNetworkSelectionModel
          extended by ilog.cpl.network.IlpDefaultNetworkSelectionModel
All Implemented Interfaces:
IlpGraphSelectionModel, IlpNetworkSelectionModel, IlpObjectSelectionModel, IlpRepresentationObjectSelectionModel

public class IlpDefaultNetworkSelectionModel
extends IlpAbstractNetworkSelectionModel

This is the default implementation of IlpNetworkSelectionModel. It manages an unordered set of selected objects. When this set changes, NetworkSelectionEvents are sent.

Since:
JTGO 3.0

Field Summary
 
Fields inherited from class ilog.cpl.graph.IlpAbstractGraphSelectionModel
helper
 
Constructor Summary
IlpDefaultNetworkSelectionModel()
           
 
Method Summary
 void addSelectionObject(IlpObject object)
          Adds the given IlpObject to the selection.
 void addSelectionRepresentationObject(IlpRepresentationObject object)
          Adds the given IlpRepresentationObject to the selection.
 void clearSelection()
          Clears the selection.
 IlpObject getSelectedObject()
          Returns the first selected IlpObject from the collection of selected objects.
 Collection getSelectedObjects()
          Returns the set of selected IlpObjects.
 IlpRepresentationObject getSelectedRepresentationObject()
          Returns a IlpRepresentationObject from the collection of selected representation objects.
 Collection getSelectedRepresentationObjects()
          Returns the set of selected IlpRepresentationObjects.
 boolean isObjectSelected(IlpObject object)
          Returns true if the given IlpObject is selected, false otherwise.
 boolean isRepresentationObjectSelected(IlpRepresentationObject object)
          Returns true if the given IlpRepresentationObject is selected, false otherwise.
 void removeSelectionObject(IlpObject object)
          Removes the given IlpObject from the selection.
 void removeSelectionRepresentationObject(IlpRepresentationObject object)
          Removes the given IlpRepresentationObject from the selection.
 void removeSelectionRepresentationObjects(Collection ros)
          Removes the given IlpRepresentationObjects from the selection.
 void setSelectedObject(IlpObject object)
          Sets the selected IlpObject.
 void setSelectedObjects(Collection objects)
          Sets the set of selected IlpObjects.
 void setSelectedRepresentationObject(IlpRepresentationObject object)
          Sets the selected IlpRepresentationObject.
 void setSelectedRepresentationObjects(Collection selected)
          Sets the set of selected IlpRepresentationObjects.
 
Methods inherited from class ilog.cpl.network.IlpAbstractNetworkSelectionModel
addNetworkSelectionListener, fireNetworkSelectionEvent, removeNetworkSelectionListener
 
Methods inherited from class ilog.cpl.graph.IlpAbstractGraphSelectionModel
addSelectionListener, fireGraphSelectionEvent, getRepresentationObjectMapper, removeSelectionListener, setRepresentationObjectMapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.cpl.graph.IlpGraphSelectionModel
getRepresentationObjectMapper, setRepresentationObjectMapper
 

Constructor Detail

IlpDefaultNetworkSelectionModel

public IlpDefaultNetworkSelectionModel()
Method Detail

getSelectedRepresentationObject

public IlpRepresentationObject getSelectedRepresentationObject()
Returns a IlpRepresentationObject from the collection of selected representation objects. Returns null if there is no selected object.

Returns:
the first selected representation object, or null if the selection is empty.

getSelectedRepresentationObjects

public Collection getSelectedRepresentationObjects()
Returns the set of selected IlpRepresentationObjects. The set should be ordered if the component implementing this interface supports an ordered selection. Returns an empty set if there is no selected object.

Returns:
An unmodifiable Collection of IlpRepresentationObjects.

setSelectedRepresentationObject

public void setSelectedRepresentationObject(IlpRepresentationObject object)
Sets the selected IlpRepresentationObject. This has no effect if the given object is already selected.

Parameters:
object - The object that will become the selection.

setSelectedRepresentationObjects

public void setSelectedRepresentationObjects(Collection selected)
Sets the set of selected IlpRepresentationObjects.

Parameters:
selected - The collection of representation objects that will become the selection.

isRepresentationObjectSelected

public boolean isRepresentationObjectSelected(IlpRepresentationObject object)
Returns true if the given IlpRepresentationObject is selected, false otherwise.

Parameters:
object - The representation object which may be selected.

addSelectionRepresentationObject

public void addSelectionRepresentationObject(IlpRepresentationObject object)
Adds the given IlpRepresentationObject to the selection. This has no effect if the given object is null or if it is already selected.

Parameters:
object - The representation object that will be added to the selection.

removeSelectionRepresentationObject

public void removeSelectionRepresentationObject(IlpRepresentationObject object)
Removes the given IlpRepresentationObject from the selection. This has no effect if the given object is null or if it is currently unselected.

Parameters:
object - The representation object that will be removed from the selection.

removeSelectionRepresentationObjects

public void removeSelectionRepresentationObjects(Collection ros)
Removes the given IlpRepresentationObjects from the selection. This has no effect if the given objects are null or if they are currently unselected.

Parameters:
ros - The collection of representation objects to be removed
Since:
JViews 7.5

clearSelection

public void clearSelection()
Clears the selection.


getSelectedObject

public IlpObject getSelectedObject()
Returns the first selected IlpObject from the collection of selected objects. Returns null if there is no selected object.


getSelectedObjects

public Collection getSelectedObjects()
Returns the set of selected IlpObjects. The set should be ordered if the component implementing this interface supports an ordered selection. Returns an empty set if there is no selected object.

Returns:
An unmodifiable Collection of IlpObjects.

setSelectedObject

public void setSelectedObject(IlpObject object)
Sets the selected IlpObject. This has no effect if the given object is already selected.

Parameters:
object - The object that will become the selection.

setSelectedObjects

public void setSelectedObjects(Collection objects)
Sets the set of selected IlpObjects.

Parameters:
objects - The collection of objects that will become the selection.

isObjectSelected

public boolean isObjectSelected(IlpObject object)
Returns true if the given IlpObject is selected, false otherwise.

Parameters:
object - The object which may be selected.

addSelectionObject

public void addSelectionObject(IlpObject object)
Adds the given IlpObject to the selection. This has no effect if the given object is null or if it is already selected.

Parameters:
object - The object that will be added to the selection.

removeSelectionObject

public void removeSelectionObject(IlpObject object)
Removes the given IlpObject from the selection. This has no effect if the given object is null or if it is currently unselected.

Parameters:
object - The object that will be removed from the selection.


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