org.tentackle.ui
Class FormRadioButton

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.AbstractButton
                  extended by javax.swing.JToggleButton
                      extended by javax.swing.JRadioButton
                          extended by org.tentackle.ui.FormRadioButton
All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, SwingConstants, FormComponent

public class FormRadioButton
extends JRadioButton
implements FormComponent, ActionListener

A radio button aware of forms.

Author:
harald
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JRadioButton
JRadioButton.AccessibleJRadioButton
 
Nested classes/interfaces inherited from class javax.swing.JToggleButton
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModel
 
Nested classes/interfaces inherited from class javax.swing.AbstractButton
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener
 
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.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
 
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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FormRadioButton()
          Creates a radio button without text, unselected.
FormRadioButton(String text)
          Creates a radio button with text, unselected.
FormRadioButton(String text, boolean selected)
          Creates a radio button with text and specifies whether or not it is initially selected.
FormRadioButton(String text, Icon icon, boolean selected)
          Creates a radio button with text and icon, and specifies whether or not it is initially selected.
 
Method Summary
 void actionPerformed(ActionEvent evt)
          Invoked when an action occurs.
 void addValueListener(ValueListener l)
          Adds a value listener that implements the binding between this component and the data.
 void fireValueChanged()
          Fires all value listeners registered on this component invoking their valueChanged-handler.
This method is invoked whenever the data has been changed and that change should be reflected in the view.
 void fireValueEntered()
          Fires all listeners registered on this component invoking their valueEntered-handler.
This method is invoked whenever the user edited the view and that change should be reflected in the data.
 Boolean getFormValue()
          Retrieves the value from this component.
The method is used to update the data if the view has changed because the user edited it.
 String getHelpURL()
          Gets the online-help URL.
 Window getParentWindow()
          Gets the parent window of this component.
 Color getSelectedColor()
          Gets the color for "checked".
 String getToolTipText()
          Returns the tooltip string that has been set with setToolTipText.
 Color getUnselectedColor()
          Gets the color for "unchecked".
 void invalidateParentInfo()
          Invalidates all container-relevant (cached) information for the hierarchy of this component's parents.
For optimization purposes.
 boolean isCellEditorUsage()
          Returns whether this component is used as a cell editor.
 boolean isChangeable()
          Returns if this component is changeable.
 boolean isFireRunning()
          Checks whether a fire-method is running.
 boolean isFormTraversable()
          Returns whether this component is form traversable or not.
 boolean isHonourChangeable()
          Returns whether this component should honour the changeable-attribute or not.
 boolean isValueChanged()
          Checks whether the contents have been changed since the last savepoint.
 void prepareFocusLost()
          Prepares for FOCUS_LOST.
Gives this component the opportunity to invoke fireValueEntered() earlier than FOCUS_LOST is really received.
protected  void processFocusEvent(FocusEvent e)
          Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
protected  void processKeyEvent(KeyEvent e)
          Overrides processKeyEvent to process events.
 void removeValueListener(ValueListener l)
          Remove a value listener.
 void requestFocusLater()
          Requests the keyboard focus for this component by appending an event to the end of the event queue.
Applications should not use requestFocus() or requestFocusInWindow() unless the order in which the events are processed is unimportant.
 void saveValue()
          Sets a savepoint for the data of this component.
Allows to decide whether the user has changed the data associated with this component or not.
 void setCellEditorUsage(boolean flag)
          Sets a hint that this component is used as a cell editor.
Some components behave differently in tables than in forms, for example.
 void setChangeable(boolean flag)
          Set the component to be changeable.
This is a unified abstraction and will be translated to setEditable or setEnabled, whatever is appropriate to this component.
 void setFireRunning(boolean running)
          Sets a component's flag that a fire-method is currently running.
Used by the framework to minimize valueChanged/valueEntered processing.
 void setFormTraversable(boolean formTraversable)
          Sets whether this component is form traversable or not, i.e.
 void setFormValue(Object selected)
          Sets a value in this component.
