|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.Style
public class Style
Style defines the design of any widget.
This class is used by the widgets. If you only use the predefined widgets you do not need to work with this class.
history
04-Jan-2004 - rob creation
| Field Summary | |
|---|---|
Background |
background
|
Border |
border
|
java.lang.String |
dynamicName
|
static java.lang.Boolean |
FALSE
|
javax.microedition.lcdui.Font |
font
|
int |
fontColor
Deprecated. Please use getFontColor() instead |
Color |
fontColorObj
|
int |
layout
|
int |
marginBottom
|
int |
marginLeft
|
int |
marginRight
|
int |
marginTop
|
java.lang.String |
name
The name of this style. |
int |
paddingBottom
|
int |
paddingHorizontal
|
int |
paddingLeft
|
int |
paddingRight
|
int |
paddingTop
|
int |
paddingVertical
|
static java.lang.Boolean |
TRUE
|
| Constructor Summary | |
|---|---|
Style()
Creates a new style with default settings |
|
Style(int marginLeft,
int marginRight,
int marginTop,
int marginBottom,
int paddingLeft,
int paddingRight,
int paddingTop,
int paddingBottom,
int paddingVertical,
int paddingHorizontal,
int layout,
int fontColor,
Color fontColorObj,
javax.microedition.lcdui.Font font,
Background background,
Border border,
short[] attributeKeys,
java.lang.Object[] attributeValues)
Creates a new Style. |
|
Style(int marginLeft,
int marginRight,
int marginTop,
int marginBottom,
int paddingLeft,
int paddingRight,
int paddingTop,
int paddingBottom,
int paddingVertical,
int paddingHorizontal,
int layout,
int fontColor,
javax.microedition.lcdui.Font font,
Background background,
Border border,
short[] attributeKeys,
java.lang.Object[] attributeValues)
Creates a new Style. |
|
| Method Summary | |
|---|---|
void |
addAttribute(int key,
java.lang.Object value)
|
java.lang.Boolean |
getBooleanProperty(java.lang.String propName)
Retrieves a non-standard boolean property of this style. |
Color |
getColorProperty(java.lang.String propName)
Retrieves a non-standard color property of this style. |
int |
getFontColor()
Retrieves the font color that should be used. |
java.lang.Integer |
getIntProperty(java.lang.String propName)
Retrieves a non-standard integer property of this style. |
java.lang.Object |
getObjectProperty(java.lang.String propName)
Retrieves a non-standard property of this style. |
java.lang.String |
getProperty(java.lang.String propName)
Retrieves a non-standard property of this style. |
void |
read(java.io.DataInputStream in)
Restores the internal instance fields from the given input stream. |
void |
releaseResources()
Releases all (memory intensive) resources such as images or RGB arrays of this style. |
void |
removeAttribute(int key)
|
void |
write(java.io.DataOutputStream out)
Stores the internal instance fields to the output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Boolean TRUE
public static final java.lang.Boolean FALSE
public transient java.lang.String name
public transient java.lang.String dynamicName
public Background background
public Border border
public javax.microedition.lcdui.Font font
public int fontColor
getFontColor()public Color fontColorObj
public int paddingLeft
public int paddingTop
public int paddingRight
public int paddingBottom
public int paddingVertical
public int paddingHorizontal
public int marginLeft
public int marginTop
public int marginRight
public int marginBottom
public int layout
| Constructor Detail |
|---|
public Style()
public Style(int marginLeft,
int marginRight,
int marginTop,
int marginBottom,
int paddingLeft,
int paddingRight,
int paddingTop,
int paddingBottom,
int paddingVertical,
int paddingHorizontal,
int layout,
int fontColor,
javax.microedition.lcdui.Font font,
Background background,
Border border,
short[] attributeKeys,
java.lang.Object[] attributeValues)
marginLeft - the margin in pixels to the next element on the leftmarginRight - the margin in pixels to the next element on the rightmarginTop - the margin in pixels to the next element on the topmarginBottom - the margin in pixels to the next element on the bottompaddingLeft - the padding between the left border and content in pixelspaddingRight - the padding between the right border and content in pixelspaddingTop - the padding between the top border and content in pixelspaddingBottom - the padding between the bottom border and content in pixelspaddingVertical - the vertical padding between internal elements of an itempaddingHorizontal - the horizontal padding between internal elements of an itemlayout - the layout for this style, e.g. Item.LAYOUT_CENTERfontColor - the color of the fontfont - the content-font for this stylebackground - the background for this styleborder - the border for this styleattributeKeys - the integer-IDs of any additional attributes. Can be null.attributeValues - the values of any additional attributes. Can be null.
public Style(int marginLeft,
int marginRight,
int marginTop,
int marginBottom,
int paddingLeft,
int paddingRight,
int paddingTop,
int paddingBottom,
int paddingVertical,
int paddingHorizontal,
int layout,
int fontColor,
Color fontColorObj,
javax.microedition.lcdui.Font font,
Background background,
Border border,
short[] attributeKeys,
java.lang.Object[] attributeValues)
marginLeft - the margin in pixels to the next element on the leftmarginRight - the margin in pixels to the next element on the rightmarginTop - the margin in pixels to the next element on the topmarginBottom - the margin in pixels to the next element on the bottompaddingLeft - the padding between the left border and content in pixelspaddingRight - the padding between the right border and content in pixelspaddingTop - the padding between the top border and content in pixelspaddingBottom - the padding between the bottom border and content in pixelspaddingVertical - the vertical padding between internal elements of an itempaddingHorizontal - the horizontal padding between internal elements of an itemlayout - the layout for this style, e.g. Item.LAYOUT_CENTERfontColor - the color of the fontfontColorObj - the color of the font, might be a dynamic color like COLOR_FOREGROUNDfont - the content-font for this stylebackground - the background for this styleborder - the border for this styleattributeKeys - the integer-IDs of any additional attributes. Can be null.attributeValues - the values of any additional attributes. Can be null.| Method Detail |
|---|
public java.lang.String getProperty(java.lang.String propName)
propName - the name of the property
public java.lang.Object getObjectProperty(java.lang.String propName)
propName - the name of the property
public java.lang.Integer getIntProperty(java.lang.String propName)
propName - the name of the property
public Color getColorProperty(java.lang.String propName)
propName - the name of the property
public java.lang.Boolean getBooleanProperty(java.lang.String propName)
propName - the name of the property
public void releaseResources()
public int getFontColor()
public void removeAttribute(int key)
key - the integer key of the attribute
public void addAttribute(int key,
java.lang.Object value)
key - the integer key of the attributevalue - the value of the attribute
public void read(java.io.DataInputStream in)
throws java.io.IOException
Externalizable
read in interface Externalizablein - the input stream from which the data is loaded
java.io.IOException - when reading fails
public void write(java.io.DataOutputStream out)
throws java.io.IOException
Externalizable
write in interface Externalizableout - the output stream to which instance fields should be written
java.io.IOException - when writing fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||