de.jreality.ui.viewerapp.actions.edit
Class LoadFileToNode

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by de.jreality.ui.viewerapp.actions.AbstractJrAction
          extended by de.jreality.ui.viewerapp.actions.AbstractSelectionListenerAction
              extended by de.jreality.ui.viewerapp.actions.edit.LoadFileToNode
All Implemented Interfaces:
SelectionListener, ActionListener, Serializable, Cloneable, EventListener, Action

public class LoadFileToNode
extends AbstractSelectionListenerAction

Loads one or several files and adds them as children to the selected scene graph component (optionally merges indexed face & line sets).

Author:
msommer
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
LoadFileToNode(String name, SelectionManager sm)
           
LoadFileToNode(String name, SelectionManager sm, Component parentComp)
           
LoadFileToNode(String name, SelectionManager sm, Viewer viewer)
           
LoadFileToNode(String name, SelectionManager sm, Viewer viewer, Component parentComp)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 boolean isEnabled(SelectionEvent e)
          Override this method to specify when to disable or enable the action based on the current selection.
 
Methods inherited from class de.jreality.ui.viewerapp.actions.AbstractSelectionListenerAction
getSelection, getSelectionManager, selectionChanged
 
Methods inherited from class de.jreality.ui.viewerapp.actions.AbstractJrAction
createMenuItem, createToolboxItem, getIcon, setAcceleratorKey, setIcon, setName, setShortDescription
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadFileToNode

public LoadFileToNode(String name,
                      SelectionManager sm,
                      Viewer viewer,
                      Component parentComp)

LoadFileToNode

public LoadFileToNode(String name,
                      SelectionManager sm,
                      Viewer viewer)

LoadFileToNode

public LoadFileToNode(String name,
                      SelectionManager sm,
                      Component parentComp)

LoadFileToNode

public LoadFileToNode(String name,
                      SelectionManager sm)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener
Specified by:
actionPerformed in class AbstractJrAction

isEnabled

public boolean isEnabled(SelectionEvent e)
Description copied from class: AbstractSelectionListenerAction
Override this method to specify when to disable or enable the action based on the current selection.
This method is called in AbstractSelectionListenerAction.selectionChanged(SelectionEvent).

Overrides:
isEnabled in class AbstractSelectionListenerAction
Parameters:
e - the selection event
Returns:
true iff the action is enabled based on the current selection
See Also:
AbstractSelectionListenerAction.selectionChanged(SelectionEvent)