public interface GralTextField_ifc extends GralWidget_ifc
GralWidget_ifc.ActionChange, GralWidget_ifc.ActionChangeWhen
Modifier and Type | Field and Description |
---|---|
static int |
version
Version and history
2012-01-17 new
#setSelection(String) . |
sVersion
Modifier and Type | Method and Description |
---|---|
int |
getCursorCol() |
int |
getCursorLine() |
int |
getCursorPos() |
java.lang.String |
getText()
Returns the text of this field.
|
int |
setCursorPos(int pos) |
void |
setText(java.lang.CharSequence text)
Set the textual content of the widget.
|
void |
setText(java.lang.CharSequence text,
int caretPos)
Sets the textual content and show it with the given caret position.
|
void |
setTextStyle(GralColor color,
GralFont font)
Sets the style of all new set and added texts.
|
getActionChange, getBackColor, getCmd, getContentIdent, getContentInfo, getData, getDataPath, getImplWidget, isChanged, isEditable, isGraphicDisposed, isNotEditableOrShouldInitialize, redraw, redraw, refreshFromVariable, refreshFromVariable, setBackColor, setBackgroundColor, setBoundsPixel, setCmd, setContentIdent, setData, setDataPath, setEditable, setFocus, setForegroundColor, setHtmlHelp, setLineColor, setTextColor
getFocusedWidget, getImplAccess, getName, gralMng, isInFocus, isVisible, pos, setFocus, setFocused, setFocusedWidget, setVisible
static final int version
#setSelection(String)
. The possible values of the string parameter are not defined well yet.
The method is only used to show a text right aligned.
setText(CharSequence)
now uses CharSequence instead String.
A CharSequence is more universal. Internally the contained String will be copied.
getCursorPos()
, to get parts of selected texts in a box.
It is used for commands in the output window for JavaCommander.
void setText(java.lang.CharSequence text)
setText
in interface GralWidget_ifc
text
- The contentvoid setText(java.lang.CharSequence text, int caretPos)
setText(CharSequence)
if caretPos = 0.text
- The text to show in the widget.caretPos
- 0 for left, -1 for right, 0 to Integer.MAXINT for a given position.
If the caret position is greater then the number of chars, it is set right.
That character which is left from the caret position is shown guaranteed in the text field.
Especially -1 can be given to show the text right-aligned.java.lang.String getText()
int getCursorPos()
int getCursorLine()
int getCursorCol()
int setCursorPos(int pos)