public class Command extends AbstractAction
Command object receives action event, that object's
doit method is invoked. doit method by default
does nothing and the class customer have to override it to implement
any action handling logic.
Originally contributed by:
Juergen Verwohlt: Juergen.Verwohlt@jcatalog.com,
Rainer Steinkuhle: Rainer.Steinkuhle@jcatalog.com,
Stanislav Gorkhover: Stanislav.Gorkhover@jcatalog.comchangeSupport, enabledACCELERATOR_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 |
|---|
Command(String name,
int mnemonic)
Creates
Command object with a given name and
sets the name as a tooltip text. |
Command(String name,
String iconName)
Creates
Command object with a given name, the same
tooltip text and icon image if appropriate image file is found. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
void |
doit()
Action handler, have to be overrided by subclasses.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic Command(String name, int mnemonic)
Command object with a given name and
sets the name as a tooltip text. No associated icon image.name - of the commandmnemonic - A Keypublic void actionPerformed(ActionEvent e)
public void doit()
Copyright © 2023 Apache Software Foundation. All rights reserved.