org.springframework.richclient.samples.showcase.util
Class AbstractReporterForm

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.samples.showcase.util.AbstractReporterForm
All Implemented Interfaces:
CommitListener, ControlFactory, Form, Reporter

public abstract class AbstractReporterForm
extends AbstractForm
implements Reporter

A Form with a JTextArea that can be used to show some useful messages. Can be used to show events to clarify and examine how user input is handled. Note that the actual TextArea should be inserted by the surrounding component/dialog. This to be able to reuse the textArea for various purposes.

Author:
Jan Hoskens

Nested Class Summary
protected  class AbstractReporterForm.LogPropertyChangeListener
           
static class AbstractReporterForm.StateSynchronizingToggleCommand
           
 
Field Summary
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Constructor Summary
AbstractReporterForm(FormModel formModel)
           
AbstractReporterForm(FormModel formModel, String id)
           
 
Method Summary
protected  String getCommitCommandFaceDescriptorId()
           
protected  String getEnableCommandFaceDescriptorId()
           
 AbstractReporterForm.StateSynchronizingToggleCommand getEnableFormModelCommand()
           
 StringBuilder getFieldsDetails(StringBuilder builder, FormModel formModel)
          Print all the values from the valueModels in the formModel.
 StringBuilder getFormModelDetails(StringBuilder builder, FormModel formModel)
           
 StringBuilder getFormObjectDetails(StringBuilder builder, FormModel formModel)
          Print the backing form object details.
 ToggleCommand getLogFormModelPropertyChangeCommand()
           
protected  String getLogFormModelPropertyChangeCommandFaceDescriptorId()
           
 JTextArea getMessageArea()
          Returns the textArea to append info.
protected  String getNewFormObjectCommandId()
           
 ActionCommand getPrintFieldsCommand()
           
protected  String getPrintFieldsCommandFaceDescriptorId()
           
 ActionCommand getPrintFormModelCommand()
           
protected  String getPrintFormModelCommandFaceDescriptorId()
           
 ActionCommand getPrintFormObjectCommand()
           
protected  String getPrintFormObjectCommandFaceDescriptorId()
           
protected  String getReadOnlyCommandFaceDescriptorId()
           
 AbstractReporterForm.StateSynchronizingToggleCommand getReadOnlyFormModelCommand()
           
 AbstractCommand[] getReporterCommands()
           
protected  String getRevertCommandFaceDescriptorId()
           
protected  String getValidatingCommandFaceDescriptorId()
           
 ToggleCommand getValidatingFormModelCommand()
           
 void registerFormModelPropertyChangeListener()
           
 void setMessageArea(JTextArea messageArea)
          Set the textArea to write messages to.
 void unregisterFormModelPropertyChangeListener()
           
 
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, 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
 

Constructor Detail

AbstractReporterForm

public AbstractReporterForm(FormModel formModel)

AbstractReporterForm

public AbstractReporterForm(FormModel formModel,
                            String id)
Method Detail

setMessageArea

public void setMessageArea(JTextArea messageArea)
Set the textArea to write messages to.

Specified by:
setMessageArea in interface Reporter

getMessageArea

public JTextArea getMessageArea()
Returns the textArea to append info.


getFormObjectDetails

public StringBuilder getFormObjectDetails(StringBuilder builder,
                                          FormModel formModel)
Print the backing form object details. Default behaviour is to call toString() on the formObject.


getFieldsDetails

public StringBuilder getFieldsDetails(StringBuilder builder,
                                      FormModel formModel)
Print all the values from the valueModels in the formModel. Default behaviour is to iterate over all fields and print their value.


getFormModelDetails

public StringBuilder getFormModelDetails(StringBuilder builder,
                                         FormModel formModel)

getPrintFormObjectCommand

public ActionCommand getPrintFormObjectCommand()

getPrintFieldsCommand

public ActionCommand getPrintFieldsCommand()

getPrintFormModelCommand

public ActionCommand getPrintFormModelCommand()

getReadOnlyFormModelCommand

public AbstractReporterForm.StateSynchronizingToggleCommand getReadOnlyFormModelCommand()

getEnableFormModelCommand

public AbstractReporterForm.StateSynchronizingToggleCommand getEnableFormModelCommand()

getValidatingFormModelCommand

public ToggleCommand getValidatingFormModelCommand()

getLogFormModelPropertyChangeCommand

public ToggleCommand getLogFormModelPropertyChangeCommand()

getReporterCommands

public AbstractCommand[] getReporterCommands()
Specified by:
getReporterCommands in interface Reporter

registerFormModelPropertyChangeListener

public void registerFormModelPropertyChangeListener()

unregisterFormModelPropertyChangeListener

public void unregisterFormModelPropertyChangeListener()

getPrintFormObjectCommandFaceDescriptorId

protected String getPrintFormObjectCommandFaceDescriptorId()

getPrintFieldsCommandFaceDescriptorId

protected String getPrintFieldsCommandFaceDescriptorId()

getPrintFormModelCommandFaceDescriptorId

protected String getPrintFormModelCommandFaceDescriptorId()

getEnableCommandFaceDescriptorId

protected String getEnableCommandFaceDescriptorId()

getReadOnlyCommandFaceDescriptorId

protected String getReadOnlyCommandFaceDescriptorId()

getValidatingCommandFaceDescriptorId

protected String getValidatingCommandFaceDescriptorId()

getLogFormModelPropertyChangeCommandFaceDescriptorId

protected String getLogFormModelPropertyChangeCommandFaceDescriptorId()

getCommitCommandFaceDescriptorId

protected String getCommitCommandFaceDescriptorId()
Overrides:
getCommitCommandFaceDescriptorId in class AbstractForm

getRevertCommandFaceDescriptorId

protected String getRevertCommandFaceDescriptorId()
Overrides:
getRevertCommandFaceDescriptorId in class AbstractForm

getNewFormObjectCommandId

protected String getNewFormObjectCommandId()
Overrides:
getNewFormObjectCommandId in class AbstractForm


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