org.springframework.richclient.dialog
Class InputApplicationDialog

java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.dialog.ApplicationDialog
          extended by org.springframework.richclient.dialog.InputApplicationDialog
All Implemented Interfaces:
PropertyChangePublisher, Guarded, TitleConfigurable, Messagable
Direct Known Subclasses:
BasicInputApplicationDialog

public class InputApplicationDialog
extends ApplicationDialog
implements Messagable

Simple input application dialog consisting of a label and a text field for accepting input.

Author:
Keith Donald

Field Summary
 
Fields inherited from class org.springframework.richclient.dialog.ApplicationDialog
DEFAULT_CANCEL_COMMAND_ID, DEFAULT_FINISH_COMMAND_ID, DEFAULT_FINISH_SUCCESS_MESSAGE_KEY, DEFAULT_FINISH_SUCCESS_TITLE_KEY, logger, SUCCESS_FINISH_MESSAGE_KEY, SUCCESS_FINISH_TITLE_KEY
 
Fields inherited from interface org.springframework.richclient.dialog.Messagable
MESSAGE_PROPERTY
 
Constructor Summary
InputApplicationDialog()
           
InputApplicationDialog(Object bean, String propertyName)
           
InputApplicationDialog(Object bean, String propertyName, boolean bufferChanges)
           
InputApplicationDialog(String title, Window parent)
           
InputApplicationDialog(String title, Window parent, CloseAction closeAction)
           
InputApplicationDialog(ValidatingFormModel formModel, String propertyName)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Register a listener to all properties of this publisher.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Register a listener to a specific property.
protected  JComponent createDialogContentPane()
          Return the GUI which allows the user to manipulate the business objects related to this dialog.
protected  JComponent createInputLabel()
           
protected  MessagePane createMessagePane()
           
 ValidatingFormModel getFormModel()
           
 JComponent getInputField()
           
protected  boolean onFinish()
          Request invocation of the action taken when the user hits the OK (finish) button.
protected  void onFinish(Object inputValue)
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove the listener from all properties of this publisher.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Remove the listener from a specific property.
 void setFinishAction(Closure procedure)
           
 void setInputConstraint(Constraint constraint)
           
 void setInputField(JComponent field)
           
 void setInputLabelMessage(String inputLabel)
           
 void setMessage(Message message)
          Set the message.
 
Methods inherited from class org.springframework.richclient.dialog.ApplicationDialog
addActionKeyBinding, addActionKeyBinding, addDialogComponents, attachListeners, componentsChanged, createButtonBar, createDialog, dispose, disposeDialogContentPane, getActionMap, getCallingCommand, getCancelCommand, getCancelCommandId, getCommandGroupMembers, getDialog, getDialogContentPane, getDisplayFinishSuccessMessage, getFinishCommand, getFinishCommandId, getFinishSecurityControllerId, getFinishSuccessMessage, getFinishSuccessMessageArguments, getFinishSuccessTitle, getFinishSuccessTitleArguments, getInputMap, getLocation, getLocationRelativeTo, getParentComponent, getParentWindow, getPreferredSize, getTitle, getWindowForComponent, hide, init, isControlCreated, isEnabled, isShowing, onAboutToShow, onCancel, onInitialized, onWindowActivated, onWindowClosing, onWindowGainedFocus, onWindowLostFocus, registerCancelCommandAsDefault, registerDefaultCommand, registerDefaultCommand, setCallingCommand, setCloseAction, setDefaultEnabled, setDisplayFinishSuccessMessage, setEnabled, setFinishEnabled, setLocation, setLocationRelativeTo, setModal, setParentComponent, setPreferredSize, setResizable, setTitle, showDialog, showFinishSuccessMessageDialog
 
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
 

Constructor Detail

InputApplicationDialog

public InputApplicationDialog(Object bean,
                              String propertyName)

InputApplicationDialog

public InputApplicationDialog(Object bean,
                              String propertyName,
                              boolean bufferChanges)

InputApplicationDialog

public InputApplicationDialog(ValidatingFormModel formModel,
                              String propertyName)

InputApplicationDialog

public InputApplicationDialog()

InputApplicationDialog

public InputApplicationDialog(String title,
                              Window parent)

InputApplicationDialog

public InputApplicationDialog(String title,
                              Window parent,
                              CloseAction closeAction)
Method Detail

setInputField

public void setInputField(JComponent field)

setInputLabelMessage

public void setInputLabelMessage(String inputLabel)

setInputConstraint

public void setInputConstraint(Constraint constraint)

setFinishAction

public void setFinishAction(Closure procedure)

createMessagePane

protected MessagePane createMessagePane()

createDialogContentPane

protected JComponent createDialogContentPane()
Description copied from class: ApplicationDialog
Return the GUI which allows the user to manipulate the business objects related to this dialog. This GUI will be placed above the OK and Cancel buttons, in a standard manner.

Any components/objects created at this point need to be disposed in ApplicationDialog.disposeDialogContentPane().

Specified by:
createDialogContentPane in class ApplicationDialog
See Also:
ApplicationDialog.disposeDialogContentPane()

createInputLabel

protected JComponent createInputLabel()

onFinish

protected boolean onFinish()
Description copied from class: ApplicationDialog
Request invocation of the action taken when the user hits the OK (finish) button.

Specified by:
onFinish in class ApplicationDialog
Returns:
true if action completed successfully; false otherwise.

onFinish

protected void onFinish(Object inputValue)

getFormModel

public ValidatingFormModel getFormModel()

getInputField

public JComponent getInputField()
Returns:
Returns the inputField.

setMessage

public void setMessage(Message message)
Description copied from interface: Messagable
Set the message.

Specified by:
setMessage in interface Messagable

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: PropertyChangePublisher
Register a listener to all properties of this publisher.

Specified by:
addPropertyChangeListener in interface PropertyChangePublisher
Parameters:
listener - the PropertyChangeListener to register.

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Description copied from interface: PropertyChangePublisher
Register a listener to a specific property.

Specified by:
addPropertyChangeListener in interface PropertyChangePublisher
Parameters:
propertyName - the property to monitor.
listener - the PropertyChangeListener to register.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: PropertyChangePublisher
Remove the listener from all properties of this publisher.

Specified by:
removePropertyChangeListener in interface PropertyChangePublisher
Parameters:
listener - the PropertyChangeListener to remove.

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Description copied from interface: PropertyChangePublisher
Remove the listener from a specific property.

Specified by:
removePropertyChangeListener in interface PropertyChangePublisher
Parameters:
propertyName - the property that was being monitored.
listener - the PropertyChangeListener to remove.


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