|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BehavesAsTextBox
This is a "convenience" interface that mimics the interface of the TextBoxBase base class.
| Field Summary | |
|---|---|
static com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment |
ALIGN_CENTER
Center the text. |
static com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment |
ALIGN_JUSTIFY
Justify the text. |
static com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment |
ALIGN_LEFT
Align the text to the left edge. |
static com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment |
ALIGN_RIGHT
Align the text to the right. |
| Method Summary | |
|---|---|
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). |
java.lang.String |
getSelectedText()
Gets the text currently selected within this text box. |
int |
getSelectionLength()
Gets the length of the current text selection. |
void |
selectAll()
Selects all of the text in the box. |
void |
setCursorPos(int pos)
Sets the cursor position. |
void |
setSelectionRange(int pos,
int length)
Sets the range of text to be selected. |
void |
setTextAlignment(com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment align)
Sets the alignment of the text in the text box. |
| Methods inherited from interface com.sage.swt.client.widget.BehavesAsFocusWidget |
|---|
isEnabled, setEnabled |
| Methods inherited from interface com.google.gwt.event.dom.client.HasClickHandlers |
|---|
addClickHandler |
| Methods inherited from interface com.google.gwt.user.client.ui.Focusable |
|---|
getTabIndex, setAccessKey, setFocus, setTabIndex |
| Methods inherited from interface com.google.gwt.event.dom.client.HasKeyUpHandlers |
|---|
addKeyUpHandler |
| Methods inherited from interface com.google.gwt.event.dom.client.HasKeyDownHandlers |
|---|
addKeyDownHandler |
| Methods inherited from interface com.google.gwt.event.dom.client.HasKeyPressHandlers |
|---|
addKeyPressHandler |
| Methods inherited from interface com.sage.swt.client.widget.HasCancellableFocusHandlers |
|---|
addBeforeFocusHandler |
| Methods inherited from interface com.google.gwt.event.dom.client.HasFocusHandlers |
|---|
addFocusHandler |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Methods inherited from interface com.google.gwt.event.dom.client.HasBlurHandlers |
|---|
addBlurHandler |
| Methods inherited from interface com.sage.swt.client.widget.HasReadOnly |
|---|
isReadOnly, setReadOnly |
| Field Detail |
|---|
static final com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment ALIGN_CENTER
static final com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment ALIGN_JUSTIFY
static final com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment ALIGN_LEFT
static final com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment ALIGN_RIGHT
| Method Detail |
|---|
void cancelKey()
int getCursorPos()
java.lang.String getSelectedText()
int getSelectionLength()
void selectAll()
void setCursorPos(int pos)
pos - the new cursor position
void setSelectionRange(int pos,
int length)
pos - the position of the first character to be selectedlength - the number of characters to be selectedvoid setTextAlignment(com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment align)
align - the text alignment (as specified by ALIGN_CENTER,
ALIGN_JUSTIFY, ALIGN_LEFT, and
ALIGN_RIGHT)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||