artisynth.core.gui.editorManager
Class EditorBase

java.lang.Object
  extended by artisynth.core.gui.editorManager.EditorBase
Direct Known Subclasses:
FemModel3dEditor, FemMuscleModelEditor, FrameMarkerEditor, MechModelEditor, MeshBodyEditor, MuscleBundleEditor, MuscleEditor, MuscleExciterEditor, RigidBodyConnectorEditor, RigidBodyEditor, RootModelEditor, TrackingControllerEditor

public abstract class EditorBase
extends java.lang.Object

This is the base class for all other component Editors. A component Editor is created for each component that can be edited. A component can be edited if other components can be added to it. An example of a component editor is the RigidBodyEditor.


Field Summary
static int DISABLED
           
static int EXCLUSIVE
           
 
Constructor Summary
EditorBase(Main main, EditorManager editManager)
           
 
Method Summary
 void addActions(EditActionMap actions, SelectionManager selManager)
          Adds editing actions that can be provided by this editor, for a given selection context, to an action map.
 void applyAction(java.lang.String actionCommand, java.util.LinkedList<ModelComponent> selectedItems, java.awt.Rectangle popupBounds)
           
 boolean containsDoubleSelection(java.util.LinkedList<ModelComponent> selection, java.lang.Class<?> cls)
          Returns true if the selection list contains two selections, which are both instances of the specified class.
 boolean containsMultipleCommonParentSelection(java.util.LinkedList<ModelComponent> selection, java.lang.Class<?> cls)
          Returns true if the selection list contains components which are all instances of a specified class and have the same parent.
 boolean containsMultipleSelection(java.util.LinkedList<ModelComponent> selection, java.lang.Class<?> cls)
          Returns true if the selection list contains components which are all instances of a specified class.
 boolean containsSingleSelection(java.util.LinkedList<ModelComponent> selection, java.lang.Class<?> cls)
          Returns true if the selection list contains a single component, which is also an instance of a specified class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXCLUSIVE

public static final int EXCLUSIVE
See Also:
Constant Field Values

DISABLED

public static final int DISABLED
See Also:
Constant Field Values
Constructor Detail

EditorBase

public EditorBase(Main main,
                  EditorManager editManager)
Method Detail

addActions

public void addActions(EditActionMap actions,
                       SelectionManager selManager)
Adds editing actions that can be provided by this editor, for a given selection context, to an action map.

Parameters:
actions - action map to which actions are appended.
selManager - used to query the current selection context

applyAction

public void applyAction(java.lang.String actionCommand,
                        java.util.LinkedList<ModelComponent> selectedItems,
                        java.awt.Rectangle popupBounds)

containsSingleSelection

public boolean containsSingleSelection(java.util.LinkedList<ModelComponent> selection,
                                       java.lang.Class<?> cls)
Returns true if the selection list contains a single component, which is also an instance of a specified class.


containsMultipleSelection

public boolean containsMultipleSelection(java.util.LinkedList<ModelComponent> selection,
                                         java.lang.Class<?> cls)
Returns true if the selection list contains components which are all instances of a specified class.


containsMultipleCommonParentSelection

public boolean containsMultipleCommonParentSelection(java.util.LinkedList<ModelComponent> selection,
                                                     java.lang.Class<?> cls)
Returns true if the selection list contains components which are all instances of a specified class and have the same parent.


containsDoubleSelection

public boolean containsDoubleSelection(java.util.LinkedList<ModelComponent> selection,
                                       java.lang.Class<?> cls)
Returns true if the selection list contains two selections, which are both instances of the specified class.