artisynth.core.gui.editorManager
Class AddComponentAgent<E extends ModelComponent>

java.lang.Object
  extended by artisynth.core.gui.editorManager.EditingAgent
      extended by artisynth.core.gui.editorManager.FrameBasedEditingAgent
          extended by artisynth.core.gui.editorManager.AddComponentAgent<E>
All Implemented Interfaces:
SelectionListener, ComponentChangeListener, java.awt.event.ActionListener, java.util.EventListener, Disposable, ValueChangeListener
Direct Known Subclasses:
AttachParticleAgent, AttachParticleBodyAgent, AttachParticleFemAgent, AxialSpringAgent, Fem3dMarkerAgent, FemModel3dAgent, FrameMarkerAgent, MechModelAgent, MuscleElementAgent, ParticleAgent, RigidBodyAgent, RigidBodyConnectorAgent

public abstract class AddComponentAgent<E extends ModelComponent>
extends FrameBasedEditingAgent
implements SelectionListener, ComponentChangeListener, ValueChangeListener

A base class used to create agents for adding components.


Constructor Summary
AddComponentAgent(Main main, ComponentList<?> container, CompositeComponent ancestor)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addBasicProps(java.lang.Class type, java.lang.String[] basicProperties)
           
 void addComponentType(java.lang.Class type)
           
 void addComponentType(java.lang.Class type, java.lang.String[] excludedProperties)
           
 void componentChanged(ComponentChangeEvent e)
           
 void dispose()
          Disconnects the agent from the ArtiSynth infrastructure and disposes of its resources.
 void handleLocationEvent(GLViewer viewer, MouseRayEvent rayEvent)
          Called after a left mouse press in one of the viewers when a location listener is installed.
 void selectionChanged(SelectionEvent e)
           
 void setComponentType(java.lang.Class type)
          Called whenever the specific class type of the components being added by this agent is changed.
 void show(java.awt.Rectangle popupBounds)
          Connects the agent to the ArtiSynth infrastructure and makes it visible.
 void valueChange(ValueChangeEvent e)
           
 
Methods inherited from class artisynth.core.gui.editorManager.FrameBasedEditingAgent
addWidget, isVisible
 
Methods inherited from class artisynth.core.gui.editorManager.EditingAgent
getCenter, intersectClipPlane, intersectViewPlane
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddComponentAgent

public AddComponentAgent(Main main,
                         ComponentList<?> container,
                         CompositeComponent ancestor)
Method Detail

show

public void show(java.awt.Rectangle popupBounds)
Connects the agent to the ArtiSynth infrastructure and makes it visible.

Overrides:
show in class FrameBasedEditingAgent
Parameters:
popupBounds - TODO

dispose

public void dispose()
Disconnects the agent from the ArtiSynth infrastructure and disposes of its resources.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class FrameBasedEditingAgent

selectionChanged

public void selectionChanged(SelectionEvent e)
Specified by:
selectionChanged in interface SelectionListener

setComponentType

public void setComponentType(java.lang.Class type)
Called whenever the specific class type of the components being added by this agent is changed.


valueChange

public void valueChange(ValueChangeEvent e)
Specified by:
valueChange in interface ValueChangeListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class FrameBasedEditingAgent

handleLocationEvent

public void handleLocationEvent(GLViewer viewer,
                                MouseRayEvent rayEvent)
Called after a left mouse press in one of the viewers when a location listener is installed.


componentChanged

public void componentChanged(ComponentChangeEvent e)
Specified by:
componentChanged in interface ComponentChangeListener
Overrides:
componentChanged in class FrameBasedEditingAgent

addComponentType

public void addComponentType(java.lang.Class type)

addComponentType

public void addComponentType(java.lang.Class type,
                             java.lang.String[] excludedProperties)

addBasicProps

public void addBasicProps(java.lang.Class type,
                          java.lang.String[] basicProperties)