Package org.graffiti.selection
Class SelectionModel
java.lang.Object
org.graffiti.selection.SelectionModel
public class SelectionModel extends Object
Contains a list of selections and a reference to the current selection.
- Version:
- $Revision: 1.9 $
- Author:
- flierl
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SelectionModel()Constructs a newSelectionModel. -
Method Summary
Modifier and Type Method Description voidadd(Selection selection)Adds the given selection to the list of selections.voidaddSelectionListener(SelectionListener listener)Adds the given selection listener to the list of listeners.SelectiongetActiveSelection()Returns the active selection.voidremove(Selection selection)Removes the given selection for the list of selections.voidremoveSelectionListener(SelectionListener listener)Removes the given selection listener from the list of listeners.voidselectionChanged()Informs the registered listeners that the active session has changed.voidsetActiveSelection(String selectionName)Sets the active selection to the given value.voidsetActiveSelection(Selection sel)Sets the active selection to the given value.
-
Field Details
-
ACTIVE
DOCUMENT ME!- See Also:
- Constant Field Values
-
-
Constructor Details
-
SelectionModel
public SelectionModel()Constructs a newSelectionModel.
-
-
Method Details
-
setActiveSelection
Sets the active selection to the given value. Informs all listeners about the change.- Parameters:
selectionName- the name of the new selection.
-
setActiveSelection
Sets the active selection to the given value. Informs all listeners about the change.- Parameters:
sel- the name of the new selection.
-
getActiveSelection
Returns the active selection.- Returns:
- DOCUMENT ME!
-
add
Adds the given selection to the list of selections.- Parameters:
selection- the selection object to add.
-
addSelectionListener
Adds the given selection listener to the list of listeners.- Parameters:
listener- the selection listener to add.
-
remove
Removes the given selection for the list of selections.- Parameters:
selection- the selection to remove from the list.
-
removeSelectionListener
Removes the given selection listener from the list of listeners.- Parameters:
listener- the selection listener to remove.
-
selectionChanged
public void selectionChanged()Informs the registered listeners that the active session has changed.
-