|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FormFieldComponent
Extended FormComponent for editable text fields.
Adds features like max columns, autoselect, autotext, conversion, etc...
| Method Summary | |
|---|---|
void |
clearText()
Clears the contents of this component. |
void |
doActionPerformed()
Invokes the action performed handler. |
String |
doFormat(Object object)
Does the formatting of the given object. Renders the object and returns the string. |
void |
downRight()
Move the caret to the right side of field and if already there move to next field. |
char |
getAdjust()
Gets the current adjustment. |
int |
getBaseline(int width,
int height)
Returns the baseline of this component. |
int |
getCaretPosition()
Gets the caret position. |
int |
getColumns()
Gets the columns. |
char |
getConvert()
Gets the current convesion |
StringConverter |
getConverter()
Gets the current converter. |
int |
getErrorOffset()
Gets the offset in this components text for the first error. |
char |
getFiller()
Gets the current fill char. |
String |
getFormat()
Gets the format string. |
int |
getHorizontalAlignment()
Gets the horizontal alignment. |
String |
getInvalidChars()
Gets invalid characters. |
int |
getMaxColumns()
Gets the maximum number of columns. |
String |
getText()
Gets the text from the view of this component. |
String |
getToolTipText()
Gets the tooltip text for this component. |
String |
getValidChars()
Gets allowed characters. |
int |
getVerticalAlignment()
Gets the vertical alignment. |
boolean |
isAutoNext()
Returns whether the auto-next feature is enabled. |
boolean |
isAutoSelect()
Returns whether the auto-select feature is enabled. |
boolean |
isAutoUpdate()
Returns whether the auto-update feature is enabled. |
boolean |
isCaretLeft()
Returns whether carat is at leftmost position. |
boolean |
isCaretRight()
Returns whether caret is at rightmost position. |
boolean |
isEmpty()
Determines whether this component is empty. |
boolean |
isEraseFirst()
Returns whether to erase the field after first setText(). |
boolean |
isInhibitAutoSelect()
Returns whether auto-select is inhibited (once). |
boolean |
isOverwrite()
Gets the current override mode. |
boolean |
isStartEditLeftmost()
Returns whether to start edit leftmost in this component (once). |
void |
setAdjust(char adjust)
Sets character adjustment. By default the text input data is trimmed, i.e. |
void |
setAutoNext(boolean autoNext)
Sets the auto-next feature. If autonext is enabled the next component will automatically receive the focus if the maximum number of characters is reached. |
void |
setAutoSelect(boolean autoSelect)
Sets the auto-select feature. A component with autoselect enabled will automatically select all characters if the component gets the keyboard focus. |
void |
setAutoUpdate(boolean autoUpdate)
Sets the auto-update feature. By default, all components update the data model if the view changes (due to certain events, for example focus lost). |
void |
setCaretLeft()
Sets the caret to leftmost position. |
void |
setCaretPosition(int pos)
Sets the caret position. |
void |
setCaretRight()
Sets the caret to rightmost position. |
void |
setColumns(int columns)
Sets the number of columns in this component. The visible width is adjusted according to the current font. |
void |
setConvert(char convert)
Sets character upper/lowercase conversion. Notice that changing the character conversion will immediately convert. |
void |
setConverter(StringConverter converter)
Sets the string converter. Besides the lower/uppercase conversion an optional StringConverter may be set to translate
characters. |
void |
setEraseFirst(boolean eraseFirst)
Sets whether to erase the field after first setText(). |
void |
setFiller(char filler)
Sets the fill char. The fill char determines the adjustment of the text data. |
void |
setFormat(String pattern)
Sets the format string. The format string is used to format the view of the data. |
void |
setHorizontalAlignment(int alignment)
Sets the horizontal alignment. |
void |
setInhibitAutoSelect(boolean inhibitAutoSelect)
Sets auto-select to be inhibited inhibited (once). |
void |
setInvalidChars(String invalidChars)
Sets invalid characters. |
void |
setMaxColumns(int maxColumns)
Sets the maximum number of columns. |
void |
setOverwrite(boolean override)
Sets the insert/override mode. |
void |
setStartEditLeftmost(boolean startEditLeftmost)
Sets whether to start edit leftmost in this component (once). |
void |
setText(String str)
Sets the given text in the view of this component. |
void |
setToolTipText(String text)
Sets the tooltip text for this component. |
void |
setValidChars(String validChars)
Sets allowed characters. |
void |
setVerticalAlignment(int alignment)
Sets the vertical alignment. Can only be used in Tentackle-LookAndFeels! |
void |
upLeft()
Move caret to the left side of field and if already there move to previous field. |
| Method Detail |
|---|
void setFormat(String pattern)
pattern - the format stringString getFormat()
void setAutoSelect(boolean autoSelect)
autoSelect - true if autoselect enabled, false if disabled (default)boolean isAutoSelect()
void setAutoNext(boolean autoNext)
autoNext - true if autonext enabled, false if disabled (default)boolean isAutoNext()
void setAutoUpdate(boolean autoUpdate)
autoUpdate - true if auto update the data (default), false if notboolean isAutoUpdate()
void setConvert(char convert)
convert - one of FormField.CONVERT_...char getConvert()
void setConverter(StringConverter converter)
StringConverter may be set to translate
characters.
converter - the converter, null if none (default)StringConverter getConverter()
void setAdjust(char adjust)
adjust - one of FormField.ADJUST_...setFiller(char)char getAdjust()
void setMaxColumns(int maxColumns)
maxColumns - the maximum number of columns, 0 if unlimited (default)int getMaxColumns()
void setFiller(char filler)
filler - the fill charactersetAdjust(char)char getFiller()
void setOverwrite(boolean override)
override - true if override, false if insert (default)boolean isOverwrite()
void setValidChars(String validChars)
validChars - the valid characters, null = all (default)String getValidChars()
void setInvalidChars(String invalidChars)
invalidChars - the invalid characters, null = none (default)String getInvalidChars()
boolean isCaretLeft()
boolean isCaretRight()
void setCaretLeft()
void setCaretRight()
void upLeft()
void downRight()
void setEraseFirst(boolean eraseFirst)
eraseFirst - true to clear after first setTextboolean isEraseFirst()
void setInhibitAutoSelect(boolean inhibitAutoSelect)
inhibitAutoSelect - true if inhibitedboolean isInhibitAutoSelect()
void clearText()
String doFormat(Object object)
object - the object
boolean isEmpty()
void setStartEditLeftmost(boolean startEditLeftmost)
startEditLeftmost - true if start edit leftmostboolean isStartEditLeftmost()
int getErrorOffset()
void doActionPerformed()
void setText(String str)
str - the textString getText()
void setColumns(int columns)
columns - the number of columns ≥ 0int getColumns()
void setToolTipText(String text)
text - the tooltip text, null = noneString getToolTipText()
void setHorizontalAlignment(int alignment)
alignment - the alignmentComponentint getHorizontalAlignment()
Componentvoid setVerticalAlignment(int alignment)
alignment - the vertical alignmentint getVerticalAlignment()
void setCaretPosition(int pos)
pos - the caret position, 0 = start of fieldint getCaretPosition()
int getBaseline(int width,
int height)
width - the width to get the baseline forheight - the height to get the baseline for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||