public class nUIEntryElement extends nUIElementDisplay
Modifier and Type | Field and Description |
---|---|
static int |
FORMAT_NUMBER_ANY
Entry format that asks the OS for a "numbers"/"PIN"/"phone number"-style keyboard in order to help limit the input.
|
static int |
FORMAT_NUMBER_HIDDEN
Hidden entry format that asks the OS for a "numbers"/"PIN"/"phone number"-style keyboard in order to help limit the input.
|
static int |
FORMAT_STRING_ANY
Entry format where a free-form String made up of any characters may be entered.
|
static int |
FORMAT_STRING_HIDDEN
Hidden entry format where a free-form String made up of any characters may be entered.
|
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 |
---|
nUIEntryElement(int nuiid,
java.lang.String text)
Default data-entry constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
getEditable()
Deprecated.
This method is deprecated. Consider using getEnabled() instead.
|
int |
getFontSize()
Gets the current font size.
|
int |
getFontStyle()
Gets the current font style used for text on this button.
|
java.lang.String |
getFormat()
Gets the current format String.
|
java.lang.String |
getHintText()
Gets the hint text.
|
int |
getLines()
Gets the current number of lines shown to the user to type into.
|
java.lang.String |
getText()
Gets the currently entered text.
|
int |
getTextColor() |
void |
setEditable(boolean editable)
Deprecated.
This method is deprecated. Consider using setEnabled() instead.
|
void |
setEditing(boolean editing) |
void |
setFontSize(int font_size)
Sets the size of the font to use.
|
void |
setFontSizeAbsolute(int size_in_pixels,
boolean accessibility_adjusted)
Sets absolute font size in pixels.
|
void |
setFontSizeRelative(int rel_font_id,
int scale)
Sets font size relative to the one of the predefined sizes.
|
void |
setFontStyle(int font_style)
Sets the style of the font to use.
|
void |
setFormat(int intFormat)
Sets the allowable text format of this entry element, using one of the
FORMAT_* constants defined in this class. |
void |
setFormat(java.lang.String format)
Deprecated.
|
void |
setHintText(java.lang.String hinttext)
Sets the hint text to display when no text is shown.
|
void |
setLines(int lines)
Sets the number of lines shown to the user to type into.
|
void |
setText(java.lang.String text)
Sets the text to display.
|
void |
setTextColor(int color) |
getY, insertAt
getBackgroundDrawable, getBgcolor, getBottom, getFocus, getFocusable, getGesturable, getHeight, getInnerHeight, getInnerWidth, getInnerX, getInnerY, getLeft, getMaxChildX, getMaxChildY, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getWidth, getX, 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 FORMAT_STRING_ANY
setFormat("**")
public static final int FORMAT_NUMBER_ANY
setFormat("N*")
public static final int FORMAT_STRING_HIDDEN
setFormat("H**")
public static final int FORMAT_NUMBER_HIDDEN
setFormat("HN*")
public nUIEntryElement(int nuiid, java.lang.String text)
nuiid
- Unique Native UI ID (or -1 if unidentified)text
- The default text to display to begin withpublic int getTextColor()
public void setTextColor(int color)
public void setFontStyle(int font_style)
font_style
- Any of nUIConstants.style_*
java.lang.IllegalArgumentException
- if font_style is not validpublic int getFontStyle()
nUIConstants.style_*
public void setFontSize(int font_size)
font_size
- One of the following NUIConstants: size_tiny, size_samll, size_medium, size_large, size_hugejava.lang.IllegalArgumentException
- if font_size is not validpublic int getFontSize()
public void setFontSizeAbsolute(int size_in_pixels, boolean accessibility_adjusted)
size_in_pixels
- any positive numberaccessibility_adjusted
- if true, some platforms can scale the actual font size depending on system properties.public void setFontSizeRelative(int rel_font_id, int scale)
rel_font_id
- one of the following NUIConstants: size_tiny, size_samll, size_medium, size_large, size_hugescale
- positive number in percentages.public void setLines(int lines)
lines
- Number of lines to displayjava.lang.IllegalArgumentException
- is lines is less than or equal to 0public int getLines()
public void setText(java.lang.String text)
text
- Text to displayjava.lang.NullPointerException
- if text is nullpublic java.lang.String getText()
public void setHintText(java.lang.String hinttext)
hinttext
- Hint text to displayjava.lang.NullPointerException
- if text is nullpublic java.lang.String getHintText()
public void setFormat(int intFormat)
FORMAT_*
constants defined in this class.public void setFormat(java.lang.String format)
public java.lang.String getFormat()
public void setEditing(boolean editing)
public void setEditable(boolean editable)
public boolean getEditable()