|
||||||||||
| 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
public class FormComponentPanel
A FormPanel with an embedded FormComponent.
| 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 | |
|---|---|
FormComponentPanel()
Creates a FormComponentPanel for a StringFormField. |
|
FormComponentPanel(FormComponent comp)
Creates a FormComponentPanel for a given FormComponent. |
|
| Method Summary | |
|---|---|
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. |
FormComponent |
getFormComponent()
Gets the embedded form component. |
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. |
boolean |
hasFocus()
Returns true if this Component is the
focus owner. |
void |
invalidateParentInfo()
Invalidates all container-relevant (cached) information for the hierarchy of this container'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 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 |
setFormComponent(FormComponent comp)
Sets the embedded form field component. |
void |
setFormTraversable(boolean formTraversable)
Sets whether this component is form traversable or not, i.e. |
void |
setFormValue(Object obj)
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 container, a browser will be launched to show that url if there is no help url for the component the help was requested for. |
void |
setHonourChangeable(boolean flag)
Sets whether this component should honour the changeable-attribute or not. The default is true. |
void |
showHelp()
Displays online help for this container. |
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 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 |
| Methods inherited from interface org.tentackle.ui.FormComponent |
|---|
transferFocus, transferFocusBackward |
| Constructor Detail |
|---|
public FormComponentPanel(FormComponent comp)
FormComponentPanel for a given FormComponent.
comp - the componentpublic FormComponentPanel()
FormComponentPanel for a StringFormField.
| Method Detail |
|---|
public FormComponent getFormComponent()
public void setFormComponent(FormComponent comp)
comp - the component.public void setFireRunning(boolean running)
FormComponent
setFireRunning in interface FormComponentrunning - true if some fire-method is runningpublic boolean isFireRunning()
FormComponent
isFireRunning in interface FormComponentpublic void addValueListener(ValueListener l)
FormComponent
addValueListener in interface FormComponentl - the value listener to addpublic void removeValueListener(ValueListener l)
FormComponent
removeValueListener in interface FormComponentl - the value listener to removepublic void fireValueChanged()
FormComponentvalueChanged-handler.
fireValueChanged in interface FormComponentpublic void fireValueEntered()
FormComponentvalueEntered-handler.
fireValueEntered in interface FormComponentpublic void setFormValue(Object obj)
FormComponent
setFormValue in interface FormComponentobj - is the object to setpublic Object getFormValue()
FormComponent
getFormValue in interface FormComponentpublic void setChangeable(boolean flag)
FormComponent
setChangeable in interface FormComponentflag - true the user can edit the data, false if show onlypublic boolean isChangeable()
FormComponent
isChangeable in interface FormComponentpublic void setHonourChangeable(boolean flag)
FormComponent
setHonourChangeable in interface FormComponentflag - true if honour the changeable attribute, false if notpublic boolean isHonourChangeable()
FormComponent
isHonourChangeable in interface FormComponentpublic void requestFocusLater()
FormComponent
requestFocusLater in interface FormComponentpublic void setFormWrapWindow(FormWindow parent)
FormComponentFormWrapEvent when this
components loses the keyboard focus. When fired the reference
to the window is cleared.
setFormWrapWindow in interface FormComponentparent - the window (usually the parent window of this component).public boolean isValueChanged()
FormComponent
isValueChanged in interface FormComponentFormComponent.saveValue()public void saveValue()
FormComponent
saveValue in interface FormComponentFormComponent.isValueChanged()public void triggerValueChanged()
FormComponentFormContainers this
component is a child of.
triggerValueChanged in interface FormComponentpublic String getHelpURL()
FormContainer
getHelpURL in interface FormComponentgetHelpURL in interface FormContainergetHelpURL in class FormPanelpublic void setHelpURL(String helpURL)
FormContainer
setHelpURL in interface FormComponentsetHelpURL in interface FormContainersetHelpURL in class FormPanelhelpURL - the help urlFormHelper.openHelpURL(Component)public void showHelp()
FormContainer
showHelp in interface FormComponentshowHelp in interface FormContainershowHelp in class FormPanelpublic boolean hasFocus()
java.awt.Componenttrue if this Component is the
focus owner. This method is obsolete, and has been replaced by
isFocusOwner().
hasFocus in interface FormComponenthasFocus in class Componenttrue if this Component is the
focus owner; false otherwisepublic boolean wasTransferFocus()
FormComponentFormComponent.transferFocus().
wasTransferFocus in interface FormComponentpublic boolean wasTransferFocusBackward()
FormComponentFormComponent.transferFocusBackward().
wasTransferFocusBackward in interface FormComponentpublic boolean wasFocusGainedFromTransfer()
FormComponentFormComponent.transferFocus()
in the opposite component.
wasFocusGainedFromTransfer in interface FormComponentFormFocusTraversalPolicypublic boolean wasFocusGainedFromTransferBackward()
FormComponentFormComponent.transferFocusBackward()
in the opposite component.
wasFocusGainedFromTransferBackward in interface FormComponentFormFocusTraversalPolicypublic boolean wasTransferFocusByEnter()
FormComponentKeyEvent.VK_ENTER.
wasTransferFocusByEnter in interface FormComponentpublic Window getParentWindow()
FormContainer
getParentWindow in interface FormComponentgetParentWindow in interface FormContainergetParentWindow in class FormPanelpublic void invalidateParentInfo()
FormContainer
invalidateParentInfo in interface FormComponentinvalidateParentInfo in interface FormContainerinvalidateParentInfo in class FormPanelpublic void setCellEditorUsage(boolean flag)
FormComponent
setCellEditorUsage in interface FormComponentflag - true if component is a cell editor, false if not.public boolean isCellEditorUsage()
FormComponent
isCellEditorUsage in interface FormComponentpublic void prepareFocusLost()
FormComponent
prepareFocusLost in interface FormComponentpublic void setFormTraversable(boolean formTraversable)
FormComponent
setFormTraversable in interface FormComponentformTraversable - true if traversable, false if notpublic boolean isFormTraversable()
FormComponent
isFormTraversable in interface FormComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||