| Package | Description |
|---|---|
| com.codename1.components |
Generic elaborate components that make use of both UI elements and storage.
|
| 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.ui |
Main widget package containing the component/container "composite" similar
both in terminology and design to Swing/AWT.
|
| com.codename1.ui.events |
Observable pattern event listeners in the spirit of AWT 1.1's event
dispatching architecture, all events are dispatched on the EDT (Event Dispatch Thread).
|
| com.codename1.ui.html |
This package is deprecated and used only for legacy support, use the WebBrowser component
from the components package.
|
| 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.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.util |
Utility features that are either too domain specific or don't "fit" into any
other packages including the Resource file format loading API.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
InteractionDialog.getDialogStyle()
Simple getter to get the Dialog Style
|
Style |
SpanButton.getTextAllStyles()
Returns the Style proxy object for the text of this span button.
|
Style |
SpanLabel.getTextAllStyles()
Returns the Style proxy object for the text of this span button.
|
Style |
SpanLabel.getTextSelectedStyle()
Returns the text elements style object
|
Style |
SpanButton.getTextStyle()
Returns the Style object for the text of this span button.
|
Style |
SpanLabel.getTextUnselectedStyle()
Returns the text elements style object
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
SpanButton.initUnselectedStyle(Style unselectedStyle) |
protected void |
SpanLabel.initUnselectedStyle(Style unselectedStyle) |
void |
SpanLabel.setTextSelectedStyle(Style t)
The text elements style object
|
void |
SpanLabel.setTextUnselectedStyle(Style t)
The text elements style object
|
void |
Switch.styleChanged(String propertyName,
Style source)
Invoked to indicate a change in a propertyName of a Style
|
void |
SpanButton.styleChanged(String propertyName,
Style source) |
void |
SpanLabel.styleChanged(String propertyName,
Style source) |
void |
FloatingActionButton.styleChanged(String propertyName,
Style source)
We override this method to track style changes to the background color and map them to the border
Invoked to indicate a change in a propertyName of a Style
|
| Modifier and Type | Method and Description |
|---|---|
void |
CodenameOneImplementation.drawLabelComponent(Object nativeGraphics,
int cmpX,
int cmpY,
int cmpHeight,
int cmpWidth,
Style style,
String text,
Object icon,
Object stateIcon,
int preserveSpaceForState,
int gap,
boolean rtl,
boolean isOppositeSide,
int textPosition,
int stringWidth,
boolean isTickerRunning,
int tickerShiftText,
boolean endsWith3Points,
int valign)
Draws a label on the given graphics context, this method allows optimizing the very common drawing operation
using platform native code
|
void |
CodenameOneImplementation.paintComponentBackground(Object nativeGraphics,
int x,
int y,
int width,
int height,
Style s)
Paints the background of a component based on the style values on the
given graphics context, the style could be accessed from the drawing
thread in read only capacity to make the code slightly more efficient
|
| Modifier and Type | Method and Description |
|---|---|
Style |
ComponentSelector.createProxyStyle()
Creates a proxy style to mutate the styles of all component styles in found set.
|
Style |
ComponentSelector.getAllStyles()
Returns a proxy style for all of the "all" styles of the components in this set.
|
Style |
Component.getAllStyles()
Returns a "meta style" that allows setting styles once to all the different Style objects, the getters for this
style will be meaningless and will return 0 values.
|
Style |
Dialog.getDialogStyle()
Simple getter to get the Dialog Style
|
Style |
ComponentSelector.getDisabledStyle()
Returns a proxy style for all of the disabled styles of the components in this set.
|
Style |
Component.getDisabledStyle()
Returns the Component Style for the disabled state allowing us to manipulate
the look of the component when its disabled
|
Style |
Form.getMenuStyle()
Returns the style of the menu
|
Style |
MenuBar.getMenuStyle()
Returns the Menu Dialog Style
|
Style |
Calendar.getMonthViewSelectedStyle()
Gets the selected style of the month view component within the calendar
|
Style |
Calendar.getMonthViewUnSelectedStyle()
Gets the un selected style of the month view component within the
calendar
|
Style |
ComponentSelector.getPressedStyle()
Returns a proxy style for all of the pressed styles of the components in this set.
|
Style |
Component.getPressedStyle()
Returns the Component Style for the pressed state allowing us to manipulate
the look of the component when it is pressed
|
Style |
ComponentSelector.getSelectedStyle()
Returns a proxy style for all of the selected styles of the components in this set.
|
Style |
Component.getSelectedStyle()
Returns the Component Style for the selected state allowing us to manipulate
the look of the component when it owns focus
|
Style |
Slider.getSliderEmptySelectedStyle()
Returns the
Style used to paint the slider when its full and selected |
Style |
Slider.getSliderEmptyUnselectedStyle()
Returns the
Style used to paint the slider when its full |
Style |
Slider.getSliderFullSelectedStyle()
Returns the
Style used to paint the slider when its full and selected |
Style |
Slider.getSliderFullUnselectedStyle()
Returns the
Style used to paint the slider when its full |
Style |
DynamicImage.getStyle()
Gets the style for this image.
|
Style |
TextArea.getStyle()
Returns the current Component Style allowing code to draw the current component, you
should normally use getUnselected/Pressed/DisabledStyle() and not this method since
it will return different values based on component state.
|
Style |
ComponentSelector.getStyle()
Gets a proxy style that wraps the result of
Component.getStyle() of each component in set. |
Style |
Slider.getStyle()
Returns the current Component Style allowing code to draw the current component, you
should normally use getUnselected/Pressed/DisabledStyle() and not this method since
it will return different values based on component state.
|
Style |
Component.getStyle()
Returns the current Component Style allowing code to draw the current component, you
should normally use getUnselected/Pressed/DisabledStyle() and not this method since
it will return different values based on component state.
|
Style |
ComponentSelector.getStyle(Component component)
Gets a style object for the given component that can be used to modify the
component's styles.
|
Style |
Form.getTitleStyle()
Returns the style of the title
|
Style |
Dialog.getTitleStyle()
Returns the style of the title
|
Style |
ComponentSelector.getUnselectedStyle()
Returns a proxy style for all of the unselected styles of the components in this set.
|
Style |
Component.getUnselectedStyle()
Returns the Component Style for the unselected mode allowing us to manipulate
the look of the component
|
| Modifier and Type | Method and Description |
|---|---|
ComponentSelector |
ComponentSelector.animateStyle(Style destStyle,
int duration,
SuccessCallback<ComponentSelector> callback)
Animates this set of components, replacing any modified style properties of the
destination style to the components.
|
static FontImage |
FontImage.create(String text,
Style s)
Creates the font image based on the given style, the font in the style is assumed to be an icon font
|
static FontImage |
FontImage.create(String text,
Style s,
Font fnt)
Creates the font image with the given style settings but uses the given font, notice that the
size of the given font determines the size of the icon!
|
static FontImage |
FontImage.createMaterial(char icon,
Style s)
Creates a material design icon font for the given style
|
static FontImage |
FontImage.createMaterial(char icon,
Style s,
float size)
Creates a material design icon font for the given style but size it in millimeters based
on the size argument and not the font
|
protected void |
Component.deinitializeCustomStyle(Style s)
Allows components to create a style of their own, this method cleans up
state for the given style
|
protected void |
Component.initCustomStyle(Style s)
Allows components to create a style of their own, this method binds the listener
to the style and installs a bg painter
|
protected void |
Component.initDisabledStyle(Style disabledStyle)
Can be overridden by subclasses to perform initialization when the disabled style is set to a new value.
|
protected void |
Component.initPressedStyle(Style pressedStyle)
Can be overridden by subclasses to perform initialization when the pressed style is set to a new value.
|
protected void |
Component.initSelectedStyle(Style selectedStyle)
Can be overridden by subclasses to perform initialization when the selected style is set to a new value.
|
protected void |
Label.initUnselectedStyle(Style unselectedStyle) |
protected void |
Component.initUnselectedStyle(Style unselectedStyle)
Can be overridden by subclasses to perform initialization when the unselected style is set to a new value.
|
protected void |
Component.installDefaultPainter(Style s)
Allows subclasses to create their own custom style types and install the background painter into them
|
ComponentSelector |
ComponentSelector.merge(Style style)
Merges style with all styles of components in current found set.
|
void |
Dialog.setDialogStyle(Style style)
Simple setter to set the Dialog Style
|
ComponentSelector |
ComponentSelector.setDisabledStyle(Style style)
Sets disabled style of all components in found set.
|
void |
Component.setDisabledStyle(Style style)
Changes the Component disalbed Style by replacing the Component Style with the given Style
|
ComponentSelector |
ComponentSelector.setIcon(char materialIcon,
Style style,
float size)
Sets the icons of all elements in this set to a material icon.
|
void |
Calendar.setMonthViewSelectedStyle(Style s)
Sets the selected style of the month view component within the calendar
|
void |
Calendar.setMonthViewUnSelectedStyle(Style s)
Sets the un selected style of the month view component within the
calendar
|
ComponentSelector |
ComponentSelector.setPressedStyle(Style style)
Sets pressed style of all components in found set.
|
void |
Component.setPressedStyle(Style style)
Sets the Component Style for the pressed state allowing us to manipulate
the look of the component when it is pressed
|
ComponentSelector |
ComponentSelector.setSelectedStyle(Style style)
Sets selected style of all components in found set.
|
void |
Component.setSelectedStyle(Style style)
Changes the Component selected Style by replacing the Component Style with the given Style
|
void |
DynamicImage.setStyle(Style s)
Sets the style to be used for drawing the image.
|
void |
Form.setTitleStyle(Style s)
Deprecated.
this method doesn't take into consideration multiple styles
|
ComponentSelector |
ComponentSelector.setUnselectedStyle(Style style)
Sets unselected style of all components in found set.
|
void |
MenuBar.setUnselectedStyle(Style style)
Changes the Component Style by replacing the Component Style with the given Style
|
void |
Component.setUnselectedStyle(Style style)
Changes the Component Style by replacing the Component Style with the given Style
|
void |
Label.styleChanged(String propertyName,
Style source) |
void |
Component.styleChanged(String propertyName,
Style source)
Invoked to indicate a change in a propertyName of a Style
|
| Modifier and Type | Method and Description |
|---|---|
void |
StyleListener.styleChanged(String propertyName,
Style source)
Invoked to indicate a change in a propertyName of a Style
|
| Modifier and Type | Method and Description |
|---|---|
void |
HTMLComponent.setPageStyle(Style pageStyle)
Deprecated.
Sets the style of the page, allowing for example to set transparency to the main page.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
DefaultListCellRenderer.getStyle()
Returns the current Component Style allowing code to draw the current component, you
should normally use getUnselected/Pressed/DisabledStyle() and not this method since
it will return different values based on component state.
|
| Modifier and Type | Method and Description |
|---|---|
static Style |
Style.createProxyStyle(Style... styles)
Creates a "proxy" style whose setter methods map to the methods in the given styles passed and whose
getter methods are meaningless
|
Style |
UIManager.getComponentCustomStyle(String id,
String type)
Returns a custom style for the component with the given id, this method always returns a
new instance.
|
Style |
UIManager.getComponentSelectedStyle(String id)
Returns the selected style of the component with the given id or a new instance of the default
style.
|
Style |
UIManager.getComponentStyle(String id)
Returns the style of the component with the given id or a new instance of the default
style.
|
Style |
UIManager.parseComponentCustomStyle(Resources theme,
String baseStyle,
String id,
String type,
String... styleString)
Returns the selected style of the component with the given baseStyle or a new instance of the default
style, but overrides styles based on the directives in the styleStrings.
|
Style |
UIManager.parseComponentSelectedStyle(Resources theme,
String baseStyle,
String id,
String... styleString)
Returns the selected style of the component with the given baseStyle or a new instance of the default
style, but overrides styles based on the directives in the styleStrings.
|
Style |
UIManager.parseComponentStyle(Resources theme,
String baseStyle,
String id,
String... styleString)
Returns the style of the component with the given baseStyle or a new instance of the default
style, but overrides styles based on the directives in the styleStrings.
|
| Modifier and Type | Method and Description |
|---|---|
Font |
StyleParser.FontInfo.createFont(Style baseStyle)
Creates a font based on this font information.
|
static Style |
Style.createProxyStyle(Style... styles)
Creates a "proxy" style whose setter methods map to the methods in the given styles passed and whose
getter methods are meaningless
|
float |
StyleParser.FontInfo.getSizeInPixels(Style baseStyle)
Gets the size of the font in pixels.
|
void |
Style.merge(Style style)
Merges the new style with the current style without changing the elements that
were modified.
|
void |
UIManager.setComponentSelectedStyle(String id,
Style style)
Allows a developer to programmatically install a style into the UI manager
|
void |
UIManager.setComponentStyle(String id,
Style style)
Allows a developer to programmatically install a style into the UI manager
|
void |
UIManager.setComponentStyle(String id,
Style style,
String type)
Allows a developer to programmatically install a style into the UI manager
|
| Constructor and Description |
|---|
Style(Style style)
Creates a full copy of the given style.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
Node.getStyle()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Node.setStyle(Style style)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Style |
Picker.getStyle() |
| Modifier and Type | Method and Description |
|---|---|
void |
EventDispatcher.fireStyleChangeEvent(String property,
Style source)
Fires the style change even to the listeners
|
Copyright © 2023. All rights reserved.