ilog.cpl.table.selection
Interface IlpTableSelectionModel

All Superinterfaces:
IlpObjectSelectionModel, IlpRepresentationObjectSelectionModel
All Known Implementing Classes:
IlpDefaultTableSelectionModel

public interface IlpTableSelectionModel
extends IlpRepresentationObjectSelectionModel, IlpObjectSelectionModel

Defines the selection model API for table views.

Since:
JTGO 3.0

Method Summary
 void addSelection(IlpArea area)
          Adds an IlpArea to the selection.
 void addSelection(IlpRepresentationObject object, IlpAttribute attribute)
          Adds a new selection.
 void addSelectionListener(TableSelectionListener listener)
          Registers a listener to selection change events.
 void clearSelection()
          Clears the selection.
 IlpAttribute getAnchorAttribute()
          Returns the attribute which has the focus.
 IlpRepresentationObject getAnchorObject()
          Returns the representation object which has the focus.
 IlpArea getLeadSelection()
          Retrieves the IlpArea composing the temporary lead selection.
 IlpRepresentationObjectMapper getRepresentationObjectMapper()
          Returns the IlpRepresentationObjectMapper used to find the IlpRepresentationObject associated with an IlpObject.
 Collection getSelection()
          Retrieves the collection of IlpAreas composing the selection.
 boolean isAdjusting()
          Returns if the selection model is currently being adjusted.
 boolean isSelected(IlpArea area)
          Returns whether an IlpArea is selected.
 boolean isSelected(IlpRepresentationObject object, IlpAttribute attribute)
          Returns whether a cell (that is, an attribute for a representation object) is selected.
 void removeSelection(IlpArea toRemove)
          Removes an IlpArea from the selection.
 void removeSelection(IlpRepresentationObject object, IlpAttribute attribute)
          Removes an attribute for a representation object from the selection.
 void removeSelectionListener(TableSelectionListener listener)
          Removes a listener to object selection events.
 void setAdjusting(boolean adjusting)
          Indicates that the selection model will be changed.
 void setAnchor(IlpRepresentationObject object, IlpAttribute attribute)
          Sets the cell (that is, the attribute of the representation object) which has the focus in the table.
 void setLeadSelection(IlpArea newLeadSelection)
          Sets the IlpArea composing the temporary lead selection.
 void setRepresentationObjectMapper(IlpRepresentationObjectMapper representationObjectMapper)
          Sets the IlpRepresentationObjectMapper which will be used to find the IlpRepresentationObject associated with an IlpObject.
 void setSelection(IlpArea newSelection)
          Applies a new selection.
 void setSelection(IlpRepresentationObject object, IlpAttribute attribute)
          Applies a new selection.
 
Methods inherited from interface ilog.cpl.util.selection.IlpRepresentationObjectSelectionModel
addSelectionRepresentationObject, getSelectedRepresentationObject, getSelectedRepresentationObjects, isRepresentationObjectSelected, removeSelectionRepresentationObject, removeSelectionRepresentationObjects, setSelectedRepresentationObject, setSelectedRepresentationObjects
 
Methods inherited from interface ilog.cpl.util.selection.IlpObjectSelectionModel
addSelectionObject, getSelectedObject, getSelectedObjects, isObjectSelected, removeSelectionObject, setSelectedObject, setSelectedObjects
 

Method Detail

setSelection

void setSelection(IlpRepresentationObject object,
                  IlpAttribute attribute)
Applies a new selection.

Parameters:
object - The representation object whose attribute will be selected; the entire row of the given representation object is selected if the given attribute equals null.
attribute - The attribute which will be selected for the given representation object; the entire column of the given attribute is selected if the given representation object equals null.

setSelection

void setSelection(IlpArea newSelection)
Applies a new selection.

Parameters:
newSelection - The area which will become the new selection; if this parameter equals null, the selection will be cleared.

getSelection

Collection getSelection()
Retrieves the collection of IlpAreas composing the selection.

Returns:
A collection of the selected IlpAreas; returns an empty collection when there is no selected area.

setLeadSelection

void setLeadSelection(IlpArea newLeadSelection)
Sets the IlpArea composing the temporary lead selection.

