public class DelegatingAction extends AbstractAction implements PropertyChangeListener
Action
s
exported by a JComponent
.Modifier and Type | Class and Description |
---|---|
static class |
DelegatingAction.DisabledAction |
static class |
DelegatingAction.PasteAction
Enables and delegates to the target action only if the clipboard
has contents.
|
changeSupport, enabled
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 |
---|
DelegatingAction(String name,
String key,
String altKey) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
protected static boolean |
clipboardHasContents() |
protected static String |
getClipboardContents() |
static void |
main(String[] args) |
void |
propertyChange(PropertyChangeEvent e) |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
protected static String getClipboardContents()
protected static boolean clipboardHasContents()
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public static void main(String[] args)
Copyright © 2023. All rights reserved.