| Package | Description |
|---|---|
| com.codename1.charts.compat |
This package contains compatibility classes for internal use
|
| com.codename1.charts.renderers |
Provides renderer classes that keep the chart rendering / drawing styles.
|
| com.codename1.components |
Generic elaborate components that make use of both UI elements and storage.
|
| com.codename1.ui |
Main widget package containing the component/container "composite" similar
both in terminology and design to Swing/AWT.
|
| 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.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.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 |
|---|---|
Font |
Paint.getTypeface()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Paint.setTypeface(Font textTypeface)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Font |
DefaultRenderer.getTextTypeface()
Returns the text typeface.
|
| Modifier and Type | Method and Description |
|---|---|
void |
XYSeriesRenderer.setAnnotationsTextFont(Font font)
Sets the annotations text font size using a Font object instead of a point size.
|
void |
XYMultipleSeriesRenderer.setAxisTitleTextFont(Font font)
Sets the Axis title text font size using a Font object instead of a point size.
|
void |
DefaultRenderer.setChartTitleTextFont(Font font)
Sets the chart title font size using a Font object instead of a point size.
|
void |
XYSeriesRenderer.setChartValuesTextFont(Font font)
Sets the chart values title text font size using a Font object instead of a point size.
|
void |
DefaultRenderer.setLabelsTextFont(Font font)
Sets the label title font size using a Font object instead of a point size.
|
void |
DefaultRenderer.setLegendTextFont(Font font)
Sets the legend text font size using a Font object instead of a point size.
|
void |
DefaultRenderer.setTextTypeface(Font typeface)
Sets the text typeface.
|
| Modifier and Type | Method and Description |
|---|---|
Font |
SpanLabel.getIconFont()
Returns the font for the icon font or null if not font set
|
Font |
SpanButton.getIconFont()
Returns the font for the icon font or null if not font set
|
| Modifier and Type | Method and Description |
|---|---|
void |
SpanLabel.setFontIcon(Font font,
char c)
This method is shorthand for
com.codename1.ui.FontImage#setMaterialIcon(com.codename1.ui.Label, com.codename1.ui.Font, char) |
void |
SpanButton.setFontIcon(Font font,
char c)
This method is shorthand for
com.codename1.ui.FontImage#setMaterialIcon(com.codename1.ui.Label, com.codename1.ui.Font, char) |
void |
SpanLabel.setFontIcon(Font font,
char c,
float size)
This method is shorthand for
FontImage.setFontIcon(com.codename1.ui.Label, com.codename1.ui.Font, char, float) |
void |
MultiButton.setFontIcon(Font font,
char c,
float size)
This method is shorthand for
FontImage.setFontIcon(com.codename1.ui.Label, com.codename1.ui.Font, char, float) |
void |
SpanMultiButton.setFontIcon(Font font,
char c,
float size)
This method is shorthand for
FontImage.setFontIcon(com.codename1.ui.Label, com.codename1.ui.Font, char, float) |
void |
SpanButton.setFontIcon(Font font,
char c,
float size)
This method is shorthand for
FontImage.setFontIcon(com.codename1.ui.Label, com.codename1.ui.Font, char, float) |
| Modifier and Type | Method and Description |
|---|---|
static Font |
Font.create(String lookup)
Creates a new font instance based on the platform specific string name of the
font.
|
static Font |
Font.createBitmapFont(Image bitmap,
int[] cutOffsets,
int[] charWidth,
String charsets)
Deprecated.
bitmap font functionality is now deprecated
|
static Font |
Font.createBitmapFont(String name,
Image bitmap,
int[] cutOffsets,
int[] charWidth,
String charsets)
Deprecated.
bitmap font functionality is now deprecated
|
static Font |
Font.createSystemFont(int face,
int style,
int size)
Creates a system native font in a similar way to common MIDP fonts
|
static Font |
Font.createTrueTypeFont(String fontName)
Shorthand for
createTrueTypeFont(name, name) which is useful
for cases such as native: fonts. |
static Font |
Font.createTrueTypeFont(String fontName,
float sizeMm)
Shorthand for
createTrueTypeFont(name, name) &
derive(size) which is useful for cases such as native: fonts. |
static Font |
Font.createTrueTypeFont(String fontName,
float size,
byte sizeUnit)
Shorthand for
createTrueTypeFont(name, name) &
derive(size) which is useful for cases such as native: fonts. |
static Font |
Font.createTrueTypeFont(String fontName,
String fileName)
Creates a true type font with the given name/filename (font name might be different from the file name
and is required by some devices e.g.
|
Font |
Font.derive(float sizePixels,
int weight)
Creates a font based on this truetype font with the given pixel, WARNING! This method
will only work in the case of truetype fonts!
Important some platforms e.g. |
Font |
Font.derive(float size,
int weight,
byte unitType)
Creates a font based on this truetype font with the given pixel, WARNING! This method
will only work in the case of truetype fonts!
Important some platforms e.g. |
static Font |
Font.getBitmapFont(String fontName)
Deprecated.
bitmap font functionality is now deprecated
|
static Font |
Font.getDefaultFont()
Return the global default font instance
|
Font |
FontImage.getFont()
Useful method to reuse the Font object when creating multiple image
objects
|
Font |
Graphics.getFont()
Returns the font used with the drawString method calls
|
Font |
Command.getIconFont() |
Font |
Label.getIconFont()
Returns the font for the icon font or null if not font set
|
static Font |
FontImage.getMaterialDesignFont()
The material design icon font allows creating icons based on the material
design icon catalog
|
| Modifier and Type | Method and Description |
|---|---|
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. |
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.createFixed(String text,
Font fnt,
int color,
int width,
int height)
Creates a font image with a fixed size/appearance
|
static FontImage |
FontImage.createFixed(String text,
Font fnt,
int color,
int width,
int height,
int padding)
Creates a font image with a fixed size/appearance
|
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
|
int |
Label.getStringWidth(Font fnt)
This method is equivalent to label.getStyle().getFont().stringWidth(label.getText()) but its faster
|
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. |
static void |
Font.setDefaultFont(Font f)
Sets the global default font instance
|
ComponentSelector |
ComponentSelector.setFont(Font f)
|
void |
Graphics.setFont(Font font)
Sets the font to use with the drawString method calls
|
static void |
FontImage.setFontIcon(Command c,
Font font,
char icon,
String uiid,
float size)
Applies an icon from the font to the given command using the
given UIID.
|
void |
Label.setFontIcon(Font font,
char c)
This method is shorthand for
com.codename1.ui.FontImage#setMaterialIcon(com.codename1.ui.Label, com.codename1.ui.Font, char) |
void |
Label.setFontIcon(Font font,
char c,
float size)
This method is shorthand for
FontImage.setFontIcon(com.codename1.ui.Label, com.codename1.ui.Font, char, float) |
void |
IconHolder.setFontIcon(Font font,
char c,
float size)
This method is shorthand for
FontImage.setFontIcon(com.codename1.ui.Label, com.codename1.ui.Font, char, float) |
static void |
FontImage.setFontIcon(Label l,
Font font,
char icon) |
static void |
FontImage.setFontIcon(Label l,
Font font,
char[] icons,
float size)
Deprecated.
use
Label.setMaterialIcon(char, float) instead |
static void |
FontImage.setFontIcon(Label l,
Font font,
char icon,
float size)
Deprecated.
use
Label.setMaterialIcon(char, float) instead |
static void |
FontImage.setFontIcon(MultiButton l,
Font font,
char icon,
float size)
Applies an icon from the font to the given component using the
styling of the label
|
static void |
FontImage.setFontIcon(SpanButton l,
Font font,
char icon)
Applies an icon from the font to the given component using the
styling of the label
|
static void |
FontImage.setFontIcon(SpanButton l,
Font font,
char icon,
float size)
Applies an icon from the font to the given component using the
styling of the label
|
static void |
FontImage.setFontIcon(SpanLabel l,
Font font,
char icon,
float size)
Applies an icon from the font to the given component using the
styling of the label
|
static void |
FontImage.setIcon(IconHolder l,
Font font,
char[] icons,
float size)
Applies icon font from the font to the given label using the styling of the label.
|
static void |
FontImage.setIcon(IconHolder l,
Font font,
char icon,
float size)
Applies an icon from the font to the given label using the
styling of the label.
|
void |
Command.setIconFont(Font iconFont) |
static void |
FontImage.setMaterialIcon(Label l,
Font font,
char icon,
float size)
Applies a material design icon (one of the MATERIAL_* icon constants) to the given label using the
styling of the label.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
HTMLComponent.addFont(String fontKey,
Font font)
Deprecated.
Sets the given Codename One font for use with HTMLComponents.
|
void |
HTMLComponent.setDefaultFont(String fontKey,
Font font)
Deprecated.
Sets the default font for this HTMLComponent
|
| Modifier and Type | Method and Description |
|---|---|
Font |
StyleParser.FontInfo.createFont(Style baseStyle)
Creates a font based on this font information.
|
Font |
Style.getFont()
Font for the component
|
| Modifier and Type | Method and Description |
|---|---|
void |
Style.setFont(Font font)
Sets the font for the component
|
void |
Style.setFont(Font font,
boolean override)
Sets the font for the component
|
| Constructor and Description |
|---|
Style(int fgColor,
int bgColor,
Font f,
byte transparency)
Creates a new style with the given attributes
|
Style(int fgColor,
int bgColor,
Font f,
byte transparency,
Image im,
byte backgroundType)
Creates a new style with the given attributes
|
| Modifier and Type | Method and Description |
|---|---|
Font |
Resources.getFont(String id)
Returns the font resource from the file
|
Copyright © 2021. All rights reserved.