grendel.widgets
Interface SelectionManager

All Known Implementing Classes:
MultiSelectionManager, SingleSelectionManager

public abstract interface SelectionManager

Interface for simple selection management.

See Also:
MultiSelectionManager, SingleSelectionManager, SelectionListener

Method Summary
 void addSelection(java.util.Enumeration aObjects)
          Adds an array of objects to the selection.
 void addSelection(java.lang.Object aObject)
          Adds a single object to the selection.
 void addSelectionListener(SelectionListener aListener)
          Adds a selection listener
 void clearSelection()
          Removes all objects from the selection
 void contextClickSelection(java.awt.event.MouseEvent aEvent)
          Passed on to listeners
 void doubleClickSelection(java.awt.event.MouseEvent aEvent)
          Passed on to listeners
 void dragSelection(java.awt.event.MouseEvent aEvent)
          Passed on to listeners
 java.util.Enumeration getSelection()
          Returns an enumeration of all objects in the selection
 int getSelectionCount()
          Returns the number of objects in the selection
 boolean isSelected(java.lang.Object aObject)
          Returns true if the object is in the selection.
 void removeSelection(java.util.Enumeration aObjects)
          Removes an array of objects from the selection.
 void removeSelection(java.lang.Object aObject)
          Removes a single object from the selection.
 void removeSelectionListener(SelectionListener aListener)
          Removes a selection listener
 void setSelection(java.util.Enumeration aObjects)
          Sets the selection to be the given array of objects
 void setSelection(java.lang.Object aObject)
          Sets the selection to be a single object
 

Method Detail

clearSelection

public void clearSelection()
Removes all objects from the selection

setSelection

public void setSelection(java.lang.Object aObject)
Sets the selection to be a single object

setSelection

public void setSelection(java.util.Enumeration aObjects)
Sets the selection to be the given array of objects

addSelection

public void addSelection(java.lang.Object aObject)
Adds a single object to the selection. Notifies listeners if the selection changes.

addSelection

public void addSelection(java.util.Enumeration aObjects)
Adds an array of objects to the selection. Notifies listeners if the selection changes.

removeSelection

public void removeSelection(java.lang.Object aObject)
Removes a single object from the selection. Notifies listeners if the selection changes.

removeSelection

public void removeSelection(java.util.Enumeration aObjects)
Removes an array of objects from the selection. Notifies listeners if the selection changes.

isSelected

public boolean isSelected(java.lang.Object aObject)
Returns true if the object is in the selection.

getSelectionCount

public int getSelectionCount()
Returns the number of objects in the selection

getSelection

public java.util.Enumeration getSelection()
Returns an enumeration of all objects in the selection

doubleClickSelection

public void doubleClickSelection(java.awt.event.MouseEvent aEvent)
Passed on to listeners

contextClickSelection

public void contextClickSelection(java.awt.event.MouseEvent aEvent)
Passed on to listeners

dragSelection

public void dragSelection(java.awt.event.MouseEvent aEvent)
Passed on to listeners

addSelectionListener

public void addSelectionListener(SelectionListener aListener)
Adds a selection listener

removeSelectionListener

public void removeSelectionListener(SelectionListener aListener)
Removes a selection listener