org.springframework.richclient.form
Class AbstractFocussableForm

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
                  extended by org.springframework.richclient.form.AbstractFocussableForm
All Implemented Interfaces:
CommitListener, Focussable, ControlFactory, Form, Widget
Direct Known Subclasses:
ContactForm, TabbedForm, TodoForm

public abstract class AbstractFocussableForm
extends AbstractWidgetForm
implements Focussable

Form implementation for the Focussable interface.

Author:
Jan Hoskens

Field Summary
static String UNSAVEDCHANGES_HASERRORS_WARNING_ID
           
static String UNSAVEDCHANGES_WARNING_ID
           
 
Fields inherited from class org.springframework.richclient.widget.AbstractWidgetForm
SAVE_CMD_ID, showing, UNDO_CMD_ID
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Fields inherited from interface org.springframework.richclient.widget.Widget
EMPTY_WIDGET
 
Constructor Summary
AbstractFocussableForm()
           
AbstractFocussableForm(FormModel pageFormModel)
           
AbstractFocussableForm(FormModel formModel, String formId)
           
AbstractFocussableForm(HierarchicalFormModel parentFormModel, String formId)
           
AbstractFocussableForm(HierarchicalFormModel parentFormModel, String formId, String childFormObjectPropertyPath)
           
AbstractFocussableForm(HierarchicalFormModel parentFormModel, String formId, ValueModel childFormObjectHolder)
           
AbstractFocussableForm(Object formObject)
           
AbstractFocussableForm(String formId)
           
 
Method Summary
 boolean canClose()
          Checks whether this component can be closed visually, for example when there are no unsaved changes.
 void grabFocus()
          Set the focus on a default component On implementation, remember to use EventQueue.invokeLater(Runnable).
protected  void handleEnabledChange(boolean enabled)
          Override to do nothing.
protected  void init()
          Hook called when constructing the Form.
 void setFocusControl(JComponent field)
          Registers the component that receives the focus when the form receives focus.
 
Methods inherited from class org.springframework.richclient.widget.AbstractWidgetForm
getCommands, getCommitCommandFaceDescriptorId, getComponent, getRevertCommandFaceDescriptorId, isShowing, onAboutToHide, onAboutToShow
 
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, hasErrors, 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

UNSAVEDCHANGES_WARNING_ID

public static final String UNSAVEDCHANGES_WARNING_ID
See Also:
Constant Field Values

UNSAVEDCHANGES_HASERRORS_WARNING_ID

public static final String UNSAVEDCHANGES_HASERRORS_WARNING_ID
See Also:
Constant Field Values
Constructor Detail

AbstractFocussableForm

public AbstractFocussableForm()

AbstractFocussableForm

public AbstractFocussableForm(FormModel formModel,
                              String formId)

AbstractFocussableForm

public AbstractFocussableForm(FormModel pageFormModel)

AbstractFocussableForm

public AbstractFocussableForm(HierarchicalFormModel parentFormModel,
                              String formId,
                              String childFormObjectPropertyPath)

AbstractFocussableForm

public AbstractFocussableForm(HierarchicalFormModel parentFormModel,
                              String formId,
                              ValueModel childFormObjectHolder)

AbstractFocussableForm

public AbstractFocussableForm(HierarchicalFormModel parentFormModel,
                              String formId)

AbstractFocussableForm

public AbstractFocussableForm(Object formObject)

AbstractFocussableForm

public AbstractFocussableForm(String formId)
Method Detail

handleEnabledChange

protected void handleEnabledChange(boolean enabled)
Override to do nothing. Superclass registers a default command, but we are using a different system to define default commands.

Overrides:
handleEnabledChange in class AbstractForm

setFocusControl

public void setFocusControl(JComponent field)
Registers the component that receives the focus when the form receives focus.

See Also:
grabFocus()

grabFocus

public void grabFocus()
Description copied from interface: Focussable
Set the focus on a default component On implementation, remember to use EventQueue.invokeLater(Runnable).

Specified by:
grabFocus in interface Focussable
See Also:
EventQueue.invokeLater(java.lang.Runnable)

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
Overrides:
canClose in class AbstractWidgetForm
Returns:
true if the widget can be closed without problems.

init

protected void init()
Description copied from class: AbstractForm
Hook called when constructing the Form.

Overrides:
init in class AbstractForm


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