org.tentackle.ui
Class FormFieldComponentPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.tentackle.ui.FormPanel
                      extended by org.tentackle.ui.FormComponentPanel
                          extended by org.tentackle.ui.FormFieldComponentPanel
All Implemented Interfaces:
ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, FormComponent, FormContainer, FormFieldComponent
Direct Known Subclasses:
AppDbObjectFieldPanel, AppDbObjectLinkPanel, FormCalendarField, FormFileChooser, FormMailField, FormTelnoField, FormUrlField

public class FormFieldComponentPanel
extends FormComponentPanel
implements FormFieldComponent

A FormComponentPanel with an embedded FormFieldComponent.

Author:
harald
See Also:
Serialized Form

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.FormComponentPanel
addValueListener, fireValueChanged, fireValueEntered, getFormComponent, getFormValue, getHelpURL, getParentWindow, hasFocus, invalidateParentInfo, isCellEditorUsage, isChangeable, isFireRunning, isFormTraversable, isHonourChangeable, isValueChanged, prepareFocusLost, removeValueListener, requestFocusLater, saveValue, setCellEditorUsage, setChangeable, setFireRunning, setFormComponent, setFormTraversable, setFormValue, setFormWrapWindow, setHelpURL, setHonourChangeable, showHelp, triggerValueChanged, wasFocusGainedFromTransfer, wasFocusGainedFromTransferBackward, wasTransferFocus, wasTransferFocusBackward, wasTransferFocusByEnter
 
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 javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.tentackle.ui.FormComponent
addValueListener, fireValueChanged, fireValueEntered, getFormValue, getHelpURL, getParentWindow, hasFocus, invalidateParentInfo, isCellEditorUsage, isChangeable, isFireRunning, isFormTraversable, isHonourChangeable, isValueChanged, prepareFocusLost, removeValueListener, requestFocusLater, saveValue, setCellEditorUsage, setChangeable, setFireRunning, setFormTraversable, setFormValue, setFormWrapWindow, setHelpURL, setHonourChangeable, showHelp, transferFocus, transferFocusBackward, triggerValueChanged, wasFocusGainedFromTransfer, wasFocusGainedFromTransferBackward, wasTransferFocus, wasTransferFocusBackward, wasTransferFocusByEnter
 

Constructor Detail

FormFieldComponentPanel

public FormFieldComponentPanel(FormFieldComponent comp)
Creates a FormFieldComponentPanel for a given FormFieldComponent.

Parameters:
comp - the component

FormFieldComponentPanel

public FormFieldComponentPanel()
Creates a FormFieldComponentPanel for a StringFormField.

Method Detail

getFormFieldComponent

public FormFieldComponent getFormFieldComponent()
Gets the embedded form field component.

Returns:
the component

setFormFieldComponent

public void setFormFieldComponent(FormFieldComponent comp)
Sets the embedded form field component.

Parameters:
comp - the component.

setColumns

public void setColumns(int columns)
Description copied from interface: FormFieldComponent
Sets the number of columns in this component.
The visible width is adjusted according to the current font.

Specified by:
setColumns in interface FormFieldComponent
Parameters:
columns - the number of columns ≥ 0

getColumns

public int getColumns()
Description copied from interface: FormFieldComponent
Gets the columns.

Specified by:
getColumns in interface FormFieldComponent
Returns:
the columns

setFormat

public void setFormat(String format)
Description copied from interface: FormFieldComponent
Sets the format string.
The format string is used to format the view of the data.

Specified by:
setFormat in interface FormFieldComponent
Parameters:
format - the format string

getFormat

public String getFormat()
Description copied from interface: FormFieldComponent
Gets the format string.

Specified by:
getFormat in interface FormFieldComponent
Returns:
the format string

doFormat

public String doFormat(Object object)
Description copied from interface: FormFieldComponent
Does the formatting of the given object.
Renders the object and returns the string.

Specified by:
doFormat in interface FormFieldComponent
Parameters:
object - the object
Returns:
the formatted object as a string

clearText

public void clearText()
Description copied from interface: FormFieldComponent
Clears the contents of this component.

Specified by:
clearText in interface FormFieldComponent

isEmpty

