| Package | Description |
|---|---|
| com.codename1.components |
Generic elaborate components that make use of both UI elements and storage.
|
| com.codename1.share |
Sharing services, that can be registered on the ShareButton
|
| com.codename1.testing |
This package contains everything necessary for unit tests, automation of tests and everything in between.
|
| com.codename1.ui |
Main widget package containing the component/container "composite" similar
both in terminology and design to Swing/AWT.
|
| com.codename1.ui.events |
Observable pattern event listeners in the spirit of AWT 1.1's event
dispatching architecture, all events are dispatched on the EDT (Event Dispatch Thread).
|
| com.codename1.ui.util |
Utility features that are either too domain specific or don't "fit" into any
other packages including the Resource file format loading API.
|
| Modifier and Type | Method and Description |
|---|---|
Command |
SpanButton.getCommand()
Returns the command instance of the button
|
Command |
SpanMultiButton.getCommand()
Returns the command for the emblem
|
Command |
MultiButton.getCommand()
Returns the command for the emblem
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
Progress.actionCommand(Command cmd)
Invoked to allow subclasses of form to handle a command from one point
rather than implementing many command instances
|
void |
SpanButton.setCommand(Command cmd)
Sets the command for the component
|
void |
SpanMultiButton.setCommand(Command c)
Sets the command for the component, it doesn't affe
|
void |
MultiButton.setCommand(Command c)
Sets the command for the component, it doesn't affe
|
| Modifier and Type | Class and Description |
|---|---|
class |
EmailShare
Email sharing service.
|
class |
FacebookShare
Facebook sharing service
|
class |
ShareService
This is an abstract sharing service.
|
class |
SMSShare
SMS Sharing service
|
| Modifier and Type | Method and Description |
|---|---|
Command[] |
AbstractTest.getToolbarCommands()
Returns all the command objects from the toolbar in the order of left, right, overflow & sidemenu
|
static Command[] |
TestUtils.getToolbarCommands()
Returns all the command objects from the toolbar in the order of left, right, overflow & sidemenu
|
| Modifier and Type | Class and Description |
|---|---|
class |
NavigationCommand
The NavigationCommand is a Command that navigates to a given Form.
|
| Modifier and Type | Method and Description |
|---|---|
Command |
Toolbar.addCommandToLeftBar(String name,
Image icon,
ActionListener ev)
Adds a Command to the TitleArea on the left side.
|
Command |
Toolbar.addCommandToLeftSideMenu(String name,
Image icon,
ActionListener ev)
Adds a Command to the left side navigation menu
|
Command |
Toolbar.addCommandToOverflowMenu(String name,
Image icon,
ActionListener ev)
Adds a Command to the overflow menu
|
Command |
Toolbar.addCommandToRightBar(String name,
Image icon,
ActionListener ev)
Adds a Command to the TitleArea on the right side.
|
Command |
Toolbar.addCommandToRightSideMenu(String name,
Image icon,
ActionListener ev)
Adds a Command to the right side navigation menu (it requires a permanent
sidemenu or an onTop mode sidemenu, otherwise it does nothing)
|
Command |
Toolbar.addCommandToSideMenu(String name,
Image icon,
ActionListener ev)
Adds a Command to the left or right side navigation menu according to the
state of RTL.
|
Command |
Toolbar.addMaterialCommandToLeftBar(String name,
char icon,
ActionListener ev)
Adds a Command to the TitleArea on the left side with a material design
icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToLeftBar(String name,
char icon,
float size,
ActionListener ev)
Adds a Command to the TitleArea on the left side with a material design
icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToLeftSideMenu(String name,
char icon,
ActionListener ev)
Adds a Command to the left side navigation menu with a material design
icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToLeftSideMenu(String name,
char icon,
float size,
ActionListener ev)
Adds a Command to the left side navigation menu with a material design
icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToOverflowMenu(String name,
char icon,
ActionListener ev)
Adds a Command to the overflow menu with a material design icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToOverflowMenu(String name,
char icon,
float size,
ActionListener ev)
Adds a Command to the overflow menu with a material design icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToRightBar(String name,
char icon,
ActionListener ev)
Adds a Command to the TitleArea on the right side with a material design
icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToRightBar(String name,
char icon,
float size,
ActionListener ev)
Adds a Command to the TitleArea on the right side with a material design
icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToRightSideMenu(String name,
char icon,
ActionListener ev)
Adds a Command to the right side navigation menu with a material design
icon reference
FontImage (it requires a
permanent sidemenu or an onTop mode sidemenu, otherwise it does nothing). |
Command |
Toolbar.addMaterialCommandToRightSideMenu(String name,
char icon,
float size,
ActionListener ev)
Adds a Command to the right side navigation menu with a material design
icon reference
FontImage (it requires a
permanent sidemenu or an onTop mode sidemenu, otherwise it does nothing). |
Command |
Toolbar.addMaterialCommandToSideMenu(String name,
char icon,
ActionListener ev)
Adds a Command to the left or right side navigation menu (according to
the state of RTL) with a material design icon reference
FontImage. |
Command |
Toolbar.addMaterialCommandToSideMenu(String name,
char icon,
float size,
ActionListener ev)
Adds a Command to the left or right side navigation menu (according to
the state of RTL) with a material design icon reference
FontImage. |
static Command |
Command.create(String name,
Image icon,
ActionListener ev)
Creates a new command instance that encapsulates the action listener and details, the main
value of this approach is in our ability to write commands using the shorthand lambda syntax
of Java 8.
|
static Command |
Command.createMaterial(String name,
char icon,
ActionListener ev)
Creates a new command instance that encapsulates the action listener and details, the main
value of this approach is in our ability to write commands using the shorthand lambda syntax
of Java 8.
|
protected Command |
MenuBar.createMenuCancelCommand()
Factory method that returns the Form Menu cancel Command.
|
protected Command |
MenuBar.createMenuSelectCommand()
Factory method that returns the Form Menu select Command.
|
protected Command |
MenuBar.createSelectCommand()
Factory method that returns the Form select Command.
|
Command |
MenuBar.getBackCommand()
Indicates the command that is defined as the back command out of this form.
|
Command |
Form.getBackCommand()
Indicates the command that is defined as the back command out of this form.
|
protected Command |
MenuBar.getCancelMenuItem()
This method returns the cancel menu item, when a menu is opened
|
Command |
MenuBar.getClearCommand()
Indicates the command that is defined as the clear command in this form.
|
Command |
Form.getClearCommand()
Indicates the command that is defined as the clear command in this form.
|
Command |
Button.getCommand()
This method return the Button Command if exists
|
Command |
MenuBar.getCommand(int index)
Returns the command occupying the given index
|
Command |
Form.getCommand(int index)
Returns the command occupying the given index
|
Command |
MenuBar.getDefaultCommand()
Default command is invoked when a user presses fire, this functionality works
well in some situations but might collide with elements such as navigation
and combo boxes.
|
Command |
Form.getDefaultCommand()
Default command is invoked when a user presses fire, this functionality works
well in some situations but might collide with elements such as navigation
and combo boxes.
|
Command |
MenuBar.getSelectCommand()
The selectCommand is the command to invoke when a Component has foucs in
Third Soft Button state.
|
protected Command |
MenuBar.getSelectMenuItem()
This method returns the select menu item, when a menu is opened
|
Command |
Form.getSourceCommand()
Gets the source command that was used to navigate to this form.
|
protected Command |
TextField.installCommands(Command clear,
Command t9)
Installs the clear and t9 commands onto the parent form, this method can
be overriden to provide device specific placement for these commands
|
Command |
Toolbar.setBackCommand(String title,
ActionListener<ActionEvent> listener)
Sets the back command in the title bar to an arrow type and maps the back
command hardware key if applicable.
|
Command |
Form.setBackCommand(String name,
Image icon,
ActionListener ev)
Shorthand for
Form.setBackCommand(com.codename1.ui.Command) that
dynamically creates the command using create(java.lang.String, com.codename1.ui.Image, com.codename1.ui.events.ActionListener). |
Command |
Toolbar.setBackCommand(String title,
Toolbar.BackCommandPolicy policy,
ActionListener<ActionEvent> listener)
Sets the back command in the title bar and in the form, back command
behaves based on the given policy type
|
Command |
Dialog.show(int top,
int bottom,
int left,
int right)
This method shows the form as a modal alert allowing us to produce a behavior
of an alert/dialog box.
|
Command |
Dialog.show(int top,
int bottom,
int left,
int right,
boolean includeTitle)
Deprecated.
use the version that doesn't accept the include title, the includeTitle
feature is no longer supported
|
Command |
Dialog.show(int top,
int bottom,
int left,
int right,
boolean includeTitle,
boolean modal)
Deprecated.
use showAtPosition, the includeTitle flag is no longer supported
|
static Command |
Dialog.show(String title,
Component body,
Command... cmds)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command[] cmds,
int type,
Image icon)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command[] cmds,
int type,
Image icon,
long timeout)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
String body,
Command... cmds)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
String text,
Command[] cmds,
int type,
Image icon,
long timeout)
Shows a modal prompt dialog with the given title and text.
|
static Command |
Dialog.show(String title,
String text,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal prompt dialog with the given title and text.
|
static Command |
Dialog.show(String title,
String text,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout)
Shows a modal prompt dialog with the given title and text.
|
static Command |
Dialog.show(String title,
String text,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal prompt dialog with the given title and text.
|
Command |
Dialog.showAtPosition(int top,
int bottom,
int left,
int right,
boolean modal)
This method shows the form as a modal alert allowing us to produce a behavior
of an alert/dialog box.
|
Command |
Dialog.showDialog()
Shows a modal dialog and returns the command pressed within the modal dialog
|
protected Command |
MenuBar.showMenuDialog(Dialog menu)
A menu is implemented as a dialog, this method allows you to override dialog
display in order to customize the dialog menu in various ways
|
protected Command |
Toolbar.showOverflowMenu(Dialog menu) |
Command |
Dialog.showPacked(String position,
boolean modal)
Convenience method to show a dialog sized to match its content.
|
Command |
Dialog.showPopupDialog(Component c)
A popup dialog is shown with the context of a component and its selection, it is disposed seamlessly if the back button is pressed
or if the user touches outside its bounds.
|
protected Command |
ComboBox.showPopupDialog(Dialog popupDialog,
List l)
Shows the popup dialog for the combo box and returns the resulting command.
|
Command |
Dialog.showPopupDialog(Rectangle rect)
A popup dialog is shown with the context of a component and its selection, it is disposed seamlessly if the back button is pressed
or if the user touches outside its bounds.
|
Command |
Dialog.showStetched(String position,
boolean modal)
Deprecated.
due to typo use showStretched instead
|
Command |
Dialog.showStretched(String position,
boolean modal)
Convenience method to show a dialog stretched to one of the sides
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<Command> |
Toolbar.getLeftBarCommands()
Returns the commands within the left bar section which can be useful for
things like unit testing.
|
Iterable<Command> |
Toolbar.getOverflowCommands()
Returns the commands within the overflow menu which can be useful for
things like unit testing.
|
Iterable<Command> |
Toolbar.getRightBarCommands()
Returns the commands within the right bar section which can be useful for
things like unit testing.
|
Iterable<Command> |
Toolbar.getRightSideMenuCommands()
Returns the commands within the right side menu which can be useful for
things like unit testing.
|
Iterable<Command> |
Toolbar.getSideMenuCommands()
Returns the commands within the left side menu which can be useful for
things like unit testing.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
Dialog.actionCommand(Command cmd)
Invoked to allow subclasses of form to handle a command from one point
rather than implementing many command instances
|
protected void |
Form.actionCommand(Command cmd)
Invoked to allow subclasses of form to handle a command from one point
rather than implementing many command instances.
|
void |
MenuBar.addCommand(Command cmd)
Adds a Command to the MenuBar
|
void |
SideMenuBar.addCommand(Command cmd)
Deprecated.
Adds a Command to the MenuBar
|
void |
Form.addCommand(Command cmd)
Deprecated.
Please use
Toolbar.addCommandToLeftBar(com.codename1.ui.Command) or similar methods |
protected void |
MenuBar.addCommand(Command cmd,
int index)
Add a Command to the MenuBar
|
protected void |
SideMenuBar.addCommand(Command cmd,
int index)
Deprecated.
Add a Command to the MenuBar
|
void |
Form.addCommand(Command cmd,
int offset)
Deprecated.
Please use
Toolbar.addCommandToLeftBar(com.codename1.ui.Command) or similar methods |
void |
Toolbar.addCommandToLeftBar(Command cmd)
Adds a Command to the TitleArea on the left side.
|
void |
Toolbar.addCommandToLeftSideMenu(Command cmd)
Adds a Command to the left side navigation menu
|
void |
Toolbar.addCommandToOverflowMenu(Command cmd)
Adds a Command to the overflow menu
|
void |
Toolbar.addCommandToRightBar(Command cmd)
Adds a Command to the TitleArea on the right side.
|
void |
Toolbar.addCommandToRightSideMenu(Command cmd)
Adds a Command to the right side navigation menu (it requires a permanent
sidemenu or an onTop mode sidemenu, otherwise it does nothing).
|
void |
Toolbar.addCommandToSideMenu(Command cmd)
Adds a Command to the left or right side navigation menu according to the
state of RTL.
|
void |
Toolbar.addComponentToLeftSideMenu(Component cmp,
Command cmd)
Adds a Component to the left side navigation menu.
|
void |
Toolbar.addComponentToRightSideMenu(Component cmp,
Command cmd)
Adds a Component to the right side navigation menu (it requires a
permanent sidemenu or an onTop sidemenu, otherwise it does nothing).
|
void |
Toolbar.addComponentToSideMenu(Component cmp,
Command cmd)
Adds a Component to the left or right side navigation menu, according to
the state of RTL.
|
static RadioButton |
RadioButton.createToggle(Command cmd,
ButtonGroup bg)
Shorthand for creating the radio button, adding it to a group, setting the command and making it into
a toggle button
|
protected Button |
MenuBar.createTouchCommandButton(Command c)
Creates a touch command for use as a touch menu item
|
protected Button |
SideMenuBar.createTouchCommandButton(Command c)
Deprecated.
Creates a touch command for use as a touch menu item
|
void |
Form.dispatchCommand(Command cmd,
ActionEvent ev)
Dispatches a command via the standard form mechanism of firing a command event
|
Button |
MenuBar.findCommandComponent(Command c)
Find the command component instance if such an instance exists
|
Button |
Toolbar.findCommandComponent(Command c)
Find the command component instance if such an instance exists
|
protected Command |
TextField.installCommands(Command clear,
Command t9)
Installs the clear and t9 commands onto the parent form, this method can
be overriden to provide device specific placement for these commands
|
void |
Dialog.placeButtonCommands(Command[] cmds)
Deprecated.
this method shouldn't be invoked externally, it should have been private
|
protected void |
MenuBar.removeCommand(Command cmd)
Removes a Command from the MenuBar
|
protected void |
SideMenuBar.removeCommand(Command cmd)
Deprecated.
Removes a Command from the MenuBar
|
void |
Toolbar.removeCommand(Command cmd)
Removes a Command from the MenuBar
|
void |
Form.removeCommand(Command cmd)
Removes the command from the menu bar softkeys
|
protected void |
TextField.removeCommands(Command clear,
Command t9,
Command originalClear)
Removes the clear and t9 commands from the parent form, this method can
be overriden to provide device specific placement for these commands
|
void |
Toolbar.removeOverflowCommand(Command cmd)
Removes the given overflow menu command, notice that this has no effect
on the menu that is currently showing (if it is currently showing) only
on the upcoming iterations.
|
void |
MenuBar.setBackCommand(Command backCommand)
Indicates the command that is defined as the back command out of this form.
|
void |
SideMenuBar.setBackCommand(Command backCommand)
Deprecated.
Indicates the command that is defined as the back command out of this form.
|
void |
Toolbar.setBackCommand(Command cmd)
Sets the back command in the title bar to an arrow type and maps the back
command hardware key if applicable.
|
void |
Form.setBackCommand(Command backCommand)
Indicates the command that is defined as the back command out of this form.
|
void |
Toolbar.setBackCommand(Command cmd,
Toolbar.BackCommandPolicy policy)
Sets the back command in the title bar and in the form, back command
behaves based on the given policy type
|
void |
Toolbar.setBackCommand(Command cmd,
Toolbar.BackCommandPolicy policy,
float iconSize)
Sets the back command in the title bar and in the form, back command
behaves based on the given policy type
|
void |
MenuBar.setClearCommand(Command clearCommand)
Indicates the command that is defined as the clear command in this form.
|
void |
Form.setClearCommand(Command clearCommand)
Indicates the command that is defined as the clear command in this form.
|
void |
Button.setCommand(Command cmd)
Applies the given command to this button
|
ComponentSelector |
ComponentSelector.setCommand(Command cmd)
|
void |
MenuBar.setCommandUIID(Command cmd,
String uiid)
Sets the command UIID to the given UIID, notice that this won't work for all menu types since some menu
types might be implemented natively or as a list in which case the UIID won't apply!
|
void |
MenuBar.setDefaultCommand(Command defaultCommand)
Default command is invoked when a user presses fire, this functionality works
well in some situations but might collide with elements such as navigation
and combo boxes.
|
void |
Form.setDefaultCommand(Command defaultCommand)
Default command is invoked when a user presses fire, this functionality works
well in some situations but might collide with elements such as navigation
and combo boxes.
|
static void |
FontImage.setFontIcon(Command c,
Font font,
char icon,
String uiid,
float size)
Applies an icon from the font to the given command using the
given UIID.
|
static void |
FontImage.setMaterialIcon(Command c,
char icon,
String uiid)
Applies a material design icon (one of the MATERIAL_* icon constants) to the given command using the
given UIID.
|
static void |
FontImage.setMaterialIcon(Command c,
char icon,
String uiid,
float size)
Applies a material design icon (one of the MATERIAL_* icon constants) to the given command using the
given UIID.
|
void |
MenuBar.setSelectCommand(Command selectCommand)
Sets the select command
|
void |
Form.setSourceCommand(Command sourceCommand)
Sets the source command that was used to navigate to this form.
|
static Command |
Dialog.show(String title,
Component body,
Command... cmds)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command[] cmds,
int type,
Image icon)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command[] cmds,
int type,
Image icon,
long timeout)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
Component body,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
String body,
Command... cmds)
Shows a modal dialog with the given component as its "body" placed in the
center.
|
static Command |
Dialog.show(String title,
String text,
Command[] cmds,
int type,
Image icon,
long timeout)
Shows a modal prompt dialog with the given title and text.
|
static Command |
Dialog.show(String title,
String text,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal prompt dialog with the given title and text.
|
static Command |
Dialog.show(String title,
String text,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout)
Shows a modal prompt dialog with the given title and text.
|
static Command |
Dialog.show(String title,
String text,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout)
Shows a modal prompt dialog with the given title and text.
|
static Command |
Dialog.show(String title,
String text,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal prompt dialog with the given title and text.
|
static Command |
Dialog.show(String title,
String text,
Command defaultCommand,
Command[] cmds,
int type,
Image icon,
long timeout,
Transition transition)
Shows a modal prompt dialog with the given title and text.
|
| Constructor and Description |
|---|
Button(Command cmd)
Allows binding a command to a button for ease of use
|
| Modifier and Type | Method and Description |
|---|---|
Command |
ActionEvent.getCommand()
If this event was sent as a result of a command action this method returns
that command
|
| Constructor and Description |
|---|
ActionEvent(Command source,
ActionEvent.Type type,
Component sourceComponent,
int x,
int y)
Creates a new instance of ActionEvent for a command
|
ActionEvent(Command source,
Component sourceComponent,
int x,
int y)
Creates a new instance of ActionEvent for a command
|
| Modifier and Type | Method and Description |
|---|---|
protected Command |
UIBuilder.createCommand(String commandName,
Image icon,
int commandId,
String action)
Creates a command instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
UIBuilder.asyncCommandProcess(Command cmd,
ActionEvent sourceEvent)
Warning: This method is invoked OFF the EDT and is intended for usage with asynchronous
command processing.
|
protected void |
UIBuilder.postAsyncCommand(Command cmd,
ActionEvent sourceEvent)
This method is invoked in conjunction with asyncCommandProcess after the
command was handled asynchronously on the separate thread.
|
protected void |
UIBuilder.processCommand(ActionEvent ev,
Command cmd)
Invoked to process a given command before naviation or any other internal
processing occurs.
|
protected void |
UIBuilder.setBackCommand(Form f,
Command backCommand)
Invoked internally to set the back command on the form, this method allows subclasses
to change the behavior of back command adding or disable it
|
Container |
UIBuilder.showContainer(String resourceName,
Command sourceCommand,
Component sourceComponent)
This method is equivalent to the internal navigation behavior, it adds
functionality such as the back command into the given form resource and
shows it.
|
Form |
UIBuilder.showForm(String resourceName,
Command sourceCommand)
This method is equivalent to the internal navigation behavior, it adds
functionality such as the back command into the given form resource and
shows it.
|
Copyright © 2021. All rights reserved.