public class NavigationCommand
ImplementsActionListener<ActionEvent>
Constructors
public NavigationCommand(String command) | Creates a new instance of NavigationCommand |
public NavigationCommand(String command, Image icon) | Creates a new instance of NavigationCommand |
public NavigationCommand(String command, int id) | Creates a new instance of NavigationCommand |
public NavigationCommand(String command, Image icon, int id) | Creates a new instance of NavigationCommand |
Methods
public Form getNextForm() | Gets the next Form |
public void setNextForm(Form nextForm) | Sets the Form to navigate to when the actionPerformed is invoked on this Command |
public boolean equals(Object o) | compare two commands |
public int hashCode() | Allows storing commands in a vector/hashtable |
public void actionPerformed(ActionEvent evt) | This method is called when the soft button/Menu item is clicked |
Inherited fields
From Command
DESKTOP_MENU, DESKTOP_MENU_APP, DESKTOP_MENU_ABOUT, DESKTOP_MENU_PREFERENCES, DESKTOP_MENU_QUIT, DESKTOP_MENU_FILE, DESKTOP_MENU_EDIT, DESKTOP_MENU_VIEW, DESKTOP_MENU_WINDOW, DESKTOP_MENU_HELP, DESKTOP_SHORTCUT_KEY, DESKTOP_SHORTCUT_MODIFIERS, DESKTOP_SHORTCUT_MODIFIER_PRIMARY, DESKTOP_SHORTCUT_MODIFIER_SHIFT, DESKTOP_SHORTCUT_MODIFIER_ALT
Inherited methods
From Command
create, createMaterial, getId, getCommandName, setCommandName, getIcon, setIcon, toString, getPressedIcon, setPressedIcon, getDisabledIcon, setDisabledIcon, getRolloverIcon, setRolloverIcon, isDisposesDialog, setDisposesDialog, isEnabled, setEnabled, getClientProperty, putClientProperty, setDesktopMenu, getDesktopMenu, setDesktopShortcut, setDesktopShortcut, getDesktopShortcutKeyChar, getDesktopShortcutModifiers, getMaterialIcon, setMaterialIcon, getIconGapMM, setIconGapMM, getMaterialIconSize, setMaterialIconSize, getIconFont, setIconFont
Constructor details
NavigationCommand
public NavigationCommand(String command)Parameters
commandString- the string that will be placed on the Soft buttons\Menu
NavigationCommand
public NavigationCommand(String command, Image icon)Parameters
commandString- the string that will be placed on the Soft buttons\Menu
iconImage- the icon representing the command
NavigationCommand
public NavigationCommand(String command, int id)Parameters
commandString- the string that will be placed on the Soft buttons\Menu
idint- user defined ID for a command simplifying switch statement code working with a command
NavigationCommand
public NavigationCommand(String command, Image icon, int id)Parameters
commandString- the string that will be placed on the Soft buttons\Menu
iconImage- the icon representing the command
idint- user defined ID for a command simplifying switch statement code working with a command
Method details
getNextForm
public Form getNextForm()Returns
setNextForm
public void setNextForm(Form nextForm)Parameters
nextFormForm- The next Form
equals
public boolean equals(Object o)Parameters
oObject- a Command Object to compare
Returns
hashCode
public int hashCode()Returns
actionPerformed
public void actionPerformed(ActionEvent evt)Parameters
evtActionEvent- the Event Object