|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FormComponent
Interface all Tentackle form components must implement.
Tentackle beans derived from Swing components that the user interacts
with in order to edit some data are FormComponents.
FormComponents are aware of the binding between the data and the GUI
and provide a standardized way to update the view and the data, vice versa.
This simplifies the development and design of the GUI significantly.
| Method Summary | |
|---|---|
void |
addValueListener(ValueListener listener)
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. |
Object |
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. |
boolean |
hasFocus()
Returns whether this component has the keyboard focus. |
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. |
void |
removeValueListener(ValueListener listener)
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 cellEditorUsage)
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 changeable)
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 fireRunning)
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 object)
Sets a value in this component. The method is used to update the view if the data has changed. |
void |
setFormWrapWindow(FormWindow window)
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 honourChangeable)
Sets whether this component should honour the changeable-attribute or not. The default is true. |
void |
showHelp()
Displays online help for this component. Usually triggered by KeyEvent.VK_F1 or VK_HELP or a button. |
void |
transferFocus()
Transfers keyboard focus forward to the logically next component. |
void |
transferFocusBackward()
Transfers keyboard focus forward to the logically previous component. |
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 transferFocus()
in the opposite component. |
boolean |
wasFocusGainedFromTransferBackward()
Returns whether the keyboard focus was gained due to transferFocusBackward()
in the opposite component. |
boolean |
wasTransferFocus()
Returns whether this component lost the keyboard focus due to transferFocus(). |
boolean |
wasTransferFocusBackward()
Returns whether this component lost the keyboard focus due to transferFocusBackward(). |
boolean |
wasTransferFocusByEnter()
Returns whether this component lost the keyboard focus due to KeyEvent.VK_ENTER. |
| Method Detail |
|---|
void setFormValue(Object object)
object - is the object to setObject getFormValue()
void saveValue()
isValueChanged()boolean isValueChanged()
saveValue()void triggerValueChanged()
FormContainers this
component is a child of.
void addValueListener(ValueListener listener)
listener - the value listener to addvoid removeValueListener(ValueListener listener)
listener - the value listener to removevoid fireValueChanged()
valueChanged-handler.
void fireValueEntered()
valueEntered-handler.
void setChangeable(boolean changeable)
changeable - true the user can edit the data, false if show onlyboolean isChangeable()
void setHonourChangeable(boolean honourChangeable)
honourChangeable - true if honour the changeable attribute, false if notboolean isHonourChangeable()
void setFireRunning(boolean fireRunning)
fireRunning - true if some fire-method is runningboolean isFireRunning()
boolean wasTransferFocus()
transferFocus().
boolean wasTransferFocusBackward()
transferFocusBackward().
boolean wasTransferFocusByEnter()
KeyEvent.VK_ENTER.
boolean wasFocusGainedFromTransfer()
transferFocus()
in the opposite component.
FormFocusTraversalPolicyboolean wasFocusGainedFromTransferBackward()
transferFocusBackward()
in the opposite component.
FormFocusTraversalPolicyvoid requestFocusLater()
void setFormWrapWindow(FormWindow window)
FormWrapEvent when this
components loses the keyboard focus. When fired the reference
to the window is cleared.
window - the window (usually the parent window of this component).Window getParentWindow()
void invalidateParentInfo()
void setHelpURL(String helpURL)
helpURL - the help urlFormHelper.openHelpURL(Component)String getHelpURL()
void showHelp()
void setCellEditorUsage(boolean cellEditorUsage)
cellEditorUsage - true if component is a cell editor, false if not.boolean isCellEditorUsage()
void prepareFocusLost()
void setFormTraversable(boolean formTraversable)
formTraversable - true if traversable, false if notboolean isFormTraversable()
boolean hasFocus()
void transferFocus()
FormFocusTraversalPolicyvoid transferFocusBackward()
FormFocusTraversalPolicy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||