public class nUITextfieldElement extends nUIElementDisplay
Modifier and Type | Field and Description |
---|---|
static int |
CLIP_TYPE_CLIP |
static int |
CLIP_TYPE_ELLIPSIS |
static int |
RENDER_TYPE_HYPERLINKS |
static int |
RENDER_TYPE_PLAIN_TEXT |
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 |
---|
nUITextfieldElement(int nuiid,
java.lang.String text)
Default textfields constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getClipType()
Gets the currently set end-of-line truncation for this textfield.
|
int |
getFontSize()
Gets the current font size.
|
int |
getFontStyle()
Gets the current font style.
|
int |
getHAlign()
Gets the text's horizontal alignment.
|
int |
getMaxLines()
Gets the maximum number of lines that this textfield will display when line-wrapped.
|
int |
getMinLines()
Gets the minimum number of lines that this textfield should display when line-wrapped.
|
int |
getRenderType()
Gets the current rendering type.
|
java.lang.String |
getText()
Gets the current text of this nUITextfieldElement.
|
int |
getTextColor()
Gets the current text colour.
|
void |
setClipType(int clip_type)
Sets the type of end of line truncation that is used
|
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 |
setHAlign(int halign)
Sets the alignment of the text.
|
void |
setMaxLines(int max_lines)
Sets the maximum number of lines this text should display when line-wrapped.
|
void |
setMinLines(int min_lines)
Sets the minimum number of lines this text should display when line-wrapped.
|
void |
setRenderType(int render_type)
Sets the rendering type to use.
|
void |
setText(java.lang.String text)
Sets the text to display.
|
void |
setTextColor(int text_color)
Sets the text color
COLOR_FOREGROUND_NORMAL, COLOR_FOREGROUND_LIGHT and COLOR_FOREGROUND_DARK will be mapped to the normal colors used in menuing for this particular device |
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 CLIP_TYPE_CLIP
public static final int CLIP_TYPE_ELLIPSIS
public static final int RENDER_TYPE_PLAIN_TEXT
public static final int RENDER_TYPE_HYPERLINKS
public nUITextfieldElement(int nuiid, java.lang.String text)
nuiid
- Unique Native UI ID (or -1 if unidentified)text
- The string this textfield should displaypublic void setText(java.lang.String text)
text
- Text to displayjava.lang.NullPointerException
- if text is nullpublic java.lang.String getText()
public void setHAlign(int halign)
halign
- One of nUIConstrants.left, .center or .rightjava.lang.IllegalArgumentException
- if halign is not validpublic int getHAlign()
public void setMaxLines(int max_lines)
max_lines
- Maximum number of lines to displayjava.lang.IllegalArgumentException
- is max_lines is less than or equal to 0, or less than min_linespublic int getMaxLines()
public void setMinLines(int min_lines)
min_lines
- Minimum number of lines to displayjava.lang.IllegalArgumentException
- is min_lines is less than or equal to 0, or greater than max_linespublic int getMinLines()
public void setClipType(int clip_type)
clip_type
- CLIP_TYPE_CLIP or CLIP_TYPE_ELLIPSISjava.lang.IllegalArgumentException
- if clip_type
is not validpublic int getClipType()
public void setTextColor(int text_color)
public int getTextColor()
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 setFontStyle(int font_style)
font_style
- Any of nUIConstants.style_*java.lang.IllegalArgumentException
- if font_style is not validpublic int getFontStyle()
public void setRenderType(int render_type)
render_type
- Any of RENDER_TYPE_*java.lang.IllegalArgumentException
- if render_type is not validpublic int getRenderType()