Interface used for providing callbacks that receive a Component as input.
Interface used by
Interface used by
Allows applying resize logic to downloaded images you can use constant resize behaviors defined in this class.
Animation manager concentrates all of the animations for a given form into a single place that allows us to manage all mutations to a Form in a way the prevents collisions between mutations.
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.
Button is the base class for several UI widgets allowing clickability.
This class is used to create a multiple-exclusion scope for
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.
CheckBox is a button that can be selected or deselected and displays its state to the user.
This is a global context static class designed for static import, this class allows us to write more terse code.
Common constants for Display and CN
The Command class provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls.
The component class is the basis of all UI widgets in Codename One, to arrange multiple components together we use the Container class which itself "IS A" Component subclass.
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.
A tool to facilitate selection and manipulation of UI components as sets.
A composite pattern with
A dialog is a form that occupies a part of the screen and appears as a modal entity to the developer.
Central class for the API that manages rendering/events and is used to place top level components (
A base class for images that dynamically painted, just like a normal component.
Codename One currently supports 3 font types:
Abstracts the underlying platform graphics context thus allowing us to achieve portability between MIDP devices and CDC devices.
Abstracts the underlying platform images allowing us to treat them as a uniform object.
This abstract Container can scroll indefinitely (or at least until we run out of data).
Allows displaying a single line of text and icon (both optional) with different alignment options.
A set of elements that is rendered using a
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.
This class represents the Form MenuBar.
The NavigationCommand is a Command that navigates to a given Form.
A peer component is essentially a "dummy" Codename One component used to calculate the position of the actual native platform specific component.
An image that stores its data as an integer RGB array internally, this image cannot be manipulated via Graphics primitives however its array is accessible and modifiable programmatically.
this class is still used internally but code should be migrated to use the
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.
Encapsulates the stroke used for drawing paths.
A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.
An optionally multi-line editable region that can display text and allow a user to edit it.
Encapsulates a text field and label into a single component.
A specialized version of
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.
Enum with the possible types for a
The behavior of the back command in the title
Main widget package containing the component/container "composite" similar both in terminology and design to Swing/AWT.
Containers can be nested one within the other to form elaborate UI's. Containers use
com.codename1.ui.layouts to arrange the components within. This is important
as it allows a container can adapt to changing resolution, DPI, orientation, font size etc.
A container doesn't implicitly reflow its elements and in that regard follows the direction of AWT/Swing. As
a result the layout can be animated to create a flowing effect for UI changes. This also provides improved
performance as a bonus. See this sample of
The component gallery below isn't complete or exhaustive but it should give you a sense of the types of widgets available within Codename One in a glance.
AutoCompleteTextFieldprovides suggestions as you type into the text field
Buttonallows us to bind events to a click
Buttoncan also be used as a hyperlink
ComponentGroupallows us to group components together in a a group and manipulate their UIID's.
Dialogallows us to notify/ask the user in a modal/modless way.
Labeldisplays text and/or icons to the user
Sliderallows us to indicate progress or allows the user to drag a bar to indicate volume (as in quantity)
SwipeableContainerenables side swipe gesture to expose additional functionality
Tabsplaces components/containers into tabbable entries, allows swiping between choices thru touch
Tabscan also be used as a swipe carousel
Tabledisplays optionally editable tabular data to the user
Treedisplays data in a tree like hierarchy
ChartComponentcan embed a wide range of visualization aids and animations into your app
ImageViewerswipe, pinch to zoom and pan images
InfiniteProgressprovides a constantly spinning component
MultiButtonis much more than a button
ShareButtonprovides native "social share" functionality
SpanLabela text label that "seamlessly" breaks lines
SpanButtona button that "seamlessly" breaks lines
Pickerallows us to show an OS native picker UI (Date Picker)
Pickerallows us to show an OS native picker UI (Time Picker)
ToastBarshows a non-obtrusive notice on the bottom of the
SignatureComponentshows a dialog that allows the user to "sign" using the touch screen
Accordiondisplays collapsible content panels
FloatingHintanimates the text field hint into a label on top of the text field and visa versa
FloatingActionButtonhovers over the UI presenting a default action