public class nUITextfieldElement extends nUIElementDisplay implements ITextfieldElement
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
Constructor and Description |
---|
nUITextfieldElement()
Default textfields constructor
|
nUITextfieldElement(java.util.Hashtable properties) |
nUITextfieldElement(java.lang.String text) |
nUITextfieldElement(java.lang.String text,
java.util.Hashtable properties) |
Modifier and Type | Method and Description |
---|---|
int |
getClipType()
Gets the currently set end-of-line truncation for this textfield.
|
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(float points)
Sets font size in density-independent or scale-independent pixels depending on target device.
|
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 |
applyBackground, applyBackground, applyBackground
getBackgroundDrawable, getBottom, getElementIdentifier, getFocusable, getGesturable, getHeight, getInnerHeight, getInnerWidth, getInnerX, getInnerY, getLeft, getMaxChildX, getMaxChildY, getProperties, getProperty, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getWidth, getX, getY, insertAtInternal, isEnabled, isVisible, onRemoved, remove, setBackgroundDrawable, setBottom, setElementIdentifier, setEnabled, setFocusable, setGesturable, setHeight, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setProperties, setProperty, setRight, setTop, setTriggerable, setVisible, setWidth, setX, setY
add, addEventListener, childElementAt, childIndexOf, getFirstChild, getId, getLastChild, getNextSibling, getParent, getPrevSibling, getTag, insertAfter, insertAt, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace, setId, setTag, setUnlinkChildrenOnRemoval
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setBackgroundDrawable
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()
public nUITextfieldElement(java.util.Hashtable properties)
public nUITextfieldElement(java.lang.String text)
public nUITextfieldElement(java.lang.String text, java.util.Hashtable properties)
public void setText(java.lang.String text)
setText
in interface ITextfieldElement
text
- Text to displaypublic java.lang.String getText()
getText
in interface ITextfieldElement
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)
setTextColor
in interface ITextfieldElement
text_color
- This is an AARRGGBB valuepublic int getTextColor()
public void setFontSize(float points)
points
- - DP or SP units.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()