org.springframework.richclient.dialog
Class CompositeDialogPage

java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.core.LabeledObjectSupport
          extended by org.springframework.richclient.dialog.AbstractDialogPage
              extended by org.springframework.richclient.dialog.CompositeDialogPage
All Implemented Interfaces:
PropertyChangePublisher, CommandLabelConfigurable, DescribedElement, DescriptionConfigurable, Guarded, TitleConfigurable, VisualizedElement, DialogPage, Messagable, ControlFactory, IconConfigurable, ImageConfigurable
Direct Known Subclasses:
TabbedDialogPage, TreeCompositeDialogPage

public abstract class CompositeDialogPage
extends AbstractDialogPage

An implementation of the DialogPage interface that collects a group of dialog pages together so that they can be used in place of a single DialogPage

It is expected that subclasses will provide various ways of displaying the active page and navigating to inactive child pages.

Services of a CompositeDialogPage include:

Author:
oliverh
See Also:
TabbedDialogPage

Nested Class Summary
protected  class CompositeDialogPage.ChildChangeHandler
           
 
Field Summary
 
Fields inherited from class org.springframework.richclient.core.LabeledObjectSupport
logger
 
Fields inherited from interface org.springframework.richclient.dialog.DialogPage
DESCRIPTION_PROPERTY, PAGE_COMPLETE_PROPERTY
 
Fields inherited from interface org.springframework.richclient.dialog.Messagable
MESSAGE_PROPERTY
 
Fields inherited from interface org.springframework.richclient.core.DescribedElement
CAPTION_PROPERTY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY
 
Constructor Summary
CompositeDialogPage(String pageId)
           
CompositeDialogPage(String pageId, boolean autoConfigure)
           
 
Method Summary
 DialogPage addForm(Form form)
          Adds a new page to the list of pages managed by this CompositeDialogPage.
 void addPage(DialogPage page)
          Adds a DialogPage to the list of pages managed by this CompositeDialogPage.
protected  void addPages()
          Subclasses should extend if extra pages need to be added before the composite creates its control.
 void addPages(DialogPage[] pages)
          Adds an array DialogPage to the list of pages managed by this CompositeDialogPage.
protected  DialogPage createDialogPage(Form form)
           
protected  void createPageControls()
           
protected  String decoratePageTitle(DialogPage page, String title)
          Decorates the page title of the given DialogPage.
 DialogPage getActivePage()
          Gets the active page of this CompositeDialogPage.
protected  String getDecoratedPageTitle(DialogPage page)
           
 Dimension getLargestPageSize()
          Get the size of the largest page added so far.
protected  List getPages()
           
protected  void onPageSelected(DialogPage page, boolean selected)
           
protected  void prepareDialogPage(DialogPage page)
          Prepare a dialog page - Add our property listeners and configure the control's look.
 void setActivePage(DialogPage activePage)
          Sets the active page of this CompositeDialogPage.
 void setAutoConfigureChildPages(boolean autoConfigure)
           
protected  void updateMessage()
           
protected  void updatePageComplete(DialogPage page)
           
protected  void updatePageEnabled(DialogPage page)
           
protected  void updatePageLabels(DialogPage page)
           
protected  void updatePageVisibility(DialogPage page)
           
 
Methods inherited from class org.springframework.richclient.dialog.AbstractDialogPage
createControl, getControl, getIcon, getId, getMessage, getParentWindowControl, getTitle, hasErrorMessage, hasInfoMessage, hasWarningMessage, isControlCreated, isEnabled, isPageComplete, isVisible, performHelp, setEnabled, setIcon, setId, setMessage, setPageComplete, setVisible
 
Methods inherited from class org.springframework.richclient.core.LabeledObjectSupport
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getAccelerator, getCaption, getDescription, getDisplayName, getImage, getLabel, getMnemonic, getMnemonicIndex, hasChanged, hasChanged, hasChanged, removePropertyChangeListener, removePropertyChangeListener, setCaption, setDescription, setImage, setLabelInfo, setTitle, toString
 
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, wait, wait, wait
 
Methods inherited from interface org.springframework.richclient.dialog.DialogPage
getDescription, getImage
 
Methods inherited from interface org.springframework.binding.value.PropertyChangePublisher
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

CompositeDialogPage

public CompositeDialogPage(String pageId)

CompositeDialogPage

public CompositeDialogPage(String pageId,
                           boolean autoConfigure)
Method Detail

setAutoConfigureChildPages

public void setAutoConfigureChildPages(boolean autoConfigure)

addPage

public void addPage(DialogPage page)
Adds a DialogPage to the list of pages managed by this CompositeDialogPage.

Parameters:
page - the page to add

addForm

public DialogPage addForm(Form form)
Adds a new page to the list of pages managed by this CompositeDialogPage. The page is created by wrapping the form page in a FormBackedDialogPage.

Parameters:
formPage - the form page to be insterted
Returns:
the DialogPage that wraps formPage

addPages

public void addPages(DialogPage[] pages)
Adds an array DialogPage to the list of pages managed by this CompositeDialogPage.

Parameters:
pages - the pages to add

addPages

protected void addPages()
Subclasses should extend if extra pages need to be added before the composite creates its control. New pages should be added by calling addPage.


getPages

protected List getPages()

setActivePage

public void setActivePage(DialogPage activePage)
Sets the active page of this CompositeDialogPage.

Parameters:
activePage - the page to be made active. Must be one of the child pages.

getActivePage

public DialogPage getActivePage()
Gets the active page of this CompositeDialogPage.

Returns:
the active page; or null if no page is active.

createDialogPage

protected DialogPage createDialogPage(Form form)

createPageControls

protected void createPageControls()

prepareDialogPage

protected void prepareDialogPage(DialogPage page)
Prepare a dialog page - Add our property listeners and configure the control's look.

Parameters:
page - to process

getLargestPageSize

public Dimension getLargestPageSize()
Get the size of the largest page added so far.

Returns:
Dimension of largest page

updatePageComplete

protected void updatePageComplete(DialogPage page)

updatePageEnabled

protected void updatePageEnabled(DialogPage page)

updatePageLabels

protected void updatePageLabels(DialogPage page)

updateMessage

protected void updateMessage()

onPageSelected

protected void onPageSelected(DialogPage page,
                              boolean selected)

updatePageVisibility

protected void updatePageVisibility(DialogPage page)

getDecoratedPageTitle

protected final String getDecoratedPageTitle(DialogPage page)

decoratePageTitle

protected String decoratePageTitle(DialogPage page,
                                   String title)
Decorates the page title of the given DialogPage.

Can be overridden to provide additional decorations.

The default implementation returns a html with an indication whether the page is complete or incomplete

Parameters:
page - the page
title - the title
Returns:
the decorated page title


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