| Package | Description |
|---|---|
| com.codename1.charts |
The main ChartComponent Package
|
| com.codename1.cloud |
Provides cloud related services such as storage, binding widgets to the cloud seamlessly so they can be persisted
easily.
|
| com.codename1.components |
Generic elaborate components that make use of both UI elements and storage.
|
| com.codename1.facebook |
Legacy generic implementation of the Facebook API with simplified OAuth integration to allow social sharing.
|
| com.codename1.facebook.ui |
User interface for integrating with basic Facebook features currently mostly the Like button
|
| com.codename1.impl |
The implementation package should not be used by developers, it is an internal implementation detail
which will break compatibility between major Codename One releases.
|
| com.codename1.io |
Networking, Storage, Filesystem & related API's
|
| com.codename1.io.services |
Default WebService implementations
|
| com.codename1.maps |
The mapping API allows developers to use maps in their applications, add layers
on top of the map and to enhance the API with additional Layers, Providers and functionality.
|
| com.codename1.media |
Video and Audio playback support are handled within this package using the
Media & MediaManager APIs. |
| com.codename1.properties |
High level property objects that allow us to replace getters/setters in business objects with more convenient
storage/parsing mappings while retaining type safety.
|
| 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.animations |
All components are animatable by potential and additional animations (unrelated
to a specific component) can be installed on the fly, transitions between
forms are also handled as part of this package.
|
| 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.html |
This package is deprecated and used only for legacy support, use the WebBrowser component
from the components package.
|
| com.codename1.ui.layouts |
Layout managers allow a
Container to
arrange its components by a set of rules that adapt to specific
densities (ppi - pixels per inch). |
| com.codename1.ui.layouts.mig | |
| com.codename1.ui.list |
Lists are highly customizable and serve as the basis for
ComboBox and
other components (such as carousels etc) they employ a similar MVC approach to
Swing including the renderer pattern, notice that we strongly
discourage usage of lists...ListCellRenderer
allows us to customize the appearance of a list entry, it works as a
"rubber stamp" by drawing the rendered component and discarding its state thus
allowing very large lists with very little component state overhead. |
| com.codename1.ui.painter |
Painter allows us to draw arbitrary elements
of graphics from plain/scaled/tiled images to gradients and pretty
much any form of graphic drawing we can imagine. |
| com.codename1.ui.plaf |
Look of the application can be fully customized via this package, it represents
a rendering layer that can be plugged in separately in runtime and themed to
provide any custom look.
|
| com.codename1.ui.scene |
This package provides a light-weight scene graph for Codename One.
|
| com.codename1.ui.spinner |
Spinners allows picking of simple sequential values similarly to combo boxes but of a much wider value set.
|
| com.codename1.ui.table |
Table component for editing and viewing tabular data and arranging Codename One components in a tabular form
|
| com.codename1.ui.tree |
Tree component for displaying hierarchy based information and its related classes
|
| 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.
|
| com.codename1.ui.validation |
The validation framework allows us to mark invalid input in text components and disable components
in the case of invalid input
|
| Modifier and Type | Class and Description |
|---|---|
class |
ChartComponent
The top level component for displaying charts
|
| Modifier and Type | Method and Description |
|---|---|
void |
CloudObject.bindProperty(Component cmp,
String propertyName,
String attributeName,
int defer,
boolean objectLead)
Deprecated.
Binds a property value within the given component to this cloud object, this means that
when the component changes the cloud object changes unless deferred.
|
void |
BindTarget.propertyChanged(Component source,
String propertyName,
Object oldValue,
Object newValue)
Deprecated.
Fired when a property of the component changes to a new value
|
void |
CloudObject.unbindProperty(Component cmp,
String propertyName)
Deprecated.
Releases the binding for the specific property name
|
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ButtonList.Decorator<M,V extends Component>
An interface that can be implemented to provide custom decoration/undecoration of the buttons as they are
created/removed.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Accordion
The
Accordion ui pattern is a vertically stacked list of items. |
class |
Ads
Deprecated.
we recommend developers check out newer ad options in the cn1lib section of the Codename One website
|
class |
AudioRecorderComponent
A component for recording Audio from the device microphone.
|
class |
ButtonList
An abstract base class for a list of buttons.
|
class |
CheckBoxList
A list of checkboxes.
|
class |
ClearableTextField
Wraps a text field so it will have an X to clear its content on the right hand side
|
class |
FileTree
Simple class showing off the filesystem as a tree component
|
class |
FloatingActionButton
Floating action buttons are a material design element used to promote a special action in a Form.
|
class |
FloatingHint
Deprecated.
this class is superceded by
TextComponent which includes a more thorough implementation of the functionality and improved API |
class |
ImageViewer
ImageViewer allows zooming/panning an image and potentially flicking between multiple images
within a list of images.
|
class |
InfiniteProgress
Shows a "Washing Machine" infinite progress indication animation, to customize the image you can either
use the infiniteImage theme constant or the
setAnimation method. |
class |
InteractionDialog
Unlike a regular dialog the interaction dialog only looks like a dialog,
it resides in the layered pane and can be used to implement features where
interaction with the background form is still required.
Since this code is designed for interaction all "dialogs" created thru here are modless and never block. |
class |
MediaPlayer
Video playback component with control buttons for back, play/pause and
forward buttons.
|
class |
MultiButton
A powerful button like component that allows multiple rows/and an icon to be added
every row/icon can have its own UIID.
|
class |
OnOffSwitch
Deprecated.
Use new
Switch class instead as it conforms to the latest platform looks and feels. |
class |
Progress
Displays a progress dialog with the ability to cancel an ongoing operation
|
class |
RadioButtonList
A list of Radio buttons that can be managed as a single component.
|
class |
RSSReader
A List implementing an RSS reader that automatically populates itself with content
from the RSS chanel.
|
class |
ScaleImageButton
Button that simplifies the usage of scale to fill/fit.
|
class |
ScaleImageLabel
Label that simplifies the usage of scale to fill/fit.
|
class |
ShareButton
The share button allows sharing a String or an image either thru the defined
sharing services or thru the native OS sharing support.
|
class |
SignatureComponent
A component to allow a user to enter their signature.
|
class |
SliderBridge
Binds a
Slider to network progress events so it shows the progress of
the current ConnectionRequest |
class |
SpanButton
A complex button similar to MultiButton that breaks lines automatically and
looks like a regular button (more or less).
|
class |
SpanLabel
A multi line label component that can be easily localized, this is simply based
on a text area combined with a label.
|
class |
SpanMultiButton
A powerful button like component that allows multiple rows/and an icon to be added
every row/icon can have its own UIID.
|
class |
SplitPane
A Split Pane component.
|
class |
Switch
The on/off switch is a checkbox of sort (although it derives container) that
represents its state as a switch When using the Android native theme, this implementation follows the Material
Design Switch guidelines:
https://material.io/guidelines/components/selection-controls.html#selection-controls-radio-button
|
class |
SwitchList
A list of switches.
|
class |
WebBrowser
Deprecated.
Use
BrowserComponent instead. The original purpose of this class was to work as an interim solution for platforms where BrowserComponent isn't supported however all currently supported platforms work with BrowserComponent so there is no real reason to use this class |
| Modifier and Type | Method and Description |
|---|---|
protected Component |
CheckBoxList.createButton(Object model) |
protected Component |
SwitchList.createButton(Object model) |
protected abstract Component |
ButtonList.createButton(Object model)
Creates a new button for this list.
|
protected Component |
RadioButtonList.createButton(Object model) |
protected Component |
CheckBoxList.decorateComponent(Object modelItem,
Component b) |
protected Component |
SwitchList.decorateComponent(Object modelItem,
Component b) |
protected Component |
ButtonList.decorateComponent(Object modelItem,
Component b)
Decorates buttons.
|
protected Component |
RadioButtonList.decorateComponent(Object modelItem,
Component b) |
Component |
MultiButton.getBadgeStyleComponent()
Gets a component that can be used for the style of the badge.
|
Component |
SplitPane.getBottom()
Gets the component that is currently placed in the bottom of the split pane.
|
Component |
SplitPane.getBottomOrRightComponent()
Gets the component that is currently placed in the bottom or right of the split pane.
|
Component |
Accordion.getCurrentlyExpanded()
Returns the body component of the currently expanded accordion element or null if none is expanded
|
Component |
SpanButton.getIconStyleComponent()
Gets the component used for styling font icons on this SpanLabel.
|
Component |
SpanLabel.getIconStyleComponent()
Gets the component used for styling font icons on this SpanLabel.
|
Component |
MultiButton.getIconStyleComponent()
Gets the component that should be used for styling material the material icon.
|
Component |
SpanMultiButton.getIconStyleComponent() |
Component |
WebBrowser.getInternal()
Deprecated.
Since the internal component can be either an HTMLComponent or a BrowserComponent one of them
will be returned.
|
Component |
SplitPane.getLeft()
Gets the component that is currently placed in the left of the split pane.
|
Component |
SplitPane.getRight()
Gets the component that is currently placed in the right of the split pane.
|
Component |
SignatureComponent.getSignaturePanel()
Get the component that is the actual panel for drawing a signature.
|
Component |
SplitPane.getTop()
Gets the component that is currently placed in the top of the split pane.
|
Component |
SplitPane.getTopOrLeftComponent()
Gets the component that is currently placed in the top or left of the split pane.
|
protected Component |
CheckBoxList.undecorateComponent(Component b) |
protected Component |
SwitchList.undecorateComponent(Component b) |
protected Component |
ButtonList.undecorateComponent(Component b)
Undecorates buttons.
|
protected Component |
RadioButtonList.undecorateComponent(Component b) |
| Modifier and Type | Method and Description |
|---|---|
void |
InteractionDialog.addComponent(Component cmp)
Adds a Component to the Container
|
void |
InteractionDialog.addComponent(int index,
Component cmp)
This method adds the Component at a specific index location in the Container
Components array.
|
void |
InteractionDialog.addComponent(int index,
Object constraints,
Component cmp)
Adds a Component to the Container
|
void |
InteractionDialog.addComponent(Object constraints,
Component cmp)
Adds a Component to the Container
|
void |
Accordion.addContent(Component header,
Component body)
Add an item to the Accordion Container
|
void |
Accordion.addContent(String header,
Component body)
Add an item to the Accordion Container
|
void |
InfiniteScrollAdapter.addMoreComponents(Component[] components,
boolean areThereMore)
Invoke this method to add additional components to the container, if you use
addComponent/removeComponent you will get undefined behavior.
|
static void |
InfiniteScrollAdapter.addMoreComponents(Container cnt,
Component[] components,
boolean areThereMore)
Invoke this method to add additional components to the container, if you use
addComponent/removeComponent you will get undefined behavior.
|
Container |
FloatingActionButton.bindFabToContainer(Component cnt)
This is a utility method to bind the FAB to a given Container, it will return a new container to add or will
use the layered pane if the container is a content pane.
|
Container |
FloatingActionButton.bindFabToContainer(Component cnt,
int orientation,
int valign)
This is a utility method to bind the FAB to a given Container, it will return a new container to add or will
use the layered pane if the container is a content pane.
|
static void |
MasterDetail.bindTabletLandscapeMaster(Form rootForm,
Container parentContainer,
Component landscapeUI,
Component portraitUI,
String commandTitle,
Image commandIcon)
Deprecated.
this was a half baked idea that made it into the public API
|
void |
Accordion.collapse(Component body)
Closes the accordion with the given "body"
|
protected Component |
CheckBoxList.decorateComponent(Object modelItem,
Component b) |
protected Component |
SwitchList.decorateComponent(Object modelItem,
Component b) |
protected Component |
ButtonList.decorateComponent(Object modelItem,
Component b)
Decorates buttons.
|
protected Component |
RadioButtonList.decorateComponent(Object modelItem,
Component b) |
void |
Accordion.expand(Component body)
Expands the accordion with the given "body"
|
void |
Ads.focusGained(Component cmp,
HTMLComponent htmlC,
HTMLElement element)
Deprecated.
Called when one of the controls in the HTMLComponent obtained focus
This method will be called only if HTMLComponent.isEventsEnabled() is true
|
void |
Ads.focusLost(Component cmp,
HTMLComponent htmlC,
HTMLElement element)
Deprecated.
Called when one of the controls in the HTMLComponent lost focus
This method will be called only if HTMLComponent.isEventsEnabled() is true
|
void |
InteractionDialog.removeComponent(Component cmp)
removes a Component from the Container, notice that removed component might still have
a pending repaint in the queue that won't be removed.
|
void |
Accordion.removeContent(Component body)
Removes the content from the accordion
|
void |
SplitPane.setBottom(Component cmp)
Sets the component to be placed on the bottom of the split pane.
|
void |
Accordion.setHeader(Component header,
Component body)
Replaces the title for content that was already added.
|
void |
Accordion.setHeader(String header,
Component body)
Replaces the title for content that was already added.
|
void |
Accordion.setHeaderUIID(Component body,
String uiid)
Sets the header UIID for the given accordion uiid
|
void |
SplitPane.setLeft(Component cmp)
Sets the component that should be placed in the left section of the split pane.
|
void |
SplitPane.setRight(Component cmp)
Sets the component to be placed on the right of the split pane.
|
protected void |
CheckBoxList.setSelected(Component button,
boolean selected) |
protected void |
SwitchList.setSelected(Component button,
boolean selected) |
protected abstract void |
ButtonList.setSelected(Component button,
boolean selected)
Sets the given button's selected state.
|
protected void |
RadioButtonList.setSelected(Component button,
boolean selected) |
void |
SplitPane.setTop(Component cmp)
Sets the component that should be placed in the top section of the split pane.
|
void |
InteractionDialog.showPopupDialog(Component c)
A popup dialog is shown with the context of a component and its selection.
|
void |
InteractionDialog.showPopupDialog(Component c,
boolean bias)
A popup dialog is shown with the context of a component and its selection.
|
protected Component |
CheckBoxList.undecorateComponent(Component b) |
protected Component |
SwitchList.undecorateComponent(Component b) |
protected Component |
ButtonList.undecorateComponent(Component b)
Undecorates buttons.
|
protected Component |
RadioButtonList.undecorateComponent(Component b) |
| Constructor and Description |
|---|
SplitPane(int orientation,
Component topOrLeft,
Component bottomOrRight,
String minInset,
String preferredInset,
String maxInset)
Creates a new SplitPane.
|
SplitPane(SplitPane.Settings settings,
Component topOrLeft,
Component bottomOrRight)
Creates a new SplitPane.
|
| Modifier and Type | Method and Description |
|---|---|
Component |
FaceBookAccess.createAuthComponent(ActionListener al)
This method creates a component which can authenticate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
FaceBookAccess.getPicture(String id,
Component targetList,
int targetOffset,
String targetKey,
Dimension toScale,
boolean tempStorage)
Gets the picture of the given facebook object id and stores it in the given List in the offset index
This assumes the GenericListCellRenderer style of
list which relies on a hashtable based model approach.
|
| Modifier and Type | Class and Description |
|---|---|
class |
LikeButton
Deprecated.
This functionality is no longer possible open a BrowserComponent
with the link instead, this class will be removed in next version
|
| Modifier and Type | Method and Description |
|---|---|
Component |
CodenameOneImplementation.getEditingText()
Gets the component that is currently editing text
|
protected abstract Component |
FullScreenAdService.getPendingAd()
Component representing a given ad
|
protected Component |
VServAds.getPendingAd()
Component representing a given ad
|
| Modifier and Type | Method and Description |
|---|---|
void |
CodenameOneImplementation.afterComponentPaint(Component c,
Graphics g)
Called after internal paint of component finishes
|
void |
CodenameOneImplementation.beforeComponentPaint(Component c,
Graphics g)
Called before internal paint of component starts
|
void |
CodenameOneImplementation.componentRemoved(Component c)
Indicates to the port that the component was removed from the view and its
UI should be removed in the next flush operation.
|
Object |
CodenameOneImplementation.createNativeOverlay(Component cmp)
Creates a native overlay for the given component.
|
abstract void |
CodenameOneImplementation.editString(Component cmp,
int maxSize,
int constraint,
String text,
int initiatingKeycode)
Encapsulates the editing code which is specific to the platform, some platforms
would allow "in place editing" MIDP does not.
|
void |
CodenameOneImplementation.editStringImpl(Component cmp,
int maxSize,
int constraint,
String text,
int initiatingKeycode)
Encapsulates the editing code which is specific to the platform, some platforms
would allow "in place editing" MIDP does not.
|
Graphics |
CodenameOneImplementation.getComponentScreenGraphics(Component cmp,
Graphics currentContext)
This method allows customizing/creating a graphics context per component which is useful for
some elaborate implementations of Codename One.
|
void |
CodenameOneImplementation.hideNativeOverlay(Component cmp,
Object nativeOverlay)
Hides the native overlay for a component.
|
boolean |
CodenameOneImplementation.isEditingText(Component c)
Returns true if we are currently editing this component
|
boolean |
CodenameOneImplementation.isNativeEditorVisible(Component c)
Checks whether the native text editor is currently visible over top of the
given component (usually a
TextArea |
void |
CodenameOneImplementation.nothingWithinComponentPaint(Component c)
Indicates to the port that the component won't be painted due to clipping
|
void |
CodenameOneImplementation.setFocusedEditingText(Component cmp)
Sets current editingText value and sets it focused.
|
Object |
CodenameOneImplementation.showNativePicker(int type,
Component source,
Object currentValue,
Object data)
Shows a native modal dialog allowing us to perform the picking for the given type
which can include one of PICKER_TYPE_DATE_AND_TIME, PICKER_TYPE_TIME, PICKER_TYPE_DATE
|
void |
CodenameOneImplementation.updateNativeEditorText(Component c,
String text)
Called when TextArea text is changed.
|
void |
CodenameOneImplementation.updateNativeOverlay(Component cmp,
Object nativeOverlay)
Updates the native overlay after the component has been repositioned.
|
| Modifier and Type | Method and Description |
|---|---|
Component |
Oauth2.createAuthComponent(ActionListener al)
This method creates a component which can authenticate.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
ImageDownloadService.createImageToFileSystem(String url,
Component targetList,
int targetOffset,
String targetKey,
String destFile,
Dimension toScale,
byte priority)
Deprecated.
Constructs an image request that will automatically populate the given list
when the response arrives, it will cache the file locally as a file
in the file storage.
|
static void |
ImageDownloadService.createImageToFileSystem(String url,
Component targetList,
int targetOffset,
String targetKey,
String destFile,
Image placeholder,
byte priority)
Deprecated.
Constructs an image request that will automatically populate the given list
when the response arrives, it will cache the file locally as a file
in the file storage.
|
static void |
ImageDownloadService.createImageToFileSystem(String url,
Component targetList,
ListModel model,
int targetOffset,
String targetKey,
String destFile,
Image placeholder,
byte priority)
Deprecated.
Constructs an image request that will automatically populate the given list
when the response arrives, it will cache the file locally as a file
in the file storage.
|
static void |
ImageDownloadService.createImageToStorage(String url,
Component targetList,
int targetOffset,
String targetKey,
String cacheId,
Dimension scale,
byte priority)
Deprecated.
Constructs an image request that will automatically populate the given list
when the response arrives, it will cache the file locally as a file
in the file storage.
|
static void |
ImageDownloadService.createImageToStorage(String url,
Component targetList,
int targetOffset,
String targetKey,
String cacheId,
Image placeholderImage,
byte priority)
Deprecated.
Constructs an image request that will automatically populate the given list
when the response arrives, it will cache the file locally as a file
in the file storage.
|
static void |
ImageDownloadService.createImageToStorage(String url,
Component targetList,
ListModel model,
int targetOffset,
String targetKey,
String cacheId,
Image placeholderImage,
byte priority)
Deprecated.
Constructs an image request that will automatically populate the given list
when the response arrives, it will cache the file locally as a file
in the file storage.
|
| Constructor and Description |
|---|
ImageDownloadService(String url,
Component targetList,
int targetOffset,
String targetKey)
Deprecated.
Constructs an image request that will automatically populate the given list
when the response arrives.
|
| Modifier and Type | Class and Description |
|---|---|
class |
MapComponent
Deprecated.
we highly recommend migrating to the native maps cn1lib
|
| Modifier and Type | Method and Description |
|---|---|
void |
MapListener.mapPositionUpdated(Component source,
int zoom,
Coord center)
Invoked when the map is zoomed or panned
|
| Modifier and Type | Method and Description |
|---|---|
Component |
Media.getVideoComponent()
Gets the VideoComponent of this Video.
|
| Modifier and Type | Method and Description |
|---|---|
UiBinding.Binding |
UiBinding.bind(PropertyBase prop,
Component cmp)
Binds the given property to the component using default adapters
|
UiBinding.Binding |
UiBinding.bind(PropertyBase prop,
Component cmp,
UiBinding.ComponentAdapter adapt)
Binds the given property to the component using a custom adapter class
|
UiBinding.Binding |
UiBinding.bindGroup(PropertyBase prop,
Object[] values,
Component... cmps)
Binds the given property to the selected value from the set based on the multiple components.
|
| Modifier and Type | Class and Description |
|---|---|
class |
TestRunnerComponent
A UI component for running unit tests and displaying the results.
|
| Modifier and Type | Method and Description |
|---|---|
static Component |
TestUtils.findByName(String componentName)
Finds a component with the given name, works even with UI's that weren't created with the GUI builder
|
Component |
AbstractTest.findByName(String componentName)
This method just invokes the test utils method, it is here for convenience
|
static Component |
TestUtils.getComponentByPath(int[] path)
Gets the component from the current form based on its path.
|
Component |
AbstractTest.getComponentByPath(int[] path)
This method just invokes the test utils method, it is here for convenience
|
| Modifier and Type | Method and Description |
|---|---|
static void |
TestUtils.ensureVisible(Component c)
Scrolls to show the component in case it is invisible currently
|
void |
AbstractTest.ensureVisible(Component c)
This method just invokes the test utils method, it is here for convenience
|
| Modifier and Type | Class and Description |
|---|---|
class |
AutoCompleteTextComponent
A
TextComponent version of AutoCompleteTextField
This component was contributed here https://github.com/codenameone/CodenameOne/issues/2705 |
class |
AutoCompleteTextField
An editable
TextField with completion suggestions
that show up in a drop down menu while the user types in text. |
class |
BrowserComponent
The browser component is an interface to an embeddable native platform browser on platforms
that support embedding the native browser in place, if you need wide compatibility and flexibility
you should check out the HTMLComponent which provides a lightweight 100% cross platform
web component.
This component will only work on platforms that support embedding a native browser which exclude earlier versions of Blackberry devices and J2ME devices. Its recommended that you place this component in a fixed position (none scrollable) on the screen without other focusable components to prevent confusion between focus authority and allow the component to scroll itself rather than CodenameOne making that decision for it. |
class |
Button
Button is the base class for several UI widgets allowing clickability.
|
class |
Calendar
Date widget for selecting a date/time value.
To localize strings for month names use the values "Calendar.Month" using the 3 first characters of the month name in the resource localization e.g. |
class |
CheckBox
CheckBox is a button that can be selected or deselected and displays
its state to the user.
|
class |
ComboBox<T>
A
ComboBox is a list that allows only one selection at a time, when a user clicks
the ComboBox a popup button with the full list of elements allows the selection of
a single element. |
static class |
CommonProgressAnimations.CircleProgress
A progress animation that shows an animated circle.
|
static class |
CommonProgressAnimations.EmptyAnimation
An empty progress animation.
|
static class |
CommonProgressAnimations.LoadingTextAnimation
A progress animation that shows a block of text being typed.
|
static class |
CommonProgressAnimations.ProgressAnimation
Base class for ProgressAnimations
|
class |
ComponentGroup
A component group is a container that applies the given UIID to a set of components within it
and gives the same UIID with "First"/"Last" prepended to the first and last components.
|
class |
Container
A composite pattern with
Component, allows nesting and arranging multiple
components using a pluggable layout manager architecture. |
class |
Dialog
A dialog is a form that occupies a part of the screen and appears as a modal
entity to the developer.
|
class |
Form
|
class |
InfiniteContainer
This abstract Container can scroll indefinitely (or at least until
we run out of data).
|
class |
InputComponent
A base class for
TextComponent, PickerComponent
and potentially other components that wish to accept input in a dynamic way that matches iOS and
Android native input guidelines. |
class |
InterFormContainer
A container that allows you to use the same component on multiple forms.
|
class |
Label
Allows displaying a single line of text and icon (both optional) with different alignment options.
|
class |
List<T>
A set of elements that is rendered using a
ListCellRenderer
and are extracted via the ListModel, notice that
we strongly
discourage usage of lists.A list can represent many UI concepts ranging from a carousel to a "todo" checklist, this is made possible thanks to extensive use of Swing's style of MVC. |
class |
MenuBar
This class represents the Form MenuBar.
|
class |
PeerComponent
A peer component is essentially a "dummy" Codename One component used to calculate the position
of the actual native platform specific component.
|
class |
PickerComponent
A picker component similar to
TextComponent that adapts to native UI
conventions and leverages the Picker API. |
class |
RadioButton
RadioButton is a
Button that maintains a selection state exclusively
within a specific ButtonGroup. |
class |
Sheet
A light-weight dialog that slides up from the bottom of the screen on mobile devices.
|
class |
SideMenuBar
Deprecated.
this class is still used internally but code should be migrated to use the
Toolbar |
class |
Slider
The slider component serves both as a slider widget to allow users to select
a value on a scale via touch/arrows and also to indicate progress.
|
class |
SwipeableContainer
SwipeableContainer allows us to side swipe a component and expose underlying configuration
within it. |
class |
Tabs
A component that lets the user switch between a group of components by
clicking on a tab with a given title and/or icon.
|
class |
TextArea
An optionally multi-line editable region that can display text and allow a user to edit it.
|
class |
TextComponent
Encapsulates a text field and label into a single component.
|
class |
TextComponentPassword
TextComponent extended to automatically add mask/unmask password button near
the TextField; it acts like a normal TextComponent if the Constraint is not
TextArea.PASSWORD
|
class |
TextField
A specialized version of
TextArea with some minor deviations from the original
specifically: |
class |
Toolbar
Toolbar replaces the default title area with a powerful abstraction that
allows functionality ranging from side menus (hamburger) to title animations
and any arbitrary component type.
|
| Modifier and Type | Field and Description |
|---|---|
protected Component |
CommonProgressAnimations.ProgressAnimation.cmp |
| Modifier and Type | Method and Description |
|---|---|
<C extends Component> |
Form.addComponentAwaitingRelease(C c) |
<T extends Component> |
ComponentSelector.asComponent(Class<T> type)
Returns the first component in this set.
|
<C extends Component> |
Form.removeComponentAwaitingRelease(C c) |
| Modifier and Type | Method and Description |
|---|---|
Component |
ComponentSelector.asComponent()
Returns the first component in this set.
|
protected Component |
MenuBar.createCommandComponent(Vector commands)
Creates the component containing the commands within the given vector
used for showing the menu dialog, this method calls the createCommandList
method by default however it allows more elaborate menu creation.
|
protected Component |
Calendar.createDayComponent()
Creates a day within the Calendar, this method is protected allowing
Calendar to be subclassed to replace the rendering logic of individual
day buttons.
|
protected Component |
Form.createStatusBar()
Subclasses can override this method to control the creation of the status bar component.
|
protected Component |
Tabs.createTab(String title,
Font font,
char icon,
float size)
Creates a tab component by default this is a RadioButton but subclasses can use this to return anything
|
protected Component |
Tabs.createTab(String title,
Image icon)
Creates a tab component by default this is a RadioButton but subclasses can use this to return anything
|
abstract Component[] |
InfiniteContainer.fetchComponents(int index,
int amount)
This is an abstract method that should be implemented by the sub classes
to fetch the data.
|
Component |
UIFragment.findById(String id)
Gets a component in the template by its ID.
|
Component |
Form.findCurrentlyEditingComponent()
Returns the component on this form that is currently being edited, or null
if no component is currently being edited.
|
Component |
Container.findDropTargetAt(int x,
int y)
Recursively searches the container hierarchy for a drop target
|
Component |
Container.findFirstFocusable()
Finds the first focusable Component on this Container
|
Component |
Form.findNextFocusHorizontal(boolean right)
This method returns the next focusable Component horizontally
|
Component |
Form.findNextFocusVertical(boolean down)
This method returns the next focusable Component vertically
|
static Component |
TextSelection.findSelectionRoot(Component cmp)
Finds the selection root for a component.
|
Component |
Label.getBadgeStyleComponent()
Gets a component that can be used for the style of the badge.
|
Component |
Container.getClosestComponentTo(int x,
int y)
Very useful for touch events or drop events that need approximation more than accuracy
|
Component |
ComponentImage.getComponent()
Gets the wrapped component that is rendered by this image.
|
Component |
Container.getComponentAt(int index)
Returns the Component at a given index
|
Component |
SwipeableContainer.getComponentAt(int x,
int y) |
Component |
Container.getComponentAt(int x,
int y)
Returns a Component at coordinate (x, y).
|
Component |
Form.TabIterator.getCurrent()
Gets the current component in this iterator.
|
abstract Component |
InputComponent.getEditor()
Returns the editor component e.g.
|
Component |
PickerComponent.getEditor()
Returns the editor component e.g.
|
Component |
AutoCompleteTextComponent.getEditor()
Returns the editor component e.g.
|
Component |
TextComponent.getEditor()
Returns the editor component e.g.
|
Component |
Form.getFocused()
Returns the current focus component for this form
|
Component |
Label.getIconStyleComponent()
Gets the component that should be used for styling material the material icon.
|
Component |
IconHolder.getIconStyleComponent()
Gets the component that should be used for styling material the material icon.
|
Component |
Container.getLeadComponent()
Returns the lead component for this hierarchy if such a component is defined
|
Component |
Form.TabIterator.getNext()
Gets the next component in this iterator.
|
Component |
Form.getNextComponent(Component current)
Gets the next component in focus traversal order.
|
Component |
Component.getNextFocusDown()
Allows us to determine which component will receive focus next when traversing
with the down key
|
Component |
Component.getNextFocusLeft()
Allows us to determine which component will receive focus next when traversing
with the left key.
|
Component |
Component.getNextFocusRight()
Allows us to determine which component will receive focus next when traversing
with the right key
|
Component |
Component.getNextFocusUp()
Allows us to determine which component will receive focus next when traversing
with the up key.
|
Component |
Component.getOwner()
Gets the "owner" of this component as set by
setOwner(com.codename1.ui.Component). |
Component |
Form.TabIterator.getPrevious()
Gets the previous component that should be traversed when going "back" in through the
form components.
|
Component |
Form.getPreviousComponent(Component current)
Gets the previous component in focus traversal order.
|
Component |
Container.getResponderAt(int x,
int y)
Returns the top-most component that responds to pointer events at absolute
coordinate (x, y).
|
Component[] |
Component.getSameHeight()
Returns the array of components that have an equal height
|
Component[] |
Component.getSameWidth()
Returns the array of components that have an equal width
|
Component |
Component.getScrollable()
Returns the scrollable parent of this component
|
Component |
Tabs.getSelectedComponent()
Returns the component associated with the tab at the given index
|
Component |
TextSelection.getSelectionRoot()
Gets the selection root for the current text selection.
|
Component |
Tabs.getTabComponentAt(int index)
Returns the tab at
index. |
Component |
Toolbar.getTitleComponent()
Returns the Toolbar title Component.
|
protected Component |
MenuBar.getTitleComponent()
Gets the Form titleComponent
|
Component |
ComponentSelector.ComponentMapper.map(Component c)
Maps component c to a replacement component.
|
Component |
UIFragment.ComponentFactory.newComponent(Element el)
Creates a new component given its XML description.
|
Component |
UIFragment.DefaultComponentFactory.newComponent(Element el) |
Component |
Form.TabIterator.next()
Returns the next component in this iterator, and repositions the iterator at this component.
|
Component |
Form.TabIterator.previous()
Returns the previous component in this iterator, and repositions the iterator at this component.
|
Component |
Component.stripMarginAndPadding()
Convenience method that strips margin and padding from the component, and
returns itself for chaining.
|
| Modifier and Type | Method and Description |
|---|---|
List<Component> |
ComponentSelector.asList()
Returns the components of this set as a List.
|
List<Component> |
Container.getChildrenAsList(boolean includeQueued)
Gets the child components of this Container as a List.
|
Iterator<Component> |
Container.iterator()
Part of the Iterable interface allowing us to do a for-each loop on Container
|
Iterator<Component> |
ComponentSelector.iterator()
Returns the results of this selector.
|
Iterator<Component> |
Container.iterator(boolean includeQueued)
Obtains an iterator that iterates over the children of this container.
|
| Modifier and Type | Method and Description |
|---|---|
static ComponentSelector |
ComponentSelector.$(Component... cmps)
Wraps provided components in a ComponentSelector set.
|
static ComponentSelector |
ComponentSelector.$(String selector,
Component... roots)
Creates a ComponentSelector with the components matched by the provided selector in the provided
roots' subtrees.
|
void |
Form.TabIterator.add(Component e)
Adds a component to the end of the iterator.
|
Container |
Container.add(Component cmp)
Simpler version of addComponent that allows chaining the calls for shorter syntax
|
boolean |
ComponentSelector.add(Component e)
Explicitly adds a component to the result set.
|
ComponentSelector |
ComponentSelector.add(Component e,
boolean chain)
Fluent API wrapper for
ComponentSelector.add(com.codename1.ui.Component) |
Container |
Container.add(Object constraint,
Component cmp)
Simpler version of addComponent that allows chaining the calls for shorter syntax
|
Container |
Container.addAll(Component... cmps)
Identical to add(x).add(y) only with a shorter syntax
|
void |
Form.addComponent(Component cmp)
Adds Component to the Form's Content Pane
|
void |
Dialog.addComponent(Component cmp)
Adds Component to the Form's Content Pane
|
void |
Container.addComponent(Component cmp)
Adds a Component to the Container
|
void |
Form.addComponent(int index,
Component cmp)
Adds Component to the Form's Content Pane
|
void |
Dialog.addComponent(int index,
Component cmp)
Adds Component to the Form's Content Pane
|
void |
Container.addComponent(int index,
Component cmp)
This method adds the Component at a specific index location in the Container
Components array.
|
void |
Form.addComponent(int index,
Object constraints,
Component cmp)
Adds a Component to the Container
|
void |
Dialog.addComponent(int index,
Object constraints,
Component cmp)
Adds a Component to the Container
|
void |
Container.addComponent(int index,
Object constraints,
Component cmp)
Adds a Component to the Container
|
void |
Form.addComponent(Object constraints,
Component cmp)
Adds a Component to the Container
|
void |
Dialog.addComponent(Object constraints,
Component cmp)
Adds a Component to the Container
|
void |
Container.addComponent(Object constraints,
Component cmp)
Adds a Component to the Container
|
void |
Toolbar.addComponentToLeftSideMenu(Component cmp)
Adds a Component to the left side navigation menu.
|
void |
Toolbar.addComponentToLeftSideMenu(Component cmp,
Command cmd)
Adds a Component to the left side navigation menu.
|
protected void |
Toolbar.addComponentToLeftSideMenu(Container menu,
Component cmp)
This method responsible to add a Component to the left side navigation panel.
|
void |
Toolbar.addComponentToRightSideMenu(Component cmp)
Adds a Component to the right side navigation menu (it requires a
permanent sidemenu or an onTop sidemenu, otherwise it does nothing).
|
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).
|
protected void |
Toolbar.addComponentToRightSideMenu(Container menu,
Component cmp)
This method responsible to add a Component to the right side navigation
panel.
|
void |
Toolbar.addComponentToSideMenu(Component cmp)
Adds a Component to the left or right side navigation menu, according to
the state of RTL.
|
void |
Toolbar.addComponentToSideMenu(Component cmp,
Command cmd)
Adds a Component to the left or right side navigation menu, according to
the state of RTL.
|
protected void |
SideMenuBar.addComponentToSideMenu(Container menu,
Component cmp)
Deprecated.
This method responsible to add a Component to the side navigation panel.
|
protected void |
Toolbar.addComponentToSideMenu(Container menu,
Component cmp)
This method is responsible to add a Component to the left or right side
navigation panel according to the state of RTL.
|
void |
Tabs.addTab(Button tab,
Component component)
Deprecated.
should use radio button as an argument
|
Tabs |
Tabs.addTab(String title,
char materialIcon,
float iconSize,
Component component)
Adds a
component
represented by a title and/or icon,
either of which can be null. |
Tabs |
Tabs.addTab(String title,
char icon,
Font font,
float iconSize,
Component component)
Adds a
component
represented by a title and/or icon,
either of which can be null. |
void |
Tabs.addTab(String title,
Component component)
Adds a
component
represented by a title and no icon. |
void |
Tabs.addTab(String title,
Image icon,
Component component)
Adds a
component
represented by a title and/or icon,
either of which can be null. |
Tabs |
Tabs.addTab(String title,
Image icon,
Image pressedIcon,
Component component)
Adds a
component
represented by a title and/or icon,
either of which can be null. |
ComponentSelector |
ComponentSelector.append(Component child)
Appends a child component to the first container in this set.
|
ComponentSelector |
ComponentSelector.append(Object constraint,
Component child)
Appends a child component to the first container in this set.
|
protected void |
Calendar.bindDayListener(Component cmp,
ActionListener l)
Since a day may be any component type, developers should override this
method to add support for binding the click listener to the given
component.
|
protected void |
Tabs.bindTabActionListener(Component tab,
ActionListener l)
Binds an action listener to the tab component.
|
void |
ComponentSelector.ComponentClosure.call(Component c)
Callback to apply.
|
boolean |
Container.contains(Component cmp)
Returns true if the given component is within the hierarchy of this container
|
boolean |
ComponentSelector.containsInSubtree(Component cmp)
Returns true if any of the containers in the current found set contains
the provided component in its subtree.
|
static Image |
ImageFactory.createImage(Component context,
int w,
int h,
int bgColor)
Creates an image using the factory at a given context.
|
ComponentAnimation |
Container.createReplaceTransition(Component current,
Component next,
Transition t)
This method creates an animation component that replaces the current Component with the next Component.
|
protected void |
Component.dragEnter(Component dragged)
This callback method indicates that a component drag has just entered this component
|
protected void |
Component.dragExit(Component dragged)
This callback method provides an indication for a drop target that a drag operation is exiting the bounds of
this component and it should clear all relevant state if such state exists.
|
protected boolean |
Component.draggingOver(Component dragged,
int x,
int y)
This method allows a component to indicate if it is a drop target for the given component at the given x/y location
(in component coordiate space).
|
void |
Component.drop(Component dragged,
int x,
int y)
Performs a drop operation of the component at the given X/Y location in coordinate space, this method
should be overriden by subclasses to perform all of the logic related to moving a component, by default
this method does nothing and so dragging a component and dropping it has no effect
|
void |
Container.drop(Component dragged,
int x,
int y)
Performs a drop operation of the component at the given X/Y location in coordinate space, this method
should be overriden by subclasses to perform all of the logic related to moving a component, by default
this method does nothing and so dragging a component and dropping it has no effect
|
void |
Display.editString(Component cmp,
int maxSize,
int constraint,
String text)
Fires the native in place text editing logic, normally you wouldn't invoke this API directly and instead
use an API like
TextArea.startEditingAsync(), TextArea.startEditing()
or Form.setEditOnShow(com.codename1.ui.TextArea). |
void |
Display.editString(Component cmp,
int maxSize,
int constraint,
String text,
int initiatingKeycode)
Fires the native in place text editing logic, normally you wouldn't invoke this API directly and instead
use an API like
TextArea.startEditingAsync(), TextArea.startEditing()
or Form.setEditOnShow(com.codename1.ui.TextArea). |
static ComponentGroup |
ComponentGroup.enclose(Component... cmp)
Shorthand method for wrapping the given components in a vertical component group
|
static ComponentGroup |
ComponentGroup.encloseHorizontal(Component... cmp)
Shorthand method for wrapping the given components in a horizontal component group
|
static Container |
Container.encloseIn(Layout l,
Component... cmp)
Short-hand for enclosing multiple components in a container typically a box layout
|
static Container |
Container.encloseIn(Layout l,
Component cmp,
Object cons)
Short-hand for enclosing a component within a Container
|
boolean |
ComponentSelector.Filter.filter(Component c)
Determines whether component c should be included in new set.
|
static Map<InterFormContainer,InterFormContainer> |
InterFormContainer.findCommonContainers(Component root1,
Component root2)
Finds common InterFormContainers in two different component trees.
|
static Sheet |
Sheet.findContainingSheet(Component cmp)
Finds Sheet containing this component if it is currently part of a Sheet.
|
InterFormContainer |
InterFormContainer.findPeer(Component root)
Finds any InterformContainer instances in the UI hierarchy rooted at root
that contains the same content as this container.
|
static Component |
TextSelection.findSelectionRoot(Component cmp)
Finds the selection root for a component.
|
int |
Form.getComponentIndex(Component cmp)
Returns the Component index in the Container
|
int |
Container.getComponentIndex(Component cmp)
Returns the Component index in the Container
|
protected String |
Calendar.getDayText(Component cmp)
Since a day may be any component type, developers should override this
method to add support for removing the click listener from the given
component.
|
static ImageFactory |
ImageFactory.getImageFactory(Component cmp)
Gets the image factory for a given component.
|
Component |
Form.getNextComponent(Component current)
Gets the next component in focus traversal order.
|
Component |
Form.getPreviousComponent(Component current)
Gets the previous component in focus traversal order.
|
static CommonProgressAnimations.ProgressAnimation |
CommonProgressAnimations.ProgressAnimation.getProgressAnimation(Component cmp)
Gets the progress animation that is currently showing for a component.
|
Style |
ComponentSelector.getStyle(Component component)
Gets a style object for the given component that can be used to modify the
component's styles.
|
protected Image |
Tabs.getTabIcon(Component tab)
Returns the icon of the tab component.
|
Form.TabIterator |
Form.getTabIterator(Component start)
Returns an iterator that iterates over all of the components in this form, ordered
by their tab index.
|
protected Image |
Tabs.getTabSelectedIcon(Component tab)
Returns the selected icon of the tab component.
|
protected String |
Tabs.getTabTitle(Component tab)
Returns the title of the tab component.
|
static void |
InputComponent.group(Component... cmps)
Groups together multiple text components and labels so they align properly, this is implicitly invoked
by
TextModeLayout so this method is unnecessary when using that
layout |
int |
Tabs.indexOfComponent(Component component)
Returns the index of the tab for the specified component.
|
static InterFormContainer |
InterFormContainer.inject(String selector,
Container root,
Component content)
Injects the given "content" as an InterFormContainer inside the component hierarchy
rooted at "root"
|
void |
Tabs.insertTab(Component tab,
Component component,
int index)
Deprecated.
should use radio button as an argument
|
void |
Tabs.insertTab(String title,
char icon,
Font font,
float iconSize,
Component component,
int index)
Inserts a
component, at index,
represented by a title and/or icon,
either of which may be null. |
void |
Tabs.insertTab(String title,
Image icon,
Component component,
int index)
Inserts a
component, at index,
represented by a title and/or icon,
either of which may be null. |
boolean |
Component.isOwnedBy(Component cmp)
Checks to see if this component is owned by the given other component.
|
Component |
ComponentSelector.ComponentMapper.map(Component c)
Maps component c to a replacement component.
|
static CommonProgressAnimations.CircleProgress |
CommonProgressAnimations.CircleProgress.markComponentLoading(Component cmp)
Replaces the given component with a CircleProgress until its content is ready.
|
static CommonProgressAnimations.EmptyAnimation |
CommonProgressAnimations.EmptyAnimation.markComponentLoading(Component cmp)
Replaces the given component with an EmptyAnimation until its content is ready.
|
static CommonProgressAnimations.LoadingTextAnimation |
CommonProgressAnimations.LoadingTextAnimation.markComponentLoading(Component cmp)
Replaces the given component with a LoadingTextAnimation until its content is ready.
|
static CommonProgressAnimations.ProgressAnimation |
CommonProgressAnimations.ProgressAnimation.markComponentLoading(Component cmp,
Class<? extends CommonProgressAnimations.ProgressAnimation> type)
Marks a component as "loading", replacing it in its parent conatiner with
a progress animation.
|
static void |
CommonProgressAnimations.ProgressAnimation.markComponentReady(Component cmp)
Marks a component as "ready", if it had previously been marked as "loading".
|
static void |
CommonProgressAnimations.ProgressAnimation.markComponentReady(Component cmp,
Transition t)
Marks a component as "ready", if it had previously been marked as "loading".
|
void |
Container.morph(Component source,
Component destination,
int duration,
Runnable onCompletion)
Morph is similar to the replace functionality where a component might be replaced with
a component that isn't within the container.
|
void |
Container.morphAndWait(Component source,
Component destination,
int duration)
Morph is similar to the replace functionality where a component might be replaced with
a component that isn't within the container.
|
Object |
UIFragment.ComponentFactory.newConstraint(Container parent,
Element parentEl,
Component child,
Element childEl)
Creates a layout constraint for adding a child component to a parent component.
|
Object |
UIFragment.DefaultComponentFactory.newConstraint(Container parent,
Element parentEl,
Component child,
Element childEl) |
TextSelection.Span |
TextSelection.newSpan(Component component)
Creates a new Span based on content in the given component.
|
void |
Display.onEditingComplete(Component c,
String text)
Called by the underlying implementation to indicate that editing in the native
system has completed and changes should propagate into Codename One
|
protected void |
TooltipManager.prepareTooltip(String tip,
Component cmp)
Gets ready to show the tooltip, this method implements the delay
before the actual showing of the tooltip.
|
void |
Form.removeComponent(Component cmp)
Removes a component from the Form's Content Pane
|
void |
Dialog.removeComponent(Component cmp)
Removes a component from the Form's Content Pane
|
void |
Container.removeComponent(Component cmp)
removes a Component from the Container, notice that removed component might still have
a pending repaint in the queue that won't be removed.
|
void |
Form.replace(Component current,
Component next,
Transition t)
This method replaces the current Component with the next Component.
|
void |
Container.replace(Component current,
Component next,
Transition t)
This method replaces the current Component with the next Component.
|
void |
Container.replace(Component current,
Component next,
Transition t,
Runnable onFinish,
int growSpeed)
This method replaces the current Component with the next Component
|
void |
Form.replaceAndWait(Component current,
Component next,
Transition t)
This method replaces the current Component with the next Component.
|
void |
Container.replaceAndWait(Component current,
Component next,
Transition t)
This method replaces the current Component with the next Component.
|
void |
Container.replaceAndWait(Component current,
Component next,
Transition t,
boolean dropEvents)
This method replaces the current Component with the next Component.
|
void |
Container.replaceAndWait(Component current,
Component next,
Transition t,
int layoutAnimationSpeed)
This method replaces the current Component with the next Component.
|
void |
Form.scrollComponentToVisible(Component c)
Makes sure the component is visible in the scroll if this container
is scrollable
|
void |
Container.scrollComponentToVisible(Component c)
Makes sure the component is visible in the scroll if this container is
scrollable
|
ComponentSelector |
ComponentSelector.scrollComponentToVisible(Component cmp)
|
void |
Component.scrollRectToVisible(int x,
int y,
int width,
int height,
Component coordinateSpace)
Makes sure the component is visible in the scroll if this container
is scrollable
|
protected void |
Component.scrollRectToVisible(Rectangle rect,
Component coordinateSpace)
Makes sure the component is visible in the scroll if this container
is scrollable
|
static ComponentSelector |
ComponentSelector.select(Component... cmps)
|
static ComponentSelector |
ComponentSelector.select(String selector,
Component... roots)
|
protected void |
Tabs.selectTab(Component tab)
Invoked to select a specific tab, this method should be overriden for subclasses overriding createTab
|
void |
Form.TabIterator.set(Component e)
Replaces the current component, in the iterator, with the provided component.
|
UIFragment |
UIFragment.set(String paramName,
Component param)
Sets a parameter component in this template.
|
void |
Toolbar.setComponentToRightSideMenuSouth(Component sidemenuSouthComponent)
Places a component in the south portion (bottom) of the right side menu.
|
void |
Toolbar.setComponentToSideMenuSouth(Component sidemenuSouthComponent)
Places a component in the south portion (bottom) of the left side menu.
|
void |
Form.TabIterator.setCurrent(Component cmp)
Sets the current component in the iterator.
|
protected void |
Calendar.setDayEnabled(Component cmp,
boolean enable)
Since a day may be any component type, developers should override this
method to add support for enabling or disabling the right component.
|
protected void |
Calendar.setDayText(Component cmp,
String text)
Since a day may be any component type, developers should override this
method to add support for setting the displayed string.
|
protected void |
Calendar.setDayUIID(Component cmp,
String uiid)
Since a day may be any component type, developers should override this
method to add support for setting the right component's UIID.
|
void |
Form.setFocused(Component focused)
Sets the focused component and fires the appropriate events to make it so
|
static ImageFactory |
ImageFactory.setImageFactory(Component cmp,
ImageFactory f)
Sets the ImageFactory for the given component.
|
void |
Container.setLeadComponent(Component lead)
Sets the lead component for this container, a lead component takes over the entire
component hierarchy and receives all the events for the container hierarchy.
|
ComponentSelector |
ComponentSelector.setLeadComponent(Component lead)
|
static boolean |
FontImage.setMaterialIcon(Component cmp,
char[] icons,
float size)
Helper method that generalizes icon setting code for various component types
|
static boolean |
FontImage.setMaterialIcon(Component cmp,
char icon,
float size)
Helper method that generalizes icon setting code for various component types
|
void |
Component.setNextFocusDown(Component nextFocusDown)
Allows us to determine which component will receive focus next when traversing
with the down key
|
void |
Component.setNextFocusLeft(Component nextFocusLeft)
Allows us to determine which component will receive focus next when traversing
with the left key, this method doesn't affect the general focus behavior.
|
void |
Component.setNextFocusRight(Component nextFocusRight)
Allows us to determine which component will receive focus next when traversing
with the right key
|
void |
Component.setNextFocusUp(Component nextFocusUp)
Allows us to determine which component will receive focus next when traversing
with the up key, this method doesn't affect the general focus behavior.
|
void |
Component.setOwner(Component owner)
Sets the owner of this component to the specified component.
|
static void |
Component.setSameHeight(Component... c)
Places all of these components in the same height group, to remove a component from
the group invoke this method with that component only.
|
static void |
Component.setSameSize(Component... c)
This is identical to invoking
sameWidth followed by sameHeight |
static void |
Component.setSameWidth(Component... c)
Places all of these components in the same width group, to remove a component from
the group invoke this method with that component only.
|
protected void |
Tabs.setTabSelectedIcon(Component tab,
Image icon)
Sets the selected icon of the tab.
|
protected void |
Tabs.setTabTitle(Component tab,
String title,
Image icon)
Updates the tabs title .
|
protected void |
Tabs.setTextPosition(Component tabComponent,
int textPosition)
Invokes set text position on the given tab, the tab should be a toggle button radio by default but
can be anything
|
void |
Toolbar.setTitleComponent(Component titleCmp)
Sets the Toolbar title component.
|
boolean |
Display.shouldRenderSelection(Component c)
This is an internal state flag relevant only for pureTouch mode (otherwise it
will always be true).
|
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.
|
Object |
Display.showNativePicker(int type,
Component source,
Object currentValue,
Object data)
Shows a native modal dialog allowing us to perform the picking for the given type
which can include one of PICKER_TYPE_DATE_AND_TIME, PICKER_TYPE_TIME, PICKER_TYPE_DATE
|
static Object |
CN.showNativePicker(int type,
Component source,
Object currentValue,
Object data)
Shows a native modal dialog allowing us to perform the picking for the given type
which can include one of PICKER_TYPE_DATE_AND_TIME, PICKER_TYPE_TIME, PICKER_TYPE_DATE
|
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 void |
TooltipManager.showTooltip(String tip,
Component cmp)
Shows the actual tooltip, this is invoked when the time for the tooltip
elapses.
|
void |
Display.stopEditing(Component cmp)
Allows us to stop editString on the given text component
|
void |
Display.stopEditing(Component cmp,
Runnable onFinish)
Allows us to stop editString on the given text component or Form.
|
protected void |
Calendar.updateButtonDayDate(Component dayButton,
int currentMonth,
int day)
This method updates the Button day.
|
protected void |
Calendar.updateButtonDayDate(Component dayButton,
int year,
int currentMonth,
int day)
This method updates the Button day.
|
| Modifier and Type | Method and Description |
|---|---|
static ComponentSelector |
ComponentSelector.$(Set<Component> cmps)
Creates a new ComponentSelector with the provided set of components.
|
static ComponentSelector |
ComponentSelector.$(String selector,
Collection<Component> roots)
Creates a ComponentSelector with the components matched by the provided selector in the provided
roots' subtrees.
|
boolean |
ComponentSelector.addAll(Collection<? extends Component> c)
Adds all components in the given collection to the result set.
|
ComponentSelector |
ComponentSelector.addAll(Collection<? extends Component> c,
boolean chain)
Fluent API wrapper for
ComponentSelector.addAll(java.util.Collection). |
static ComponentSelector |
ComponentSelector.select(Set<Component> cmps)
Alias of
ComponentSelector.$(java.util.Set) |
static ComponentSelector |
ComponentSelector.select(String selector,
Collection<Component> roots)
|
| Constructor and Description |
|---|
ComponentImage(Component cmp,
int w,
int h)
Creates a new image that renders the given component.
|
ComponentSelector(Component... cmps)
Creates a component selector that wraps the provided components.
|
ComponentSelector(String selector,
Component... roots)
Creates a selector with the provided roots.
|
InterFormContainer(Component content)
Creates an interform container with the provided content.
|
Span(Component c)
Creates a new span for the given component.
|
SwipeableContainer(Component bottomLeft,
Component top)
Simple Constructor
|
SwipeableContainer(Component bottomLeft,
Component bottomRight,
Component top)
Simple Constructor
|
| Constructor and Description |
|---|
ComponentSelector(Set<Component> cmps)
Creates a component selector that wraps the provided components.
|
ComponentSelector(String selector,
Collection<Component> roots)
Creates a selector with the provided roots.
|
| Modifier and Type | Method and Description |
|---|---|
Component |
Transition.getDestination()
Returns the destination form that should be set once animation is completed
|
Component |
Transition.getSource()
Returns the source form which is the form from which the animation is starting.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Transition.init(Component source,
Component destination)
Invoked by
Display to set the source and destination forms. |
| Modifier and Type | Method and Description |
|---|---|
Component |
ActionEvent.getActualComponent()
Identical to
ActionEvent.getComponent() except for the fact that a lead component will be returned
if such a lead component is available. |
Component |
ActionEvent.getComponent()
Returns the component that generated the event.
|
Component |
ActionEvent.getDraggedComponent()
Set in the case of a drop listener, returns the component being dragged
|
Component |
ActionEvent.getDropTarget()
Set in the case of a drop listener, returns the component on which the drop occurs
|
| Modifier and Type | Method and Description |
|---|---|
void |
FocusListener.focusGained(Component cmp)
Invoked when component gains focus
|
void |
FocusListener.focusLost(Component cmp)
Invoked when component loses focus
|
| 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
|
ActionEvent(Component dragged,
ActionEvent.Type type,
Component drop,
int x,
int y)
Creates a new instance of ActionEvent for a drop operation
|
ActionEvent(Component dragged,
Component drop,
int x,
int y)
Creates a new instance of ActionEvent for a drop operation
|
ComponentStateChangeEvent(Component source,
boolean initialized)
Creates a ComponentStateChangeEvent.
|
| Modifier and Type | Class and Description |
|---|---|
class |
HTMLComponent
Deprecated.
this component includes some customizability advantages but its probably better for 99% of the use
cases to use the WebBrowser Component from the Components package. That component works with the native
browser when applicable which is a far superior approach.
|
| Modifier and Type | Method and Description |
|---|---|
void |
HTMLCallback.focusGained(Component cmp,
HTMLComponent htmlC,
HTMLElement element)
Called when one of the controls in the HTMLComponent obtained focus
This method will be called only if HTMLComponent.isEventsEnabled() is true
|
void |
DefaultHTMLCallback.focusGained(Component cmp,
HTMLComponent htmlC,
HTMLElement element)
{Called when one of the controls in the HTMLComponent obtained focus
This method will be called only if HTMLComponent.isEventsEnabled() is true}
|
void |
HTMLCallback.focusLost(Component cmp,
HTMLComponent htmlC,
HTMLElement element)
Called when one of the controls in the HTMLComponent lost focus
This method will be called only if HTMLComponent.isEventsEnabled() is true
|
void |
DefaultHTMLCallback.focusLost(Component cmp,
HTMLComponent htmlC,
HTMLElement element)
{Called when one of the controls in the HTMLComponent lost focus
This method will be called only if HTMLComponent.isEventsEnabled() is true}
|
| Modifier and Type | Field and Description |
|---|---|
protected Hashtable<Component,GridBagConstraints> |
GridBagLayout.comptable |
| Modifier and Type | Method and Description |
|---|---|
Component |
BorderLayout.getCenter()
Returns the component in the center location
|
protected Component[] |
LayeredLayout.getChildrenInTraversalOrder(Container parent) |
protected Component[] |
BorderLayout.getChildrenInTraversalOrder(Container parent) |
protected Component[] |
Layout.getChildrenInTraversalOrder(Container parent)
Gets the children of the parent container in the order that they should
be traversed when tabbing through a form.
|
Component |
BorderLayout.getEast()
Returns the component in the east location
|
Component |
BorderLayout.getNorth()
Returns the component in the north location
|
Component |
BorderLayout.getOverlay()
Returns overlay component.
|
Component |
LayeredLayout.LayeredLayoutConstraint.Inset.getReferenceComponent()
Gets the reference component for this inset.
|
Component |
BorderLayout.getSouth()
Returns the component in the south location
|
Component |
BorderLayout.getWest()
Returns the component in the west location
|
| Modifier and Type | Method and Description |
|---|---|
Set<Component> |
LayeredLayout.LayeredLayoutConstraint.getDependencies()
Gets the dependencies (i.e.
|
Set<Component> |
LayeredLayout.LayeredLayoutConstraint.Inset.getDependencies()
Recursively gets all of the reference components of this inset.
|
Set<Component> |
LayeredLayout.LayeredLayoutConstraint.getDependencies(Set<Component> deps)
Gets the dependencies (i.e.
|
Set<Component> |
LayeredLayout.LayeredLayoutConstraint.Inset.getDependencies(Set<Component> deps)
Recursively gets all of the reference components of this inset.
|
| Modifier and Type | Method and Description |
|---|---|
GroupLayout.SequentialGroup |
GroupLayout.SequentialGroup.add(boolean useAsBaseline,
Component component)
Adds a
Component to this Group. |
GroupLayout.SequentialGroup |
GroupLayout.SequentialGroup.add(boolean useAsBaseline,
Component component,
int min,
int pref,
int max)
Adds a
Component to this Group
with the specified size. |
GroupLayout.SequentialGroup |
GroupLayout.SequentialGroup.add(Component component)
Adds the specified Component.
|
GroupLayout.ParallelGroup |
GroupLayout.ParallelGroup.add(Component component)
Adds the specified Component.
|
GroupLayout.SequentialGroup |
GroupLayout.SequentialGroup.add(Component component,
int min,
int pref,
int max)
Adds the specified
Component. |
GroupLayout.ParallelGroup |
GroupLayout.ParallelGroup.add(Component component,
int min,
int pref,
int max)
Adds the specified
Component. |
GroupLayout.ParallelGroup |
GroupLayout.ParallelGroup.add(int alignment,
Component component)
Adds the specified Component.
|
GroupLayout.ParallelGroup |
GroupLayout.ParallelGroup.add(int alignment,
Component component,
int min,
int pref,
int max)
Adds the specified
Component. |
void |
LayeredLayout.addLayoutComponent(Object value,
Component comp,
Container c) |
void |
GridBagLayout.addLayoutComponent(Object constraints,
Component comp,
Container c) |
void |
BorderLayout.addLayoutComponent(Object name,
Component comp,
Container c)
Some layouts can optionally track the addition of elements with meta-data
that allows the user to "hint" on object positioning.
|
void |
TextModeLayout.addLayoutComponent(Object value,
Component comp,
Container c)
Some layouts can optionally track the addition of elements with meta-data
that allows the user to "hint" on object positioning.
|
void |
Layout.addLayoutComponent(Object value,
Component comp,
Container c)
Some layouts can optionally track the addition of elements with meta-data
that allows the user to "hint" on object positioning.
|
GroupLayout.SequentialGroup |
GroupLayout.SequentialGroup.addPreferredGap(Component comp1,
Component comp2,
int type)
Adds an element representing the preferred gap between the two
components.
|
GroupLayout.SequentialGroup |
GroupLayout.SequentialGroup.addPreferredGap(Component comp1,
Component comp2,
int type,
boolean canGrow)
Adds an element representing the preferred gap between the two
components.
|
int |
LayeredLayout.LayeredLayoutConstraint.Inset.calcPreferredValue(Container parent,
Component cmp)
Calculate the preferred value of this inset.
|
static Container |
BorderLayout.center(Component center)
Convenience method that creates a border layout container and places the given component in the center
|
static Container |
BorderLayout.centerAbsolute(Component center)
Convenience method that creates a border layout container and places the given component in the center
with the
BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE constraint applied |
static Container |
BorderLayout.centerAbsoluteEastWest(Component center,
Component east,
Component west)
Convenience method that creates a border layout absolute center container and places the given component in the center
east and west respectively
|
static Container |
BorderLayout.centerCenter(Component center)
Convenience method that creates a border layout container and places the given component in the center
with the
BorderLayout.CENTER_BEHAVIOR_CENTER constraint applied |
static Container |
BorderLayout.centerCenterEastWest(Component center,
Component east,
Component west)
Convenience method that creates a border layout center container and places the given component in the center
east and west respectively with the
BorderLayout.CENTER_BEHAVIOR_CENTER constraint applied |
static Container |
BorderLayout.centerEastWest(Component center,
Component east,
Component west)
Convenience method that creates a border layout container and places the given component in the center
east and west respectively
|
static Container |
BorderLayout.centerTotalBelow(Component center)
Convenience method that creates a border layout container and places the given component in the center
with the
BorderLayout.CENTER_BEHAVIOR_TOTAL_BELOW constraint applied |
static Container |
BorderLayout.centerTotalBelowEastWest(Component center,
Component east,
Component west)
Convenience method that creates a border layout center container and places the given component in the center
east and west respectively with the
BorderLayout.CENTER_BEHAVIOR_TOTAL_BELOW constraint applied |
LayeredLayout.LayeredLayoutConstraint.Inset |
LayeredLayout.LayeredLayoutConstraint.Inset.changeReference(Container parent,
Component newRef,
float pos)
Changes the reference component, while updating the value to remain in the same
absolute position.
|
LayeredLayout.LayeredLayoutConstraint.Inset |
LayeredLayout.LayeredLayoutConstraint.Inset.changeUnits(byte unit,
Component cmp)
|
LayeredLayout.LayeredLayoutConstraint.Inset |
LayeredLayout.LayeredLayoutConstraint.Inset.copyTo(Component cmp)
Copies this inset into the corresponding inset of the provided component.
|
boolean |
LayeredLayout.LayeredLayoutConstraint.dependsOn(Component cmp)
Checks to see if this constraint has the given component in its set of dependencies.
|
static Container |
BorderLayout.east(Component east)
Convenience method that creates a border layout container and places the given component in the east
|
static Container |
FlowLayout.encloseBottom(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.LEFT, Component.BOTTOM), cmps);
|
static Container |
FlowLayout.encloseBottomByRow(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.LEFT, Component.BOTTOM, true), cmps);
|
static Container |
FlowLayout.encloseCenter(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.CENTER), cmps);
|
static Container |
FlowLayout.encloseCenterBottom(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.CENTER, Component.BOTTOM), cmps);
|
static Container |
FlowLayout.encloseCenterBottomByRow(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.CENTER, Component.BOTTOM, true), cmps);
|
static Container |
FlowLayout.encloseCenterMiddle(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.CENTER, Component.CENTER), cmps);
|
static Container |
FlowLayout.encloseCenterMiddleByRow(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.CENTER, Component.CENTER, true), cmps);
|
static Container |
GridLayout.encloseIn(Component... cmp)
Creates a new container with an auto fit grid layout and the components added to it
|
static Container |
LayeredLayout.encloseIn(Component... cmps)
Shorthand for Container.encloseIn(new LayeredLayout(), cmps);
|
static Container |
FlowLayout.encloseIn(Component... cmps)
Shorthand for
Container.encloseIn(com.codename1.ui.layouts.Layout, com.codename1.ui.Component...)
with a FlowLayout instance see: |
static Container |
GridLayout.encloseIn(int columns,
Component... cmp)
Creates a new container with the grid layout and the components added to it
|
static Container |
FlowLayout.encloseLeftMiddle(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.LEFT, Component.CENTER), cmps);
|
static Container |
FlowLayout.encloseLeftMiddleByRow(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.LEFT, Component.CENTER, true), cmps);
|
static Container |
FlowLayout.encloseMiddle(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.LEFT, Component.CENTER), cmps);
|
static Container |
FlowLayout.encloseMiddleByRow(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.LEFT, Component.CENTER, true), cmps);
|
static Container |
FlowLayout.encloseRight(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.RIGHT), cmps);
|
static Container |
FlowLayout.encloseRightBottom(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.RIGHT, Component.BOTTOM), cmps);
|
static Container |
FlowLayout.encloseRightBottomByRow(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.RIGHT, Component.BOTTOM, true), cmps);
|
static Container |
FlowLayout.encloseRightMiddle(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.RIGHT, Component.CENTER), cmps);
|
static Container |
FlowLayout.encloseRightMiddleByRow(Component... cmps)
Shorthand for Container.encloseIn(new FlowLayout(Component.RIGHT, Component.CENTER, true), cmps);
|
static Container |
BoxLayout.encloseX(Component... cmps)
The equivalent of Container.enclose() with a box layout X
![]() |
static Container |
BoxLayout.encloseXCenter(Component... cmps)
The equivalent of Container.enclose() with a box layout X, with center alignment.
|
static Container |
BoxLayout.encloseXNoGrow(Component... cmps)
The equivalent of Container.enclose() with a box layout X no grow option
![]() |
static Container |
BoxLayout.encloseXRight(Component... cmps)
The equivalent of Container.enclose() with a box layout X, with right alignment.
|
static Container |
BoxLayout.encloseY(Component... cmps)
The equivalent of Container.enclose() with a box layout Y
![]() |
static Container |
BoxLayout.encloseYBottom(Component... cmps)
The equivalent of Container.enclose() with a box layout Y, with bottom alignment.
|
static Container |
BoxLayout.encloseYBottomLast(Component... cmps)
The equivalent of Container.enclose() with a box layout Y in bottom
last mode
|
static Container |
BoxLayout.encloseYCenter(Component... cmps)
The equivalent of Container.enclose() with a box layout Y, with center alignment.
|
int |
LayeredLayout.LayeredLayoutConstraint.Inset.getAbsolutePixels(Component cmp)
Returns the total inset of this inset when applied to the given component.
|
String |
LayeredLayout.getBottomInsetAsString(Component cmp)
Gets the bottom inset as a string.
|
Object |
LayeredLayout.getComponentConstraint(Component comp)
Gets the LayeredLayoutConstraint associated with the given component.
|
Object |
GridBagLayout.getComponentConstraint(Component comp) |
Object |
BorderLayout.getComponentConstraint(Component comp)
Returns the component constraint
|
Object |
TextModeLayout.getComponentConstraint(Component comp)
Returns the optional component constraint
|
Object |
Layout.getComponentConstraint(Component comp)
Returns the optional component constraint
|
int |
LayoutStyle.getContainerGap(Component component,
int position,
Container parent)
Returns the amount of space to position a component inside its
parent.
|
LayeredLayout.LayeredLayoutConstraint.Inset |
LayeredLayout.getInset(Component cmp,
int side)
Gets an
LayeredLayout.LayeredLayoutConstraint.Inset associated with the provided component |
String |
LayeredLayout.getInsetsAsString(Component cmp,
boolean withLabels)
Returns the insets for the given component as a string.
|
LayeredLayout.LayeredLayoutConstraint |
LayeredLayout.getLayeredLayoutConstraint(Component cmp)
Wraps
LayeredLayout.getComponentConstraint(com.codename1.ui.Component) and casts it
directly to LayeredLayout.LayeredLayoutConstraint. |
String |
LayeredLayout.getLeftInsetAsString(Component cmp)
Gets the left inset as a string.
|
LayeredLayout.LayeredLayoutConstraint |
LayeredLayout.getOrCreateConstraint(Component cmp)
If the given component already has a LayeredLayoutConstraint, then this
will return it.
|
float |
LayeredLayout.getPercentInsetAnchorHorizontal(Component cmp)
|
float |
LayeredLayout.getPercentInsetAnchorVertical(Component cmp)
|
int |
LayoutStyle.getPreferredGap(Component component1,
Component component2,
int type,
int position,
Container parent)
Returns the amount of space to use between two components.
|
Rectangle |
LayeredLayout.LayeredLayoutConstraint.getReferenceBox(Container parent,
Component cmp)
Deprecated.
Use {@link #getReferenceBox(com.codename1.ui.Container)
|
Rectangle |
LayeredLayout.LayeredLayoutConstraint.getReferenceBox(Container parent,
Component cmp2,
Rectangle box)
|
String |
LayeredLayout.getRightInsetAsString(Component cmp)
Gets the right inset as a string.
|
String |
LayeredLayout.getTopInsetAsString(Component cmp)
Gets the top inset as a string.
|
boolean |
LayeredLayout.LayeredLayoutConstraint.hasCircularDependency(Component start)
Checks to see if this constraint has any circular dependencies.
|
void |
GroupLayout.linkSize(Component[] components)
Forces the set of components to have the same size.
|
void |
GroupLayout.linkSize(Component[] components,
int axis)
Forces the set of components to have the same size.
|
protected GridBagConstraints |
GridBagLayout.lookupConstraints(Component comp) |
static Container |
BorderLayout.north(Component north)
Convenience method that creates a border layout container and places the given component in the north
|
LayeredLayout.LayeredLayoutConstraint.Inset |
LayeredLayout.LayeredLayoutConstraint.Inset.referenceComponent(Component cmp)
Sets the reference component for this inset.
|
void |
GroupLayout.removeLayoutComponent(Component component)
Notification that a
Component has been removed from
the parent container. |
void |
GridBagLayout.removeLayoutComponent(Component comp) |
void |
BorderLayout.removeLayoutComponent(Component comp)
Removes the component from the layout this operation is only useful if the
layout maintains references to components within it
|
void |
TextModeLayout.removeLayoutComponent(Component comp)
Removes the component from the layout this operation is only useful if the
layout maintains references to components within it
|
void |
Layout.removeLayoutComponent(Component comp)
Removes the component from the layout this operation is only useful if the
layout maintains references to components within it
|
void |
GroupLayout.replace(Component existingComponent,
Component newComponent)
Removes an existing component replacing it with the specified component.
|
void |
GridBagLayout.setConstraints(Component comp,
GridBagConstraints constraints) |
void |
GroupLayout.setHonorsVisibility(Component component,
Boolean honorsVisibility)
Sets whether the component's visibility is considered for
sizing and positioning.
|
LayeredLayout |
LayeredLayout.setInsetBottom(Component cmp,
String inset)
Sets the top inset for this component to the prescribed value.
|
LayeredLayout |
LayeredLayout.setInsetLeft(Component cmp,
String inset)
Sets the left inset for this component to the prescribed value.
|
LayeredLayout |
LayeredLayout.setInsetRight(Component cmp,
String inset)
Sets the right inset for this component to the prescribed value.
|
LayeredLayout |
LayeredLayout.setInsets(Component cmp,
String insets)
Sets the insets for the component cmp to the values specified in insets.
|
LayeredLayout |
LayeredLayout.setInsetTop(Component cmp,
String inset)
Sets the top inset for this component to the prescribed value.
|
LayeredLayout |
LayeredLayout.setPercentInsetAnchorHorizontal(Component cmp,
float anchor)
|
LayeredLayout |
LayeredLayout.setPercentInsetAnchorVertical(Component cmp,
float anchor)
|
LayeredLayout |
LayeredLayout.setReferenceComponentBottom(Component cmp,
Component referenceComponent)
Sets the reference component for the bottom inset of the given component.
|
LayeredLayout |
LayeredLayout.setReferenceComponentBottom(Component cmp,
Component referenceComponent,
float position)
Sets the reference component for the bottom inset of the given component.
|
LayeredLayout |
LayeredLayout.setReferenceComponentLeft(Component cmp,
Component referenceComponent)
Sets the reference component for the left inset of the given component.
|
LayeredLayout |
LayeredLayout.setReferenceComponentLeft(Component cmp,
Component referenceComponent,
float position)
Sets the reference component for the left inset of the given component.
|
LayeredLayout |
LayeredLayout.setReferenceComponentRight(Component cmp,
Component referenceComponent)
Sets the reference component for the right inset of the given component.
|
LayeredLayout |
LayeredLayout.setReferenceComponentRight(Component cmp,
Component referenceComponent,
float position)
Sets the reference component for the right inset of the given component.
|
LayeredLayout.LayeredLayoutConstraint |
LayeredLayout.LayeredLayoutConstraint.setReferenceComponents(Component... refs)
Sets the reference components for the constraint.
|
LayeredLayout |
LayeredLayout.setReferenceComponents(Component cmp,
Component... referenceComponents)
Sets the reference components for the insets of cmp.
|
LayeredLayout |
LayeredLayout.setReferenceComponents(Component cmp,
Component... referenceComponents)
Sets the reference components for the insets of cmp.
|
LayeredLayout |
LayeredLayout.setReferenceComponents(Component cmp,
String refs)
Sets the reference components for this component as a string of 1 to 4 component indices separated by spaces.
|
LayeredLayout |
LayeredLayout.setReferenceComponentTop(Component cmp,
Component referenceComponent)
Sets the reference component for the top inset of the given component.
|
LayeredLayout |
LayeredLayout.setReferenceComponentTop(Component cmp,
Component referenceComponent,
float position)
Sets the reference component for the top inset of the given component.
|
LayeredLayout |
LayeredLayout.setReferencePositionBottom(Component cmp,
float position)
Sets the bottom inset reference position.
|
LayeredLayout |
LayeredLayout.setReferencePositionLeft(Component cmp,
float position)
Sets the left inset reference position.
|
LayeredLayout |
LayeredLayout.setReferencePositionRight(Component cmp,
float position)
Sets the right inset reference position.
|
LayeredLayout |
LayeredLayout.setReferencePositions(Component cmp,
float... referencePositions)
Sets the reference positions for reference components.
|
LayeredLayout |
LayeredLayout.setReferencePositions(Component cmp,
String positions)
Sets the reference positions for reference components.
|
LayeredLayout |
LayeredLayout.setReferencePositionTop(Component cmp,
float position)
Sets the top inset reference position.
|
static Container |
BorderLayout.south(Component south)
Convenience method that creates a border layout container and places the given component in the south
|
static Container |
BorderLayout.west(Component west)
Convenience method that creates a border layout container and places the given component in the west
|
| Modifier and Type | Method and Description |
|---|---|
Set<Component> |
LayeredLayout.LayeredLayoutConstraint.getDependencies(Set<Component> deps)
Gets the dependencies (i.e.
|
Set<Component> |
LayeredLayout.LayeredLayoutConstraint.Inset.getDependencies(Set<Component> deps)
Recursively gets all of the reference components of this inset.
|
| Modifier and Type | Method and Description |
|---|---|
Map<Component,Object> |
MigLayout.getConstraintMap()
Deprecated.
Returns a shallow copy of the constraints map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MigLayout.addLayoutComponent(Component comp,
Object constraints)
Deprecated.
|
void |
MigLayout.addLayoutComponent(Object value,
Component comp,
Container c)
Deprecated.
|
static <E> E |
MigLayout.findType(Class<E> clazz,
Component comp)
Deprecated.
|
Object |
MigLayout.getComponentConstraint(Component comp)
Deprecated.
|
Object |
MigLayout.getComponentConstraints(Component comp)
Deprecated.
Returns the component constraints as a String representation.
|
boolean |
MigLayout.isManagingComponent(Component c)
Deprecated.
Returns if this layout manager is currently managing this component.
|
void |
MigLayout.removeLayoutComponent(Component comp)
Deprecated.
|
void |
MigLayout.setComponentConstraints(Component comp,
Object constr)
Deprecated.
Sets the component constraint for the component that already must be
handled by this layout manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
MigLayout.setConstraintMap(Map<Component,Object> map)
Deprecated.
Sets the constraints map.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ContainerList
Deprecated.
the performance of ContainerList is worse than the performance of List or Container. The API/behaviors
are problematic and we don't think its the right choice for any project. It is our recommendation that you use
Container, InfiniteContainer etc.
|
class |
DefaultListCellRenderer<T>
Default implementation of the renderer based on a label see the
ListCellRenderer
for more information about the use and purpose of this class |
class |
MultiList
A list with a
MultiButton renderer, notice that
we strongly
discourage usage of lists.. |
| Modifier and Type | Method and Description |
|---|---|
Component |
GenericListCellRenderer.getCellRendererComponent(Component list,
Object model,
T value,
int index,
boolean isSelected)
Returns a component instance that is already set to render "value".
|
Component |
DefaultListCellRenderer.getCellRendererComponent(Component list,
Object model,
T value,
int index,
boolean isSelected)
Returns a component instance that is already set to render "value".
|
Component |
CellRenderer.getCellRendererComponent(Component list,
Object model,
T value,
int index,
boolean isSelected)
Deprecated.
Returns a component instance that is already set to render "value".
|
Component |
GenericListCellRenderer.getFocusComponent(Component list)
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
Component |
DefaultListCellRenderer.getFocusComponent(Component list)
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
Component |
CellRenderer.getFocusComponent(Component list)
Deprecated.
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
Component |
GenericListCellRenderer.getListCellRendererComponent(List list,
T value,
int index,
boolean isSelected)
Returns a component instance that is already set to render "value".
|
Component |
DefaultListCellRenderer.getListCellRendererComponent(List list,
T value,
int index,
boolean isSelected)
Returns a component instance that is already set to render "value".
|
Component |
ListCellRenderer.getListCellRendererComponent(List list,
T value,
int index,
boolean isSelected)
Returns a component instance that is already set to render "value".
|
Component |
GenericListCellRenderer.getListFocusComponent(List list)
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
Component |
DefaultListCellRenderer.getListFocusComponent(List list)
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
Component |
ListCellRenderer.getListFocusComponent(List list)
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
Component |
GenericListCellRenderer.getSelected() |
Component |
GenericListCellRenderer.getSelectedEven() |
Component |
GenericListCellRenderer.getUnselected() |
Component |
GenericListCellRenderer.getUnselectedEven() |
| Modifier and Type | Method and Description |
|---|---|
Component |
GenericListCellRenderer.getCellRendererComponent(Component list,
Object model,
T value,
int index,
boolean isSelected)
Returns a component instance that is already set to render "value".
|
Component |
DefaultListCellRenderer.getCellRendererComponent(Component list,
Object model,
T value,
int index,
boolean isSelected)
Returns a component instance that is already set to render "value".
|
Component |
CellRenderer.getCellRendererComponent(Component list,
Object model,
T value,
int index,
boolean isSelected)
Deprecated.
Returns a component instance that is already set to render "value".
|
Component |
GenericListCellRenderer.getFocusComponent(Component list)
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
Component |
DefaultListCellRenderer.getFocusComponent(Component list)
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
Component |
CellRenderer.getFocusComponent(Component list)
Deprecated.
Returns a component instance that is painted under the currently focused renderer
and is animated to provide smooth scrolling.
|
| Constructor and Description |
|---|
GenericListCellRenderer(Component selected,
Component unselected)
Constructs a generic renderer with the given selected/unselected components
|
GenericListCellRenderer(Component odd,
Component oddUnselected,
Component even,
Component evenUnselected)
Constructs a generic renderer with the given selected/unselected components for
odd/even values allowing a "pinstripe" effect
|
| Constructor and Description |
|---|
BackgroundPainter(Component parent)
Construct a background painter for the given component
|
| Modifier and Type | Method and Description |
|---|---|
void |
LookAndFeel.bind(Component cmp)
Deprecated.
Every component binds itself to the look and feel thus allowing the look
and feel to customize the component.
|
void |
DefaultLookAndFeel.bind(Component cmp)
Deprecated.
Every component binds itself to the look and feel thus allowing the look
and feel to customize the component.
|
void |
LookAndFeel.drawHorizontalScroll(Graphics g,
Component c,
float offsetRatio,
float blockSizeRatio)
Deprecated.
Draws a horizontal scroll bar in the given component
|
abstract void |
LookAndFeel.drawPullToRefresh(Graphics g,
Component cmp,
boolean taskExecuted)
Deprecated.
Paints the pull to refresh
|
void |
DefaultLookAndFeel.drawPullToRefresh(Graphics g,
Component cmp,
boolean taskExecuted)
Deprecated.
Paints the pull to refresh
|
void |
LookAndFeel.drawVerticalScroll(Graphics g,
Component c,
float offsetRatio,
float blockSizeRatio)
Deprecated.
Draws a vertical scroll bar in the given component
|
void |
DefaultLookAndFeel.focusGained(Component cmp)
Deprecated.
Invoked when component gains focus
|
void |
DefaultLookAndFeel.focusLost(Component cmp)
Deprecated.
Invoked when component loses focus
|
void |
Border.paint(Graphics g,
Component c)
Draws the border for the given component, this method is called before a call to
background painting is made.
|
void |
RoundRectBorder.paintBorderBackground(Graphics g,
Component c) |
void |
CSSBorder.paintBorderBackground(Graphics g,
Component c)
Has effect when the border demands responsibility for background painting
normally the painter will perform this work but in this case the border might
do it instead.
|
void |
Border.paintBorderBackground(Graphics g,
Component c)
Has effect when the border demands responsibility for background painting
normally the painter will perform this work but in this case the border might
do it instead.
|
void |
RoundBorder.paintBorderBackground(Graphics g,
Component c) |
void |
LookAndFeel.paintTensileHighlight(Component t,
Graphics g,
boolean top,
int opacity)
Deprecated.
Paints the tensile hightlight image
|
void |
LookAndFeel.setFG(Graphics g,
Component c)
Deprecated.
Sets the foreground color and font for a generic component, reuse-able by most component
drawing code
|
void |
Border.setImageBorderSpecialTile(Image tileTop,
Image tileBottom,
Image tileLeft,
Image tileRight,
Component trackComponent)
This method is designed mainly for the purpose of creating an arrow that will track a specific component using the image border
the tile given would be an arrow like image just like the ones used for the top/bottom/left/right images.
|
void |
Border.setTrackComponent(Component trackComponent)
In the case of an arrow border the track component lets us track the position
to which the border is pointing
|
| Modifier and Type | Class and Description |
|---|---|
class |
Scene
Deprecated.
For internal use only
|
| Modifier and Type | Class and Description |
|---|---|
class |
BaseSpinner
Base class for spinners
|
class |
DateSpinner
Deprecated.
use Picker instead
|
class |
DateTimeSpinner
Deprecated.
use Picker instead
|
class |
GenericSpinner
Deprecated.
use Picker instead
|
class |
NumericSpinner
Deprecated.
use Picker instead
|
class |
Picker
Picker is a component and API that allows either popping up a spinner or
using the native picker API when applicable. |
class |
TimeSpinner
Deprecated.
use Picker instead
|
| Modifier and Type | Class and Description |
|---|---|
class |
Table
The
Table class represents a grid of data that can be used for rendering a grid
of components/labels. |
| Modifier and Type | Method and Description |
|---|---|
protected Component |
Table.createCell(Object value,
int row,
int column,
boolean editable)
Creates a cell based on the given value
|
protected Component[] |
TableLayout.getChildrenInTraversalOrder(Container parent) |
Component |
TableLayout.getComponentAt(int row,
int column)
Returns the component at the given row/column
|
| Modifier and Type | Method and Description |
|---|---|
void |
TableLayout.addLayoutComponent(Object value,
Component comp,
Container c)
Some layouts can optionally track the addition of elements with meta-data
that allows the user to "hint" on object positioning.
|
static Container |
TableLayout.encloseIn(int columns,
boolean growHorizontally,
Component... cmps)
Creates a table layout container, the number of rows is automatically calculated based on the number
of columns.
|
static Container |
TableLayout.encloseIn(int columns,
Component... cmps)
Creates a table layout container that grows the last column horizontally, the number of rows is automatically
calculated based on the number of columns.
|
int |
Table.getCellColumn(Component cell)
Returns the column in which the given cell is placed
|
int |
Table.getCellRow(Component cell)
Returns the row in which the given cell is placed
|
Object |
TableLayout.getComponentConstraint(Component comp)
Returns the optional component constraint
|
void |
TableLayout.removeLayoutComponent(Component comp)
Removes the component from the layout this operation is only useful if the
layout maintains references to components within it
|
| Modifier and Type | Class and Description |
|---|---|
class |
Tree
The
Tree component allows constructing simple tree component hierarchies that can be expanded
seamlessly with no limit. |
| Modifier and Type | Method and Description |
|---|---|
protected Component |
Tree.createNode(Object node,
int depth)
Creates a node within the tree, this method is protected allowing tree to be
subclassed to replace the rendering logic of individual tree buttons.
|
Component |
Tree.findNodeComponent(Object node)
Finds the component for a model node.
|
Component |
Tree.findNodeComponent(Object node,
Component root)
Finds the component for a model node.
|
Component |
Tree.getParentComponent(Component nodeComponent)
Gets the UI component corresponding to the parent model mode of the node
corresponding with the given UI component.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
Tree.bindNodeListener(ActionListener l,
Component node)
Since a node may be any component type developers should override this method to
add support for binding the click listener to the given component.
|
Component |
Tree.findNodeComponent(Object node,
Component root)
Finds the component for a model node.
|
protected Object |
Tree.getModel(Component node)
Gets the model for a component in the tree.
|
Component |
Tree.getParentComponent(Component nodeComponent)
Gets the UI component corresponding to the parent model mode of the node
corresponding with the given UI component.
|
Object |
Tree.getParentNode(Component nodeComponent)
Gets the parent model node for a component.
|
protected boolean |
Tree.isExpanded(Component node)
This method returns true if the given node is expanded.
|
void |
Tree.refreshNode(Component nodeComponent)
Refreshes a node of the tree.
|
protected void |
Tree.setNodeIcon(Image icon,
Component node)
Sets the icon for the given node similar in scope to bindNodeListener
|
protected void |
Tree.setNodeMaterialIcon(char c,
Component node,
float size)
Sets material icon for the node.
|
| Modifier and Type | Class and Description |
|---|---|
class |
EmbeddedContainer
This class is mostly used internally by the GUI builder and isn't very useful
for general purpose.
|
| Modifier and Type | Method and Description |
|---|---|
protected Component |
UIBuilder.createComponentInstance(String componentType,
Class cls)
This method can be overriden to create custom components in a custom way, the component
type is a shorthand for the component name and not the full name of the class.
|
Component |
UIBuilder.findByName(String name,
Component rootComponent)
Finds the given component by its name
|
Component |
UIBuilder.findByName(String name,
Container rootComponent)
Finds the given component by its name
|
| Modifier and Type | Method and Description |
|---|---|
void |
GlassTutorial.addHint(Component hintComponent,
Component destinationComponent,
String position)
Deprecated.
Places a hint within the glass in a position relative to the destinationComponent, the position
is indicated with border layout attributes.
|
void |
UIBuilder.back(Component sourceComponent)
This method effectively pops the form navigation stack and goes back
to the previous form if back navigation is enabled and there is
a previous form.
|
protected void |
UIBuilder.bindListenerToComponent(Component cmp,
Object listener)
Binds the given listener object to the component, this works seamlessly for
common Codename One events but might be an issue with custom components and custom
listener types so this method can be overloaded to add support for such cases.
|
Component |
UIBuilder.findByName(String name,
Component rootComponent)
Finds the given component by its name
|
void |
EventDispatcher.fireBindTargetChange(Component source,
String propertyName,
Object oldValue,
Object newValue)
Fired when a property of the component changes to a new value
|
void |
EventDispatcher.fireFocus(Component c)
Fires the event safely on the EDT without risk of concurrency errors
|
protected Container |
UIBuilder.getRootAncestor(Component c)
Returns either the parent form or the component below the embedded container
above c.
|
static void |
Effects.growShrink(Component c,
int duration)
Deprecated.
use Component.growShrink instead
|
protected void |
UIBuilder.handleComponentAction(Component c,
ActionEvent event)
This method is invoked for every component to which an action event listener can be bound
and delivers the event data for the given component seamlessly.
|
protected void |
UIBuilder.postCreateComponent(Component cmp)
Callback to allow binding custom logic/listeners to a component after its major properties were set
(notice that not all properties or the full hierarchy will be available at this stage).
|
void |
UIBuilder.reloadContainer(Component cnt)
Useful tool to refresh the current state of a container shown using show container
without pushing another instance to the back stack
|
protected void |
UIBuilder.restoreComponentState(Component c,
Hashtable destination)
By default Codename One stores the states of components in the navigation graph
as it moves between forms.
|
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.
|
protected void |
UIBuilder.storeComponentState(Component c,
Hashtable destination)
By default Codename One stores the states of components in the navigation graph
as it moves between forms.
|
| Modifier and Type | Method and Description |
|---|---|
Validator |
Validator.addConstraint(Component cmp,
Constraint... c)
Places a constraint on the validator, returns this object so constraint
additions can be chained.
|
Validator |
Validator.addSubmitButtons(Component... cmp)
Submit buttons (or any other component type) can be disabled until all components contain a valid value.
|
void |
Validator.bindDataListener(Component cmp)
Deprecated.
this method was exposed by accident, constraint implicitly calls it and you don't need to
call it directly. It will be made protected in a future update to Codename One!
|
protected Object |
Validator.getComponentValue(Component cmp)
Returns the value of the given component, this can be overriden to add support for custom built components
|
String |
Validator.getErrorMessage(Component cmp)
Returns the validation error message for the given component or null if no such message exists
|
protected void |
Validator.validate(Component cmp)
Validates and highlights an individual component
|
Copyright © 2023. All rights reserved.