artisynth.core.gui.selectionManager
Class SelectionManager

java.lang.Object
  extended by artisynth.core.gui.selectionManager.SelectionManager

public class SelectionManager
extends java.lang.Object

Author:
John E Lloyd, after Chad Decker

Constructor Summary
SelectionManager()
           
 
Method Summary
 void addAndRemoveSelected(java.util.List<ModelComponent> addList, java.util.List<ModelComponent> removeList)
           
 void addFilter(SelectionFilter filter)
           
 void addSelected(java.util.List<ModelComponent> addList)
           
 boolean addSelected(ModelComponent c)
           
 void addSelectionListener(SelectionListener l)
           
 void clearSelections()
           
 void displayPopup(java.awt.event.MouseEvent evt)
           
 void filterSelections(SelectionFilter filter)
           
 java.util.LinkedList<ModelComponent> getCopyExpandedSelection()
          Returns a list of the currently selected components, expanded to include components which also referenced by the current selection.
 java.util.LinkedList<ModelComponent> getCurrentSelection()
          Returns a list of the currently selected components.
 SelectionFilter[] getFilters()
           
 ModelComponent getLastSelected()
           
 int getMaximumSelections()
          Returns the maximum number of components that may be concurrently selected.
 int getNumSelected()
           
 artisynth.core.gui.selectionManager.SelectionManager.ViewerSelectionFilter getViewerSelectionFilter()
           
 artisynth.core.gui.selectionManager.SelectionManager.ViewerSelectionHandler getViewerSelectionHandler()
           
 boolean isPopupMenuEnabled()
           
 boolean removeFilter(SelectionFilter filter)
           
 void removeSelected(java.util.List<ModelComponent> removeList)
           
 boolean removeSelected(ModelComponent c)
           
 boolean removeSelectionListener(SelectionListener l)
           
 void setMaximumSelections(int max)
          Sets the maximum number of components that may be concurrently selected.
 void setNavPanel(NavigationPanel navpanel)
           
 void setPopupMenuEnabled(boolean enable)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionManager

public SelectionManager()
Method Detail

setNavPanel

public void setNavPanel(NavigationPanel navpanel)

getViewerSelectionHandler

public artisynth.core.gui.selectionManager.SelectionManager.ViewerSelectionHandler getViewerSelectionHandler()

getViewerSelectionFilter

public artisynth.core.gui.selectionManager.SelectionManager.ViewerSelectionFilter getViewerSelectionFilter()

addFilter

public void addFilter(SelectionFilter filter)

removeFilter

public boolean removeFilter(SelectionFilter filter)

getFilters

public SelectionFilter[] getFilters()

filterSelections

public void filterSelections(SelectionFilter filter)

setMaximumSelections

public void setMaximumSelections(int max)
Sets the maximum number of components that may be concurrently selected. A value of -1 indicates that there is no limit.

Parameters:
max - maximum number of concurrently selectable components

getMaximumSelections

public int getMaximumSelections()
Returns the maximum number of components that may be concurrently selected. A value of -1 indicates that there is no limit.

Returns:
maximum number of concurrently selectable components

getCurrentSelection

public java.util.LinkedList<ModelComponent> getCurrentSelection()
Returns a list of the currently selected components. This list must not be modified by the caller.

Returns:
currently selected components

getCopyExpandedSelection

public java.util.LinkedList<ModelComponent> getCopyExpandedSelection()
Returns a list of the currently selected components, expanded to include components which also referenced by the current selection. This list must not be modified by the caller.

Returns:
reference expansion of the current selection

getLastSelected

public ModelComponent getLastSelected()

getNumSelected

public int getNumSelected()

addSelected

public void addSelected(java.util.List<ModelComponent> addList)

removeSelected

public void removeSelected(java.util.List<ModelComponent> removeList)

addAndRemoveSelected

public void addAndRemoveSelected(java.util.List<ModelComponent> addList,
                                 java.util.List<ModelComponent> removeList)

addSelected

public boolean addSelected(ModelComponent c)

removeSelected

public boolean removeSelected(ModelComponent c)

clearSelections

public void clearSelections()

addSelectionListener

public void addSelectionListener(SelectionListener l)

removeSelectionListener

public boolean removeSelectionListener(SelectionListener l)

isPopupMenuEnabled

public boolean isPopupMenuEnabled()

setPopupMenuEnabled

public void setPopupMenuEnabled(boolean enable)

displayPopup

public void displayPopup(java.awt.event.MouseEvent evt)