public boolean isEmpty()
Description copied from interface: FormFieldComponent
Determines whether this component is empty.

Specified by:
isEmpty in interface FormFieldComponent
Returns:
true if empty

setText

public void setText(String str)
Description copied from interface: FormFieldComponent
Sets the given text in the view of this component.

Specified by:
setText in interface FormFieldComponent
Parameters:
str - the text

getText

public String getText()
Description copied from interface: FormFieldComponent
Gets the text from the view of this component.

Specified by:
getText in interface FormFieldComponent
Returns:
the text

setEraseFirst

public void setEraseFirst(boolean erasefirst)
Description copied from interface: FormFieldComponent
Sets whether to erase the field after first setText().

Specified by:
setEraseFirst in interface FormFieldComponent
Parameters:
erasefirst - true to clear after first setText

isEraseFirst

public boolean isEraseFirst()
Description copied from interface: FormFieldComponent
Returns whether to erase the field after first setText().

Specified by:
isEraseFirst in interface FormFieldComponent
Returns:
true to clear after first setText

setMaxColumns

public void setMaxColumns(int columns)
Description copied from interface: FormFieldComponent
Sets the maximum number of columns.

Specified by:
setMaxColumns in interface FormFieldComponent
Parameters:
columns - the maximum number of columns, 0 if unlimited (default)

getMaxColumns

public int getMaxColumns()
Description copied from interface: FormFieldComponent
Gets the maximum number of columns.

Specified by:
getMaxColumns in interface FormFieldComponent
Returns:
the maximum number of columns, 0 if unlimited (default)

setConvert

public void setConvert(char convert)
Description copied from interface: FormFieldComponent
Sets character upper/lowercase conversion.
Notice that changing the character conversion will immediately convert.

Specified by:
setConvert in interface FormFieldComponent
Parameters:
convert - one of FormField.CONVERT_...

getConvert

public char getConvert()
Description copied from interface: FormFieldComponent
Gets the current convesion

Specified by:
getConvert in interface FormFieldComponent
Returns:
the conversion, default is CONVERT_NONE

setConverter

public void setConverter(StringConverter converter)
Description copied from interface: FormFieldComponent
Sets the string converter.
Besides the lower/uppercase conversion an optional StringConverter may be set to translate characters.

Specified by:
setConverter in interface FormFieldComponent
Parameters:
converter - the converter, null if none (default)

getConverter

public StringConverter getConverter()
Description copied from interface: FormFieldComponent
Gets the current converter. Default is null.

Specified by:
getConverter in interface FormFieldComponent
Returns:
the converter.

setAdjust

public void setAdjust(char adjust)
Description copied from interface: FormFieldComponent
Sets character adjustment.
By default the text input data is trimmed, i.e. fill characters (space by default) to the left and right are removed. This is not be mixed up with the horizontal orientation!

Specified by:
setAdjust in interface FormFieldComponent
Parameters:
adjust - one of FormField.ADJUST_...
See Also:
FormFieldComponent.setFiller(char)

getAdjust

public char getAdjust()
Description copied from interface: FormFieldComponent
Gets the current adjustment.

Specified by:
getAdjust in interface FormFieldComponent
Returns:
the adjustment, default ADJUST_TRIM

setAutoSelect

public void setAutoSelect(boolean autoselect)
Description copied from interface: FormFieldComponent
Sets the auto-select feature.
A component with autoselect enabled will automatically select all characters if the component gets the keyboard focus. Useful for numerical fields, for example.

Specified by:
setAutoSelect in interface FormFieldComponent
Parameters:
autoselect - true if autoselect enabled, false if disabled (default)

isAutoSelect

public boolean isAutoSelect()
Description copied from interface: FormFieldComponent
Returns whether the auto-select feature is enabled.

Specified by:
isAutoSelect in interface FormFieldComponent
Returns:
true if autoselect enabled, false if disabled (default)

setAutoNext

public void setAutoNext(boolean autonext)
Description copied from interface: FormFieldComponent
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. Only meaningful if maxColumns > 0

Specified by:
setAutoNext in interface FormFieldComponent
Parameters:
autonext - true if autonext enabled, false if disabled (default)

isAutoNext

public boolean isAutoNext()
Description copied from interface: FormFieldComponent
Returns whether the auto-next feature is enabled.

Specified by:
isAutoNext in interface FormFieldComponent
Returns:
true if autonext enabled, false if disabled (default)

setAutoUpdate

public void setAutoUpdate(boolean autoupdate)
Description copied from interface: FormFieldComponent
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).

Specified by:
setAutoUpdate in interface FormFieldComponent
Parameters:
autoupdate - true if auto update the data (default), false if not

isAutoUpdate

public boolean isAutoUpdate()
Description copied from interface: FormFieldComponent
Returns whether the auto-update feature is enabled.

Specified by:
isAutoUpdate in interface FormFieldComponent
Returns:
true if auto update the data (default), false if not

setValidChars

public void setValidChars(String str)
Description copied from interface: FormFieldComponent
Sets allowed characters.

Specified by:
setValidChars in interface FormFieldComponent
Parameters:
str - the valid characters, null = all (default)

getValidChars

public String getValidChars()
Description copied from interface: FormFieldComponent
Gets allowed characters.

Specified by:
getValidChars in interface FormFieldComponent
Returns:
the valid characters, null = all (default)

setInvalidChars

public void setInvalidChars(String str)
Description copied from interface: FormFieldComponent
Sets invalid characters.

Specified by:
setInvalidChars in interface FormFieldComponent
Parameters:
str - the invalid characters, null = none (default)

getInvalidChars

public String getInvalidChars()
Description copied from interface: FormFieldComponent
Gets invalid characters.

Specified by:
getInvalidChars in interface FormFieldComponent
Returns:
the invalid characters, null = none (default)

setFiller

public void setFiller(char filler)
Description copied from interface: FormFieldComponent
Sets the fill char.
The fill char determines the adjustment of the text data.

Specified by:
setFiller in interface FormFieldComponent
Parameters:
filler - the fill character
See Also:
FormFieldComponent.setAdjust(char)

getFiller

public char getFiller()
Description copied from interface: FormFieldComponent
Gets the current fill char.

Specified by:
getFiller in interface FormFieldComponent
Returns:
the filler, default is blank (space)

setOverwrite

public void setOverwrite(boolean override)
Description copied from interface: FormFieldComponent
Sets the insert/override mode.

Specified by:
setOverwrite in interface FormFieldComponent
Parameters:
override - true if override, false if insert (default)

isOverwrite

public boolean isOverwrite()
Description copied from interface: FormFieldComponent
Gets the current override mode.

Specified by:
isOverwrite in interface FormFieldComponent
Returns:
true if override, false if insert (default)

setStartEditLeftmost

public void setStartEditLeftmost(boolean startEditLeftmost)
Description copied from interface: FormFieldComponent
Sets whether to start edit leftmost in this component (once).

Specified by:
setStartEditLeftmost in interface FormFieldComponent
Parameters:
startEditLeftmost - true if start edit leftmost

isStartEditLeftmost

public boolean isStartEditLeftmost()
Description copied from interface: FormFieldComponent
Returns whether to start edit leftmost in this component (once).

Specified by:
isStartEditLeftmost in interface FormFieldComponent
Returns:
true if start edit leftmost

getErrorOffset

public int getErrorOffset()
Description copied from interface: FormFieldComponent
Gets the offset in this components text for the first error.

Specified by:
getErrorOffset in interface FormFieldComponent
Returns:
the error offset, -1 if no error

isInhibitAutoSelect

public boolean isInhibitAutoSelect()
Description copied from interface: FormFieldComponent
Returns whether auto-select is inhibited (once).

Specified by:
isInhibitAutoSelect in interface FormFieldComponent
Returns:
true if inhibited

setInhibitAutoSelect

public void setInhibitAutoSelect(boolean inhibitAutoSelect)
Description copied from interface: FormFieldComponent
Sets auto-select to be inhibited inhibited (once).

Specified by:
setInhibitAutoSelect in interface FormFieldComponent
Parameters:
inhibitAutoSelect - true if inhibited

isCaretLeft

public boolean isCaretLeft()
Description copied from interface: FormFieldComponent
Returns whether carat is at leftmost position.

Specified by:
isCaretLeft in interface FormFieldComponent
Returns:
true if caret is at leftmost position

isCaretRight

public boolean isCaretRight()
Description copied from interface: FormFieldComponent
Returns whether caret is at rightmost position.

Specified by:
isCaretRight in interface FormFieldComponent
Returns:
true if caret is at rightmost position

setCaretPosition

public void setCaretPosition(int pos)
Description copied from interface: FormFieldComponent
Sets the caret position.

Specified by:
setCaretPosition in interface FormFieldComponent
Parameters:
pos - the caret position, 0 = start of field

getCaretPosition

public int getCaretPosition()
Description copied from interface: FormFieldComponent
Gets the caret position.

Specified by:
getCaretPosition in interface FormFieldComponent
Returns:
the caret position, 0 = start of field

setHorizontalAlignment

public void setHorizontalAlignment(int align)
Description copied from interface: FormFieldComponent
Sets the horizontal alignment.

Specified by:
setHorizontalAlignment in interface FormFieldComponent
Parameters:
align - the alignment
See Also:
Component

getHorizontalAlignment

public int getHorizontalAlignment()
Description copied from interface: FormFieldComponent
Gets the horizontal alignment.

Specified by:
getHorizontalAlignment in interface FormFieldComponent
Returns:
the horizontal alignment
See Also:
Component

setVerticalAlignment

public void setVerticalAlignment(int alignment)
Description copied from interface: FormFieldComponent
Sets the vertical alignment.
Can only be used in Tentackle-LookAndFeels!

Specified by:
setVerticalAlignment in interface FormFieldComponent
Parameters:
alignment - the vertical alignment

getVerticalAlignment

public int getVerticalAlignment()
Description copied from interface: FormFieldComponent
Gets the vertical alignment.

Specified by:
getVerticalAlignment in interface FormFieldComponent
Returns:
the vertical alignment

setCaretLeft

public void setCaretLeft()
Description copied from interface: FormFieldComponent
Sets the caret to leftmost position.

Specified by:
setCaretLeft in interface FormFieldComponent

setCaretRight

public void setCaretRight()
Description copied from interface: FormFieldComponent
Sets the caret to rightmost position.

Specified by:
setCaretRight in interface FormFieldComponent

upLeft

public void upLeft()
Description copied from interface: FormFieldComponent
Move caret to the left side of field and if already there move to previous field.

Specified by:
upLeft in interface FormFieldComponent

downRight

public void downRight()
Description copied from interface: FormFieldComponent
Move the caret to the right side of field and if already there move to next field.

Specified by:
downRight in interface FormFieldComponent

doActionPerformed

public void doActionPerformed()
Description copied from interface: FormFieldComponent
Invokes the action performed handler.

Specified by:
doActionPerformed in interface FormFieldComponent

setToolTipText

public void setToolTipText(String text)
Description copied from class: javax.swing.JComponent
Registers the text to display in a tool tip. The text displays when the cursor lingers over the component.

See How to Use Tool Tips in The Java Tutorial for further documentation.

Specified by:
setToolTipText in interface FormFieldComponent
Overrides:
setToolTipText in class JComponent
Parameters:
text - the string to display; if the text is null, the tool tip is turned off for this component
See Also:
JComponent.TOOL_TIP_TEXT_KEY

getToolTipText

public String getToolTipText()
Description copied from class: javax.swing.JComponent
Returns the tooltip string that has been set with setToolTipText.

Specified by:
getToolTipText in interface FormFieldComponent
Overrides:
getToolTipText in class JComponent
Returns:
the text of the tool tip
See Also:
JComponent.TOOL_TIP_TEXT_KEY

getBaseline

public int getBaseline(int width,
                       int height)
Description copied from class: javax.swing.JComponent
Returns the baseline. The baseline is measured from the top of the component. This method is primarily meant for LayoutManagers 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.

Specified by:
getBaseline in interface FormFieldComponent
Overrides:
getBaseline in class JComponent
Parameters:
width - the width to get the baseline for
height - the height to get the baseline for
Returns:
the baseline or < 0 indicating there is no reasonable baseline
See Also:
JComponent.getBaselineResizeBehavior(), FontMetrics


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de