ilog.cpl.equipment
Class IlpDefaultEquipmentSelectionModel

java.lang.Object
  extended by ilog.cpl.graph.IlpAbstractGraphSelectionModel
      extended by ilog.cpl.equipment.IlpAbstractEquipmentSelectionModel
          extended by ilog.cpl.equipment.IlpDefaultEquipmentSelectionModel
All Implemented Interfaces:
IlpEquipmentSelectionModel, IlpGraphSelectionModel, IlpObjectSelectionModel, IlpRepresentationObjectSelectionModel

public class IlpDefaultEquipmentSelectionModel
extends IlpAbstractEquipmentSelectionModel

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

Since:
JTGO 4.0

Field Summary
 
Fields inherited from class ilog.cpl.graph.IlpAbstractGraphSelectionModel
helper
 
Constructor Summary
IlpDefaultEquipmentSelectionModel()
          Creates an equipment selection model, which is able to manage an unordered set of selected objects.
 
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.equipment.IlpAbstractEquipmentSelectionModel
addEquipmentSelectionListener, fireEquipmentSelectionEvent, removeEquipmentSelectionListener
 
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

IlpDefaultEquipmentSelectionModel

public IlpDefaultEquipmentSelectionModel()
Creates an equipment selection model, which is able to manage an unordered set of selected objects. When this set changes, EquipmentSelectionEvents are sent.

Since:
JViews 8.0
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 has already been 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 has already been 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.