The method is used to update the view if the data has changed.
 void setFormWrapWindow(FormWindow parent)
          Sets the window that will fire a FormWrapEvent when this components loses the keyboard focus.
 void setHelpURL(String helpURL)
          Sets the online-help URL.
If a help url is set for this component, a browser will be launched to show that url.
 void setHonourChangeable(boolean flag)
          Sets whether this component should honour the changeable-attribute or not.
The default is true.
 void setSelectedColor(Color selectedColor)
          Sets the color when item is selected.
If the selected color is set, the deselected color should be set too.
 void setUnselectedColor(Color unselectedColor)
          Sets the color when item is unselected.
If the unselected color is set, the selected color should be set too.
 void showHelp()
          Displays online help for this component.
Usually triggered by KeyEvent.VK_F1 or VK_HELP or a button.
 void transferFocus()
          Transfers the focus to the next component, as though this Component were the focus owner.
 void transferFocusBackward()
          Transfers the focus to the previous component, as though this Component were the focus owner.
 void triggerValueChanged()
          Promotes the fact that value changed to all FormContainers this component is a child of.
 boolean wasFocusGainedFromTransfer()
          Returns whether the keyboard focus was gained due to FormComponent.transferFocus() in the opposite component.
 boolean wasFocusGainedFromTransferBackward()
          Returns whether the keyboard focus was gained due to FormComponent.transferFocusBackward() in the opposite component.
 boolean wasTransferFocus()
          Returns whether this component lost the keyboard focus due to FormComponent.transferFocus().
 boolean wasTransferFocusBackward()
          Returns whether this component lost the keyboard focus due to FormComponent.transferFocusBackward().
 boolean wasTransferFocusByEnter()
          Returns whether this component lost the keyboard focus due to KeyEvent.VK_ENTER.
 
Methods inherited from class javax.swing.JRadioButton
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.AbstractButton
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, removeNotify, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
 
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, getBaseline, 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, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, 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, hasFocus, hide, 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, 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, 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
hasFocus
 

Constructor Detail

FormRadioButton

public FormRadioButton(String text,
                       Icon icon,
                       boolean selected)
Creates a radio button with text and icon, and specifies whether or not it is initially selected.

Parameters:
text - the text of the radio button.
icon - the Icon image to display
selected - a boolean value indicating the initial selection state. If true the radio button is selected

FormRadioButton

public FormRadioButton(String text,
                       boolean selected)
Creates a radio button with text and specifies whether or not it is initially selected.

Parameters:
text - the text of the radio button.
selected - a boolean value indicating the initial selection state. If true the radio button is selected

FormRadioButton

public FormRadioButton(String text)
Creates a radio button with text, unselected.

Parameters:
text - the text of the radio button.

FormRadioButton

public FormRadioButton()
Creates a radio button without text, unselected.

Method Detail

getSelectedColor

public Color getSelectedColor()
Gets the color for "checked".

Returns:
the selected color

setSelectedColor

public void setSelectedColor(Color selectedColor)
Sets the color when item is selected.
If the selected color is set, the deselected color should be set too. If the tentackle-plafs are used, these colors will be used regardless whether the component is enabled or not. This is a nice feature to circumvent the half-intensity display of disabled components.

Parameters:
selectedColor - the selected color, null if default

getUnselectedColor

public Color getUnselectedColor()
Gets the color for "unchecked".

Returns:
the unselected color

setUnselectedColor

public void setUnselectedColor(Color unselectedColor)
Sets the color when item is unselected.
If the unselected color is set, the selected color should be set too. If the tentackle-plafs are used, these colors will be used regardless whether the component is enabled or not. This is a nice feature to circumvent the half-intensity display of disabled components.

Parameters:
unselectedColor - the unselected color, null if default

getToolTipText

public String getToolTipText()
Returns the tooltip string that has been set with setToolTipText.

Overridden to show tooltip in tooltipdisplay _or_ via mouse hover but _not_ both.

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

transferFocus

public void transferFocus()
Description copied from class: java.awt.Component
Transfers the focus to the next component, as though this Component were the focus owner.

Specified by:
transferFocus in interface FormComponent
Overrides:
transferFocus in class Component
See Also:
Component.requestFocus()

transferFocusBackward

public void transferFocusBackward()
Description copied from class: java.awt.Component
Transfers the focus to the previous component, as though this Component were the focus owner.

Specified by:
transferFocusBackward in interface FormComponent
Overrides:
transferFocusBackward in class Container
See Also:
Component.requestFocus()

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Overrides processKeyEvent to process events.

Overridden to implement keyboard shortcuts.

Overrides:
processKeyEvent in class JComponent
Parameters:
e - the key event
See Also:
KeyEvent, KeyListener, KeyboardFocusManager, DefaultKeyboardFocusManager, Component.processEvent(java.awt.AWTEvent), Component.dispatchEvent(java.awt.AWTEvent), Component.addKeyListener(java.awt.event.KeyListener), Component.enableEvents(long), Component.isShowing()

processFocusEvent

protected void processFocusEvent(FocusEvent e)
Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.

This method is not called unless focus events are enabled for this component. Focus events are enabled when one of the following occurs:

If focus events are enabled for a Component, the current KeyboardFocusManager determines whether or not a focus event should be dispatched to registered FocusListener objects. If the events are to be dispatched, the KeyboardFocusManager calls the Component's dispatchEvent method, which results in a call to the Component's processFocusEvent method.

If focus events are enabled for a Component, calling the Component's dispatchEvent method with a FocusEvent as the argument will result in a call to the Component's processFocusEvent method regardless of the current KeyboardFocusManager.

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Overridden for advanced focus handling

Overrides:
processFocusEvent in class Component
Parameters:
e - the focus event
See Also:
FocusEvent, FocusListener, KeyboardFocusManager, Component.addFocusListener(java.awt.event.FocusListener), Component.enableEvents(long), Component.dispatchEvent(java.awt.AWTEvent)

requestFocusLater

public void requestFocusLater()
Description copied from interface: FormComponent
Requests the keyboard focus for this component by appending an event to the end of the event queue.
Applications should not use requestFocus() or requestFocusInWindow() unless the order in which the events are processed is unimportant. This method guarantees that this component gets the focus when all events queued so far have been processed.

Specified by:
requestFocusLater in interface FormComponent

actionPerformed

public void actionPerformed(ActionEvent evt)
Description copied from interface: java.awt.event.ActionListener
Invoked when an action occurs.

Specified by:
actionPerformed in interface ActionListener

addValueListener

public void addValueListener(ValueListener l)
Description copied from interface: FormComponent
Adds a value listener that implements the binding between this component and the data.

Specified by:
addValueListener in interface FormComponent
Parameters:
l - the value listener to add

removeValueListener

public void removeValueListener(ValueListener l)
Description copied from interface: FormComponent
Remove a value listener.

Specified by:
removeValueListener in interface FormComponent
Parameters:
l - the value listener to remove

fireValueChanged

public void fireValueChanged()
Description copied from interface: FormComponent
Fires all value listeners registered on this component invoking their valueChanged-handler.
This method is invoked whenever the data has been changed and that change should be reflected in the view.

Specified by:
fireValueChanged in interface FormComponent

fireValueEntered

public void fireValueEntered()
Description copied from interface: FormComponent
Fires all listeners registered on this component invoking their valueEntered-handler.
This method is invoked whenever the user edited the view and that change should be reflected in the data.

Specified by:
fireValueEntered in interface FormComponent

setFormValue

public void setFormValue(Object selected)
Description copied from interface: FormComponent
Sets a value in this component.
The method is used to update the view if the data has changed.

Specified by:
setFormValue in interface FormComponent
Parameters:
selected - a Boolean object, else the radiobutton is unselected

getFormValue

public Boolean getFormValue()
Description copied from interface: FormComponent
Retrieves the value from this component.
The method is used to update the data if the view has changed because the user edited it.

Specified by:
getFormValue in interface FormComponent
Returns:
either Boolean.TRUE or Boolean.FALSE

saveValue

public void saveValue()
Description copied from interface: FormComponent
Sets a savepoint for the data of this component.
Allows to decide whether the user has changed the data associated with this component or not.

Specified by:
saveValue in interface FormComponent
See Also:
FormComponent.isValueChanged()

isValueChanged

public boolean isValueChanged()
Description copied from interface: FormComponent
Checks whether the contents have been changed since the last savepoint.

Specified by:
isValueChanged in interface FormComponent
Returns:
true if changed
See Also:
FormComponent.saveValue()

triggerValueChanged

public void triggerValueChanged()
Description copied from interface: FormComponent
Promotes the fact that value changed to all FormContainers this component is a child of.

Specified by:
triggerValueChanged in interface FormComponent

setChangeable

public void setChangeable(boolean flag)
Description copied from interface: FormComponent
Set the component to be changeable.
This is a unified abstraction and will be translated to setEditable or setEnabled, whatever is appropriate to this component.

Specified by:
setChangeable in interface FormComponent
Parameters:
flag - true the user can edit the data, false if show only

isChangeable

public boolean isChangeable()
Description copied from interface: FormComponent
Returns if this component is changeable.

Specified by:
isChangeable in interface FormComponent
Returns:
true the user can edit the data, false if show only

setHonourChangeable

public void setHonourChangeable(boolean flag)
Description copied from interface: FormComponent
Sets whether this component should honour the changeable-attribute or not.
The default is true. Notice: if this component does not honour the changeable flag, isValueChanged() always returns false and it will not perform any saveValue().

Specified by:
setHonourChangeable in interface FormComponent
Parameters:
flag - true if honour the changeable attribute, false if not

isHonourChangeable

public boolean isHonourChangeable()
Description copied from interface: FormComponent
Returns whether this component should honour the changeable-attribute or not.

Specified by:
isHonourChangeable in interface FormComponent
Returns:
true if honour the changeable attribute, false if not

setFireRunning

public void setFireRunning(boolean running)
Description copied from interface: FormComponent
Sets a component's flag that a fire-method is currently running.
Used by the framework to minimize valueChanged/valueEntered processing.

Specified by:
setFireRunning in interface FormComponent
Parameters:
running - true if some fire-method is running

isFireRunning

public boolean isFireRunning()
Description copied from interface: FormComponent
Checks whether a fire-method is running.

Specified by:
isFireRunning in interface FormComponent
Returns:
true if some fire-method is running

prepareFocusLost

public void prepareFocusLost()
Description copied from interface: FormComponent
Prepares for FOCUS_LOST.
Gives this component the opportunity to invoke fireValueEntered() earlier than FOCUS_LOST is really received. Useful because the next focused component is determined before FOCUS_LOST is sent to this component. Thus, if this component changes the focusability of the next component, the focus policy would probably pick the wrong component otherwise.

Specified by:
prepareFocusLost in interface FormComponent

setFormWrapWindow

public void setFormWrapWindow(FormWindow parent)
Description copied from interface: FormComponent
Sets the window that will fire a FormWrapEvent when this components loses the keyboard focus. When fired the reference to the window is cleared.

Specified by:
setFormWrapWindow in interface FormComponent
Parameters:
parent - the window (usually the parent window of this component).

getHelpURL

public String getHelpURL()
Description copied from interface: FormComponent
Gets the online-help URL.

Specified by:
getHelpURL in interface FormComponent
Returns:
the help url, default is null

setHelpURL