Parameters:
newLeadSelection - The IlpArea composing the lead selection; if this parameter equals null, the lead selection will be removed.

getLeadSelection

IlpArea getLeadSelection()
Retrieves the IlpArea composing the temporary lead selection.

Returns:
The IlpArea composing the lead selection; returns null if there is no lead selection.

addSelection

void addSelection(IlpRepresentationObject object,
                  IlpAttribute attribute)
Adds a new selection.

Parameters:
object - the representation object whose attribute will be added to the selection; the entire row of the given representation object is selected if the given attribute equals null.
attribute - the attribute which will be added to the selection for the given representation object; the entire column of the given attribute is selected if the given representation object equals null.

addSelection

void addSelection(IlpArea area)
Adds an IlpArea to the selection.

Parameters:
area - The area which will added to the current selection; if this parameter equals null, the selection will be cleared.

removeSelection

void removeSelection(IlpRepresentationObject object,
                     IlpAttribute attribute)
Removes an attribute for a representation object from the selection.

Parameters:
object - The representation object whose attribute will be removed from the selection; the entire row of the given representation object is deselected if the given attribute equals null.
attribute - The attribute which will be removed from the selection for the given representation object; the entire column of the given attribute is deselected if the given representation object equals null.

removeSelection

void removeSelection(IlpArea toRemove)
Removes an IlpArea from the selection.

Parameters:
toRemove - The area which will be removed from the current selection; if this parameter equals null, the method has no effect.

clearSelection

void clearSelection()
Clears the selection.

Specified by:
clearSelection in interface IlpObjectSelectionModel
Specified by:
clearSelection in interface IlpRepresentationObjectSelectionModel

isSelected

boolean isSelected(IlpRepresentationObject object,
                   IlpAttribute attribute)
Returns whether a cell (that is, an attribute for a representation object) is selected.

Parameters:
object - The representation object whose attribute is selected or not.
attribute - The attribute which is selected or not for the given representation object.
Returns:
true if the cell displaying the given attribute for the given representation object is selected.

isSelected

boolean isSelected(IlpArea area)
Returns whether an IlpArea is selected.

Parameters:
area - The area concerned.
Returns:
true if the cell displaying the given attribute for the given representation object is selected.

setAnchor

void setAnchor(IlpRepresentationObject object,
               IlpAttribute attribute)
Sets the cell (that is, the attribute of the representation object) which has the focus in the table.

Parameters:
object - The representation object which currently has the focus; may be null.
attribute - The attribute which currently has the focus; may be null.

getAnchorObject

IlpRepresentationObject getAnchorObject()
Returns the representation object which has the focus.

Returns:
The representation object which currently has the focus; may be null.

getAnchorAttribute

IlpAttribute getAnchorAttribute()
Returns the attribute which has the focus.

Returns:
The attribute which currently has the focus; may be null.

isAdjusting

boolean isAdjusting()
Returns if the selection model is currently being adjusted. return true if changes are being performed in the selection model.


setAdjusting

void setAdjusting(boolean adjusting)
Indicates that the selection model will be changed.

Parameters:
adjusting - Flag indicating if changes are being performed or not in the selection model.

addSelectionListener

void addSelectionListener(TableSelectionListener listener)
Registers a listener to selection change events.

Parameters:
listener - The listener to be registered.

removeSelectionListener

void removeSelectionListener(TableSelectionListener listener)
Removes a listener to object selection events.

Parameters:
listener - The listener to be removed.

setRepresentationObjectMapper

void setRepresentationObjectMapper(IlpRepresentationObjectMapper representationObjectMapper)
Sets the IlpRepresentationObjectMapper which will be used to find the IlpRepresentationObject associated with an IlpObject.

Parameters:
representationObjectMapper - The representation object mapper to be used. If this parameter is null, the IlpObject selection API has no effect.

getRepresentationObjectMapper

IlpRepresentationObjectMapper getRepresentationObjectMapper()
Returns the IlpRepresentationObjectMapper used to find the IlpRepresentationObject associated with an IlpObject.

Returns:
The representation object mapper used; can be null.


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