|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jmobilecore.ui.core.Component
com.jmobilecore.ui.core.Label
com.jmobilecore.ui.PropertyLabel
public class PropertyLabel
Provides a component for displaying pair key-value on the screen. The key is displayed left-justified, the value is right-justified.
Field Summary | |
---|---|
java.lang.String |
key
The key of this PropertyLabel . |
java.lang.String |
value
The value of this PropertyLabel . |
Fields inherited from class com.jmobilecore.ui.core.Label |
---|
text |
Fields inherited from class com.jmobilecore.ui.core.Component |
---|
alignment, background, CENTER, focusable, focusedBackground, focusedForeground, font, foreground, height, isCompletelyVisible, isFocused, isVisible, LEFT, parentScreen, RIGHT, screenY, valid, width |
Constructor Summary | |
---|---|
PropertyLabel(java.lang.String key,
java.lang.String value)
Constructs a new PropertyLabel that presents the specified
key and it's value displayed by default font |
|
PropertyLabel(java.lang.String key,
java.lang.String value,
javax.microedition.lcdui.Font font)
Constructs a new PropertyLabel that presents the specified
key and it's value displayed by specified font |
Method Summary | |
---|---|
void |
destructor()
Default destructor. |
void |
paint(javax.microedition.lcdui.Graphics g)
Paints the PropertyLabel to the screen. |
void |
setKey(java.lang.String key)
Sets the key for this PropertyLabel to the specified string. |
void |
setLabel(java.lang.String key,
java.lang.String value)
Sets the key and the value for this PropertyLabel . |
void |
setValue(java.lang.String value)
Sets the value for this PropertyLabel to the specified string. |
Methods inherited from class com.jmobilecore.ui.core.Label |
---|
createTitleLabel, getText, setText |
Methods inherited from class com.jmobilecore.ui.core.Component |
---|
getBackground, getFont, getForeground, getHeight, getWidth, invalidate, isFocusOwner, keyPressed, keyReleased, keyRepeated, paintBackground, pointerDragged, pointerPressed, pointerReleased, prepareForeground, releaseFocus, requestFocus, setFont, setHeight |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String key
PropertyLabel
. The key is displayed on
the left part of the screen
setKey(String)
public java.lang.String value
PropertyLabel
. The key is displayed on
the right part of the screen
setValue(String)
Constructor Detail |
---|
public PropertyLabel(java.lang.String key, java.lang.String value)
PropertyLabel
that presents the specified
key and it's value displayed by default font
key
- the key for this PropertyLabel
.
A null
value
will be accepted without causing a NullPointerException
to be thrown.
The text can be single line only. If text contains
\n characters (used to indicate line breaks) then PropertyLabel
will be displayed incorrectlyvalue
- the value for this PropertyLabel
.
A null
value
will be accepted without causing a NullPointerException
to be thrown.
The text can be single line only. If text contains
\n characters (used to indicate line breaks) then PropertyLabel
will be displayed incorrectlypublic PropertyLabel(java.lang.String key, java.lang.String value, javax.microedition.lcdui.Font font)
PropertyLabel
that presents the specified
key and it's value displayed by specified font
key
- the key for this PropertyLabel
.
A null
value
will be accepted without causing a NullPointerException
to be thrown.
The text can be single line only. If text contains
\n characters (used to indicate line breaks) then PropertyLabel
will be displayed incorrectlyvalue
- the value for this PropertyLabel
.
A null
value
will be accepted without causing a NullPointerException
to be thrown.
The text can be single line only. If text contains
\n characters (used to indicate line breaks) then PropertyLabel
will be displayed incorrectlyfont
- the PropertyLabel
fontMethod Detail |
---|
public void destructor()
destructor
in class Component
public void paint(javax.microedition.lcdui.Graphics g)
PropertyLabel
to the screen.
paint
in class Label
g
- The Graphics object to render to.public void setKey(java.lang.String key)
PropertyLabel
to the specified string.
key
- the key for the PropertyLabel
.public void setLabel(java.lang.String key, java.lang.String value)
PropertyLabel
.
key
- the key for the PropertyLabel
.value
- the value for the PropertyLabel
.public void setValue(java.lang.String value)
PropertyLabel
to the specified string.
value
- the value for the PropertyLabel
.
|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |