| |
15. 3. 1. AbstractAction查找属性键 |
|
One complexity-busting side effect when using AbstractAction is that it lets you disable the Action
with setEnabled(false), which, in turn, will disable all components created from it. |
Constant | Description | NAME | Action name, used as button label | SMALL_ICON | Icon for the Action, used as button label | SHORT_DESCRIPTION | Short description of the Action; could be used as tooltip text, but not by default | LONG_DESCRIPTION | Long description of the Action; could be used for accessibility (see Chapter 22) | ACCELERATOR | KeyStroke string; can be used as the accelerator for the Action | ACTION_COMMAND_KEY | InputMap key; maps to the Action in the ActionMap of the associated JComponent | MNEMONIC_KEY | Key code; can be used as mnemonic for action | DEFAULT | Unused constant that could be used for your own property |
|
|