public class CurrentSelection extends AbstractSelectionListenerAction
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
CurrentSelection(String name,
SelectionManager sm) |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
selectionChanged(SelectionEvent e)
Override this method to specify what to do when the selection changes.
|
getSelection, getSelectionManager
createMenuItem, createToolboxItem, getIcon, setAcceleratorKey, setIcon, setName, setShortDescription
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public CurrentSelection(String name, SelectionManager sm)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
actionPerformed
in class AbstractJrAction
public void selectionChanged(SelectionEvent e)
AbstractSelectionListenerAction
selectionChanged
in interface SelectionListener
selectionChanged
in class AbstractSelectionListenerAction
e
- the selection eventAbstractSelectionListenerAction.isEnabled(SelectionEvent)
public boolean isEnabled(SelectionEvent e)
AbstractSelectionListenerAction
AbstractSelectionListenerAction.selectionChanged(SelectionEvent)
.isEnabled
in class AbstractSelectionListenerAction
e
- the selection eventAbstractSelectionListenerAction.selectionChanged(SelectionEvent)