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 Details

  • Constructor Details

    • SelectionModel

      public SelectionModel()
      Constructs a new SelectionModel.
  • Method Details

    • setActiveSelection

      public void setActiveSelection​(String selectionName)
      Sets the active selection to the given value. Informs all listeners about the change.
      Parameters:
      selectionName - the name of the new selection.
    • setActiveSelection

      public void setActiveSelection​(Selection sel)
      Sets the active selection to the given value. Informs all listeners about the change.
      Parameters:
      sel - the name of the new selection.
    • getActiveSelection

      public Selection getActiveSelection()
      Returns the active selection.
      Returns:
      DOCUMENT ME!
    • add

      public void add​(Selection selection)
      Adds the given selection to the list of selections.
      Parameters:
      selection - the selection object to add.
    • addSelectionListener

      public void addSelectionListener​(SelectionListener listener)
      Adds the given selection listener to the list of listeners.
      Parameters:
      listener - the selection listener to add.
    • remove

      public void remove​(Selection selection)
      Removes the given selection for the list of selections.
      Parameters:
      selection - the selection to remove from the list.
    • removeSelectionListener

      public void removeSelectionListener​(SelectionListener listener)
      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.