Class NavigationCommand
java.lang.Object
com.codename1.ui.Command
com.codename1.ui.NavigationCommand
- All Implemented Interfaces:
ActionListener<ActionEvent>
The NavigationCommand is a Command that navigates to a given Form.
The NavigationCommand calls the show() on the Form object that is returned from
getNextForm().
-
Constructor Summary
ConstructorsConstructorDescriptionNavigationCommand(String command) Creates a new instance of NavigationCommandNavigationCommand(String command, int id) Creates a new instance of NavigationCommandNavigationCommand(String command, Image icon) Creates a new instance of NavigationCommandNavigationCommand(String command, Image icon, int id) Creates a new instance of NavigationCommand -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is called when the soft button/Menu item is clickedbooleancompare two commandsGets the next ForminthashCode()Allows storing commands in a vector/hashtablevoidsetNextForm(Form nextForm) Sets the Form to navigate to when the actionPerformed is invoked on this CommandMethods inherited from class Command
create, createMaterial, getClientProperty, getCommandName, getDisabledIcon, getIcon, getIconFont, getIconGapMM, getId, getMaterialIcon, getMaterialIconSize, getPressedIcon, getRolloverIcon, isDisposesDialog, isEnabled, putClientProperty, setCommandName, setDisabledIcon, setDisposesDialog, setEnabled, setIcon, setIconFont, setIconGapMM, setMaterialIcon, setMaterialIconSize, setPressedIcon, setRolloverIcon, toString
-
Constructor Details
-
NavigationCommand
Creates a new instance of NavigationCommand
Parameters
command: the string that will be placed on the Soft buttons\Menu
-
NavigationCommand
-
NavigationCommand
Creates a new instance of NavigationCommand
Parameters
-
command: the string that will be placed on the Soft buttons\Menu -
id: @param id user defined ID for a command simplifying switch statement code working with a command
-
-
NavigationCommand
Creates a new instance of NavigationCommand
Parameters
-
command: the string that will be placed on the Soft buttons\Menu -
icon: the icon representing the command -
id: @param id user defined ID for a command simplifying switch statement code working with a command
-
-
-
Method Details
-
getNextForm
Gets the next Form
Returns
the next Form
-
setNextForm
Sets the Form to navigate to when the actionPerformed is invoked on this Command
Parameters
nextForm: The next Form
-
equals
-
hashCode
-
actionPerformed
Description copied from class:CommandThis method is called when the soft button/Menu item is clicked
Parameters
evt: the Event Object
- Specified by:
actionPerformedin interfaceActionListener<ActionEvent>- Overrides:
actionPerformedin classCommand
-