org.springframework.richclient.widget
Class AbstractWidgetForm

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.factory.AbstractControlFactory
          extended by org.springframework.richclient.form.AbstractForm
              extended by org.springframework.richclient.widget.AbstractWidgetForm
All Implemented Interfaces:
CommitListener, ControlFactory, Form, Widget
Direct Known Subclasses:
AbstractFocussableForm, AbstractTitledWidgetForm

public abstract class AbstractWidgetForm
extends AbstractForm
implements Widget

Provides an easy way to create widgets based on an AbstractForm.


Field Summary
static String SAVE_CMD_ID
          Id for the save command.
protected  boolean showing
           
static String UNDO_CMD_ID
          Id for the undo command.
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Fields inherited from interface org.springframework.richclient.widget.Widget
EMPTY_WIDGET
 
Constructor Summary
protected AbstractWidgetForm()
           
protected AbstractWidgetForm(FormModel pageFormModel)
           
protected AbstractWidgetForm(FormModel formModel, String formId)
           
protected AbstractWidgetForm(HierarchicalFormModel parentFormModel, String formId, String childFormObjectPropertyPath)
           
protected AbstractWidgetForm(HierarchicalFormModel parentFormModel, String formId, ValueModel childFormObjectHolder)
           
protected AbstractWidgetForm(Object formObject)
           
protected AbstractWidgetForm(String formId)
           
 
Method Summary
 boolean canClose()
          Checks whether this component can be closed visually, for example when there are no unsaved changes.
 List<? extends AbstractCommand> getCommands()
          Returns a list of commands for this widget.
protected  String getCommitCommandFaceDescriptorId()
           
 JComponent getComponent()
           
protected  String getRevertCommandFaceDescriptorId()
           
 boolean isShowing()
          Encompasses the status of the widget between onAboutToShow() and onAboutToHide().
 void onAboutToHide()
          Hook method called before moving the component to the background (=hiding)
 void onAboutToShow()
          Hook method called before showing the component on screen.
 
Methods inherited from class org.springframework.richclient.form.AbstractForm
addChildForm, addFormObjectChangeListener, addFormValueChangeListener, addGuarded, addGuarded, addValidationListener, addValidationResultsReporter, attachFormErrorGuard, attachFormGuard, commit, constructSecurityControllerId, createCommitButton, createControl, createFormControl, createNewFormObjectButton, createNewObject, detachFormGuard, getBindingFactory, getChildForm, getCommitCommand, getCommitSecurityControllerId, getDefaultButton, getEditableFormObject, getEditingFormObjectIndex, getFormModel, getFormObject, getId, getNewFormObjectCommand, getNewFormObjectCommandId, getNewFormObjectSecurityControllerId, getParent, getRevertCommand, getValidationResultsReporters, getValue, getValueModel, handleEnabledChange, hasErrors, init, isDirty, isEditingNewFormObject, isEnabled, newSingleLineResultsReporter, postCommit, preCommit, removeChildForm, removeFormObjectChangeListener, removeFormValueChangeListener, removeGuarded, removeValidationListener, removeValidationResultsReporter, reset, revert, setClearFormOnCommit, setDefaultButton, setEditableFormObjects, setEditingFormObjectIndexHolder, setEditingFormObjectIndexSilently, setEditingNewFormObject, setEnabled, setFormModel, setFormModelDefaultEnabledState, setFormObject, setId
 
Methods inherited from class org.springframework.richclient.factory.AbstractControlFactory
createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton
 
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.richclient.factory.ControlFactory
getControl
 

Field Detail

UNDO_CMD_ID

public static final String UNDO_CMD_ID
Id for the undo command.

See Also:
Constant Field Values

SAVE_CMD_ID

public static final String SAVE_CMD_ID
Id for the save command.

See Also:
Constant Field Values

showing

protected boolean showing
Constructor Detail

AbstractWidgetForm

protected AbstractWidgetForm()

AbstractWidgetForm

protected AbstractWidgetForm(String formId)

AbstractWidgetForm

protected AbstractWidgetForm(Object formObject)

AbstractWidgetForm

protected AbstractWidgetForm(FormModel pageFormModel)

AbstractWidgetForm

protected AbstractWidgetForm(FormModel formModel,
                             String formId)

AbstractWidgetForm

protected AbstractWidgetForm(HierarchicalFormModel parentFormModel,
                             String formId,
                             String childFormObjectPropertyPath)

AbstractWidgetForm

protected AbstractWidgetForm(HierarchicalFormModel parentFormModel,
                             String formId,
                             ValueModel childFormObjectHolder)
Method Detail

canClose

public boolean canClose()
Description copied from interface: Widget
Checks whether this component can be closed visually, for example when there are no unsaved changes.

Specified by:
canClose in interface Widget
Returns:
true if the widget can be closed without problems.

getCommands

public List<? extends AbstractCommand> getCommands()
Description copied from interface: Widget
Returns a list of commands for this widget.

Specified by:
getCommands in interface Widget

getComponent

public JComponent getComponent()
Specified by:
getComponent in interface Widget
Returns:
A not null graphical component built using the parameters held in the widget instance.

onAboutToHide

public void onAboutToHide()
Description copied from interface: Widget
Hook method called before moving the component to the background (=hiding)

Specified by:
onAboutToHide in interface Widget

onAboutToShow

public void onAboutToShow()
Description copied from interface: Widget
Hook method called before showing the component on screen.

Specified by:
onAboutToShow in interface Widget

isShowing

public boolean isShowing()
Description copied from interface: Widget
Encompasses the status of the widget between onAboutToShow() and onAboutToHide(). A component does not know when it's active, even if there is an isShowing() method in it's API (due to tab panels or scroll panes).

Specified by:
isShowing in interface Widget
Returns:
true if the widget is shown in the foreground.

getCommitCommandFaceDescriptorId

protected String getCommitCommandFaceDescriptorId()
Overrides:
getCommitCommandFaceDescriptorId in class AbstractForm

getRevertCommandFaceDescriptorId

protected String getRevertCommandFaceDescriptorId()
Overrides:
getRevertCommandFaceDescriptorId in class AbstractForm


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.