de.jreality.ui.viewerapp.actions.edit
Class CurrentSelection
java.lang.Object
javax.swing.AbstractAction
de.jreality.ui.viewerapp.actions.AbstractJrAction
de.jreality.ui.viewerapp.actions.AbstractSelectionListenerAction
de.jreality.ui.viewerapp.actions.edit.CurrentSelection
- All Implemented Interfaces:
- SelectionListener, ActionListener, Serializable, Cloneable, EventListener, Action
public class CurrentSelection
- extends AbstractSelectionListenerAction
Adds tools to a selected SceneGraphComponent (if no SceneGraphComponent is selected, this action is disabled).
- Author:
- msommer
- See Also:
- Serialized Form
CurrentSelection
public CurrentSelection(String name,
SelectionManager sm)
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interface ActionListener
- Specified by:
actionPerformed
in class AbstractJrAction
selectionChanged
public void selectionChanged(SelectionEvent e)
- Description copied from class:
AbstractSelectionListenerAction
- Override this method to specify what to do when the selection changes.
- Specified by:
selectionChanged
in interface SelectionListener
- Overrides:
selectionChanged
in class AbstractSelectionListenerAction
- Parameters:
e
- the selection event- See Also:
AbstractSelectionListenerAction.isEnabled(SelectionEvent)
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)