T
- the value typepublic interface IsValueBoxBase<T>
ValueBoxBase
but not
endorsed by any interface.Modifier and Type | Method and Description |
---|---|
void |
cancelKey()
If a keyboard event is currently being handled on this text box, calling
this method will suppress it.
|
int |
getCursorPos()
Gets the current position of the cursor (this also serves as the beginning
of the text selection).
|
String |
getSelectedText()
Gets the text currently selected within this text box.
|
int |
getSelectionLength()
Gets the length of the current text selection.
|
T |
getValueOrThrow()
Return the parsed value, or null if the field is empty.
|
boolean |
isReadOnly()
Determines whether or not the widget is read-only.
|
void |
selectAll()
Selects all of the text in the box.
|
void |
setAlignment(com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment align) |
void |
setCursorPos(int pos)
Sets the cursor position.
|
void |
setReadOnly(boolean readOnly)
Turns read-only mode on or off.
|
void |
setSelectionRange(int pos,
int length)
Sets the range of text to be selected.
|
void cancelKey()
int getCursorPos()
String getSelectedText()
int getSelectionLength()
T getValueOrThrow() throws ParseException
ParseException
- if the value cannot be parsedboolean isReadOnly()
true
if the widget is currently read-only,
false
if the widget is currently editablevoid selectAll()
void setAlignment(com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment align)
align
- defines how the text should be horizontally anchoredvoid setCursorPos(int pos)
pos
- the new cursor positionvoid setReadOnly(boolean readOnly)
readOnly
- if true
, the widget becomes read-only; if
false
the widget becomes editablevoid setSelectionRange(int pos, int length)
pos
- the position of the first character to be selectedlength
- the number of characters to be selectedCopyright © 2016 com.github.ilyes4j. All rights reserved.