|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.tentackle.ui.FormPanel
org.tentackle.ui.FormComponentPanel
org.tentackle.ui.FormFieldComponentPanel
public class FormFieldComponentPanel
A FormComponentPanel with an embedded FormFieldComponent.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
FormFieldComponentPanel()
Creates a FormFieldComponentPanel for a StringFormField. |
|
FormFieldComponentPanel(FormFieldComponent comp)
Creates a FormFieldComponentPanel for a given FormFieldComponent. |
|
| 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. |
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. |
FormFieldComponent |
getFormFieldComponent()
Gets the embedded form field component. |
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()
Returns the tooltip string that has been set with setToolTipText. |
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 format)
Sets the format string. The format string is used to format the view of the data. |
void |
setFormFieldComponent(FormFieldComponent comp)
Sets the embedded form field component. |
void |
setHorizontalAlignment(int align)
Sets the horizontal alignment. |
void |
setInhibitAutoSelect(boolean inhibitAutoSelect)
Sets auto-select to be inhibited inhibited (once). |
void |
setInvalidChars(String str)
Sets invalid characters. |
void |
setMaxColumns(int columns)
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)
Registers the text to display in a tool tip. |
void |
setValidChars(String str)
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. |
| Methods inherited from class org.tentackle.ui.FormPanel |
|---|
addActionListener, areValuesChanged, componentAdded, componentRemoved, fireActionPerformed, getFormValues, getTitle, isAllChangeable, isHonourAllChangeable, removeActionListener, saveValues, setAllChangeable, setFormValues, setFormValuesKeepChanged, setHonourAllChangeable, setTitle, triggerValuesChanged |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FormFieldComponentPanel(FormFieldComponent comp)
FormFieldComponentPanel for a given FormFieldComponent.
comp - the componentpublic FormFieldComponentPanel()
FormFieldComponentPanel for a StringFormField.
| Method Detail |
|---|
public FormFieldComponent getFormFieldComponent()
public void setFormFieldComponent(FormFieldComponent comp)
comp - the component.public void setColumns(int columns)
FormFieldComponent
setColumns in interface FormFieldComponentcolumns - the number of columns ≥ 0public int getColumns()
FormFieldComponent
getColumns in interface FormFieldComponentpublic void setFormat(String format)
FormFieldComponent
setFormat in interface FormFieldComponentformat - the format stringpublic String getFormat()
FormFieldComponent
getFormat in interface FormFieldComponentpublic String doFormat(Object object)
FormFieldComponent
doFormat in interface FormFieldComponentobject - the object
public void clearText()
FormFieldComponent
clearText in interface FormFieldComponentpublic boolean isEmpty()
FormFieldComponent
isEmpty in interface FormFieldComponentpublic void setText(String str)
FormFieldComponent
setText in interface FormFieldComponentstr - the textpublic String getText()
FormFieldComponent
getText in interface FormFieldComponentpublic void setEraseFirst(boolean erasefirst)
FormFieldComponent
setEraseFirst in interface FormFieldComponenterasefirst - true to clear after first setTextpublic boolean isEraseFirst()
FormFieldComponent
isEraseFirst in interface FormFieldComponentpublic void setMaxColumns(int columns)
FormFieldComponent
setMaxColumns in interface FormFieldComponentcolumns - the maximum number of columns, 0 if unlimited (default)public int getMaxColumns()
FormFieldComponent
getMaxColumns in interface FormFieldComponentpublic void setConvert(char convert)
FormFieldComponent
setConvert in interface FormFieldComponentconvert - one of FormField.CONVERT_...public char getConvert()
FormFieldComponent
getConvert in interface FormFieldComponentpublic void setConverter(StringConverter converter)
FormFieldComponentStringConverter may be set to translate
characters.
setConverter in interface FormFieldComponentconverter - the converter, null if none (default)public StringConverter getConverter()
FormFieldComponent
getConverter in interface FormFieldComponentpublic void setAdjust(char adjust)
FormFieldComponent
setAdjust in interface FormFieldComponentadjust - one of FormField.ADJUST_...FormFieldComponent.setFiller(char)public char getAdjust()
FormFieldComponent
getAdjust in interface FormFieldComponentpublic void setAutoSelect(boolean autoselect)
FormFieldComponent
setAutoSelect in interface FormFieldComponentautoselect - true if autoselect enabled, false if disabled (default)public boolean isAutoSelect()
FormFieldComponent
isAutoSelect in interface FormFieldComponentpublic void setAutoNext(boolean autonext)
FormFieldComponent
setAutoNext in interface FormFieldComponentautonext - true if autonext enabled, false if disabled (default)public boolean isAutoNext()
FormFieldComponent
isAutoNext in interface FormFieldComponentpublic void setAutoUpdate(boolean autoupdate)
FormFieldComponent
setAutoUpdate in interface FormFieldComponentautoupdate - true if auto update the data (default), false if notpublic boolean isAutoUpdate()
FormFieldComponent
isAutoUpdate in interface FormFieldComponentpublic void setValidChars(String str)
FormFieldComponent
setValidChars in interface FormFieldComponentstr - the valid characters, null = all (default)public String getValidChars()
FormFieldComponent
getValidChars in interface FormFieldComponentpublic void setInvalidChars(String str)
FormFieldComponent
setInvalidChars in interface FormFieldComponentstr - the invalid characters, null = none (default)public String getInvalidChars()
FormFieldComponent
getInvalidChars in interface FormFieldComponentpublic void setFiller(char filler)
FormFieldComponent
setFiller in interface FormFieldComponentfiller - the fill characterFormFieldComponent.setAdjust(char)public char getFiller()
FormFieldComponent
getFiller in interface FormFieldComponentpublic void setOverwrite(boolean override)
FormFieldComponent
setOverwrite in interface FormFieldComponentoverride - true if override, false if insert (default)public boolean isOverwrite()
FormFieldComponent
isOverwrite in interface FormFieldComponentpublic void setStartEditLeftmost(boolean startEditLeftmost)
FormFieldComponent
setStartEditLeftmost in interface FormFieldComponentstartEditLeftmost - true if start edit leftmostpublic boolean isStartEditLeftmost()
FormFieldComponent
isStartEditLeftmost in interface FormFieldComponentpublic int getErrorOffset()
FormFieldComponent
getErrorOffset in interface FormFieldComponentpublic boolean isInhibitAutoSelect()
FormFieldComponent
isInhibitAutoSelect in interface FormFieldComponentpublic void setInhibitAutoSelect(boolean inhibitAutoSelect)
FormFieldComponent
setInhibitAutoSelect in interface FormFieldComponentinhibitAutoSelect - true if inhibitedpublic boolean isCaretLeft()
FormFieldComponent
isCaretLeft in interface FormFieldComponentpublic boolean isCaretRight()
FormFieldComponent
isCaretRight in interface FormFieldComponentpublic void setCaretPosition(int pos)
FormFieldComponent
setCaretPosition in interface FormFieldComponentpos - the caret position, 0 = start of fieldpublic int getCaretPosition()
FormFieldComponent
getCaretPosition in interface FormFieldComponentpublic void setHorizontalAlignment(int align)
FormFieldComponent
setHorizontalAlignment in interface FormFieldComponentalign - the alignmentComponentpublic int getHorizontalAlignment()
FormFieldComponent
getHorizontalAlignment in interface FormFieldComponentComponentpublic void setVerticalAlignment(int alignment)
FormFieldComponent
setVerticalAlignment in interface FormFieldComponentalignment - the vertical alignmentpublic int getVerticalAlignment()
FormFieldComponent
getVerticalAlignment in interface FormFieldComponentpublic void setCaretLeft()
FormFieldComponent
setCaretLeft in interface FormFieldComponentpublic void setCaretRight()
FormFieldComponent
setCaretRight in interface FormFieldComponentpublic void upLeft()
FormFieldComponent
upLeft in interface FormFieldComponentpublic void downRight()
FormFieldComponent
downRight in interface FormFieldComponentpublic void doActionPerformed()
FormFieldComponent
doActionPerformed in interface FormFieldComponentpublic void setToolTipText(String text)
javax.swing.JComponentSee How to Use Tool Tips in The Java Tutorial for further documentation.
setToolTipText in interface FormFieldComponentsetToolTipText in class JComponenttext - the string to display; if the text is null,
the tool tip is turned off for this componentJComponent.TOOL_TIP_TEXT_KEYpublic String getToolTipText()
javax.swing.JComponentsetToolTipText.
getToolTipText in interface FormFieldComponentgetToolTipText in class JComponentJComponent.TOOL_TIP_TEXT_KEY
public int getBaseline(int width,
int height)
javax.swing.JComponentLayoutManagers to align components along their
baseline. A return value less than 0 indicates this component
does not have a reasonable baseline and that
LayoutManagers should not align this component on
its baseline.
This method calls into the ComponentUI method of the
same name. If this component does not have a ComponentUI
-1 will be returned. If a value >= 0 is
returned, then the component has a valid baseline for any
size >= the minimum size and getBaselineResizeBehavior
can be used to determine how the baseline changes with size.
getBaseline in interface FormFieldComponentgetBaseline in class JComponentwidth - the width to get the baseline forheight - the height to get the baseline for
JComponent.getBaselineResizeBehavior(),
FontMetrics
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||