public class nUINavbuttonElement extends nUIElementDisplay
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_BACK
A "Back" navbutton type.
|
static int |
TYPE_DEFAULT
The default navbutton type.
|
Y_IDENTIFIER_PREV_BOTTOM
COLOR_BACKGROUND_NORMAL, COLOR_BLACK, COLOR_FOREGROUND_DARK, COLOR_FOREGROUND_LIGHT, COLOR_FOREGROUND_NORMAL, COLOR_TRANSPARENT, COLOR_WHITE, DIMENSIONS_IDENTIFIER_PARENT_DIMENSIONS
event_listener, event_listener_exclusive, first_child, last_child, next_sibling, nuiid, parent, prev_sibling, unlink_children_on_removal_from_parent
Constructor and Description |
---|
nUINavbuttonElement(int nuiid,
java.lang.String text,
javax.microedition.lcdui.Image icon)
Default nav/menu button constructor
|
nUINavbuttonElement(int nuiid,
java.lang.String text,
int type,
javax.microedition.lcdui.Image icon)
Default nav/menu button constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Gets the height of this element.
|
javax.microedition.lcdui.Image |
getIcon()
Gets the Image currently set as an icon for this navbutton.
|
java.lang.String |
getText()
Gets the text currently set for this navbutton.
|
int |
getType()
Gets the navbutton type.
|
int |
getWidth()
Gets the width of this element.
|
int |
getX()
Gets the current x-position relative to the parent object's internal bounding box.
|
int |
getY()
Gets the current y-position relative to the parent's internal bounding box.
|
void |
setIcon(javax.microedition.lcdui.Image icon)
Sets an icon to be associated with this navbutton.
|
void |
setText(java.lang.String text)
Sets the text associated with this navbutton.
|
void |
setType(int type)
Sets navbutton type.
|
insertAt
getBackgroundDrawable, getBgcolor, getBottom, getFocus, getFocusable, getGesturable, getInnerHeight, getInnerWidth, getInnerX, getInnerY, getLeft, getMaxChildX, getMaxChildY, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, insertAtInternal, isEnabled, onRemoved, remove, setBackgroundDrawable, setBgcolor, setBottom, setChildFocus, setEnabled, setFocus, setFocusable, setGesturable, setHeight, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setRight, setTop, setTriggerable, setWidth, setX, setY
add, addEventListener, childElementAt, childIndexOf, getTag, insertAfter, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace, setTag
public static final int TYPE_DEFAULT
public static final int TYPE_BACK
public nUINavbuttonElement(int nuiid, java.lang.String text, javax.microedition.lcdui.Image icon)
nuiid
- Unique Native UI ID (or -1 if unidentified)text
- The text shown for this itemicon
- The icon shown for this itempublic nUINavbuttonElement(int nuiid, java.lang.String text, int type, javax.microedition.lcdui.Image icon)
nuiid
- Unique Native UI ID (or -1 if unidentified)text
- The text shown for this itemtype
- The type of buttonicon
- The icon shown for this itempublic void setText(java.lang.String text)
public java.lang.String getText()
public void setIcon(javax.microedition.lcdui.Image icon)
public javax.microedition.lcdui.Image getIcon()
public void setType(int type)
type
- either TYPE_DEFAULT
or TYPE_BACK
.java.lang.IllegalArgumentException
- if type
is not one of the expected values.public int getType()
public int getX()
getX
in class nUIDisplayObject
public int getY()
getY
in class nUIElementDisplay
public int getHeight()
getHeight
in class nUIDisplayObject
public int getWidth()
getWidth
in class nUIDisplayObject