public void setHelpURL(String helpURL)
Description copied from interface: FormComponent
Sets the online-help URL.
If a help url is set for this component, a browser will be launched to show that url. If there is no url the next higher level container will determine the url, and so forth.

Specified by:
setHelpURL in interface FormComponent
Parameters:
helpURL - the help url
See Also:
FormHelper.openHelpURL(Component)

showHelp

public void showHelp()
Description copied from interface: FormComponent
Displays online help for this component.
Usually triggered by KeyEvent.VK_F1 or VK_HELP or a button. If help is not configured for this component, the parent's help is used.

Specified by:
showHelp in interface FormComponent

getParentWindow

public Window getParentWindow()
Description copied from interface: FormComponent
Gets the parent window of this component.

Specified by:
getParentWindow in interface FormComponent
Returns:
the parent window, null if none

invalidateParentInfo

public void invalidateParentInfo()
Description copied from interface: FormComponent
Invalidates all container-relevant (cached) information for the hierarchy of this component's parents.
For optimization purposes.

Specified by:
invalidateParentInfo in interface FormComponent

wasTransferFocus

public boolean wasTransferFocus()
Description copied from interface: FormComponent
Returns whether this component lost the keyboard focus due to FormComponent.transferFocus().

Specified by:
wasTransferFocus in interface FormComponent
Returns:
true if focus lost due to transferFocus

wasTransferFocusBackward

public boolean wasTransferFocusBackward()
Description copied from interface: FormComponent
Returns whether this component lost the keyboard focus due to FormComponent.transferFocusBackward().

Specified by:
wasTransferFocusBackward in interface FormComponent
Returns:
true if focus lost due to transferFocusBackward

wasFocusGainedFromTransfer

public boolean wasFocusGainedFromTransfer()
Description copied from interface: FormComponent
Returns whether the keyboard focus was gained due to FormComponent.transferFocus() in the opposite component.

Specified by:
wasFocusGainedFromTransfer in interface FormComponent
Returns:
true if this component gained the focus from the logically previous component
See Also:
FormFocusTraversalPolicy

wasFocusGainedFromTransferBackward

public boolean wasFocusGainedFromTransferBackward()
Description copied from interface: FormComponent
Returns whether the keyboard focus was gained due to FormComponent.transferFocusBackward() in the opposite component.

Specified by:
wasFocusGainedFromTransferBackward in interface FormComponent
Returns:
true if this component gained the focus from the logically next component
See Also:
FormFocusTraversalPolicy

wasTransferFocusByEnter

public boolean wasTransferFocusByEnter()
Description copied from interface: FormComponent
Returns whether this component lost the keyboard focus due to KeyEvent.VK_ENTER.

Specified by:
wasTransferFocusByEnter in interface FormComponent
Returns:
true if pressing the Enter/Return key caused a focus lost

setCellEditorUsage

public void setCellEditorUsage(boolean flag)
Description copied from interface: FormComponent
Sets a hint that this component is used as a cell editor.
Some components behave differently in tables than in forms, for example.

Specified by:
setCellEditorUsage in interface FormComponent
Parameters:
flag - true if component is a cell editor, false if not.

isCellEditorUsage

public boolean isCellEditorUsage()
Description copied from interface: FormComponent
Returns whether this component is used as a cell editor.

Specified by:
isCellEditorUsage in interface FormComponent
Returns:
true true if component is a cell editor, false if not.

setFormTraversable

public void setFormTraversable(boolean formTraversable)
Description copied from interface: FormComponent
Sets whether this component is form traversable or not, i.e. gets the focus or is skipped.

Specified by:
setFormTraversable in interface FormComponent
Parameters:
formTraversable - true if traversable, false if not

isFormTraversable

public boolean isFormTraversable()
Description copied from interface: FormComponent
Returns whether this component is form traversable or not.

Specified by:
isFormTraversable in interface FormComponent
Returns:
the focus traversable flag


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