sk.uniba.euromath.editor.wizards
Class BaseWizardPage

java.lang.Object
  extended by sk.uniba.euromath.editor.wizards.BaseWizardPage
Direct Known Subclasses:
CreateAttributeListWizardPage, EntityListWizardPage, ExportClassChooserWizardPage, FileSelectorWizardPage, FinishWizardPage, GraphSelectorWizardPage, InsertListChooserWizardPage, NameListItemChooserWizardPage, NamespaceSelectorWizardPage, NewPrefixesQueryWizardPage

public abstract class BaseWizardPage
extends Object

Extends the WizardPage class and adds some functionality.

Author:
Martin Vysny

Field Summary
protected  String name
          This page's name.
 
Constructor Summary
protected BaseWizardPage(String pageName, String title, Image titleImage)
          Creates a new wizard page with the given name, title, and image.
 
Method Summary
 IWizardPageContext getContext()
          Returns the context instance.
protected abstract  Control handleCreateControl(Composite parent)
           Creates the top level control for this dialog page under the given parent composite.
protected abstract  void handleDispose()
          Disposes the resources allocated by this dialog page.
 boolean hasErrors()
          Determines by current validity messages if this page contains error or not.
protected  void setMessages(ValidityMessages messages)
          Updates messages on this page.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected final String name
This page's name.

Constructor Detail

BaseWizardPage

protected BaseWizardPage(String pageName,
                         String title,
                         Image titleImage)
Creates a new wizard page with the given name, title, and image.

Parameters:
pageName - the name of the page
title - the title for this wizard page, or null if none. It should be a command, something like 'Please configure the foo properties'.
titleImage - the image descriptor for the title of this wizard page, or null if none.
Method Detail

hasErrors

public final boolean hasErrors()
Determines by current validity messages if this page contains error or not. If page does not contain errors then it may be flipped to next page. A page can be always flipped to a previous page.

Returns:
true if the page is satisfied with its data.

setMessages

protected final void setMessages(ValidityMessages messages)
Updates messages on this page. The info part is ignored and always rewritten by the title.

Parameters:
messages - validity messages. If null then all messages are cleared.

getContext

public final IWizardPageContext getContext()
Returns the context instance.

Returns:
the context instance.

toString

public String toString()
Overrides:
toString in class Object

handleCreateControl

protected abstract Control handleCreateControl(Composite parent)

Creates the top level control for this dialog page under the given parent composite.

This method is called only once.

Parameters:
parent - the parent composite
Returns:
the control.

handleDispose

protected abstract void handleDispose()
Disposes the resources allocated by this dialog page. The control is disposed automatically when this method ends.



Copyright © 2003-2006 null. All Rights Reserved.