Side of Software
Wizard Library 1.6

sos.wizard
Class AbstractPageEditor

java.lang.Object
  |
  +--sos.wizard.AbstractPageEditor
All Implemented Interfaces:
PageEditor
Direct Known Subclasses:
OptionPageEditor, ProgressPageEditor

public abstract class AbstractPageEditor
extends java.lang.Object
implements PageEditor

A partial implementation of the PageEditor interface. This class implements cancelEditing as doing nothing and stopEditing as returning true. If these implementations are acceptable, subclasses need only implement getEditorComponent.

As a convenience, this class provides validatePage, which validates the page and displays a message box if the page is invalid. Subclasses wishing to make use of this behavior should invoke validatePage in stopEditing.

Since:
1.0

Constructor Summary
AbstractPageEditor()
           
 
Method Summary
 void cancelEditing()
          Cancels the editing.
 boolean stopEditing()
          Stops and validates the editing.
protected  boolean validatePage(Page page, java.awt.Component component)
          Validates the specified page and brings up an error message centered on component if the page is invalid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sos.wizard.PageEditor
getEditorComponent
 

Constructor Detail

AbstractPageEditor

public AbstractPageEditor()
Method Detail

cancelEditing

public void cancelEditing()
Description copied from interface: PageEditor
Cancels the editing.

Specified by:
cancelEditing in interface PageEditor
See Also:
PageEditor.stopEditing()

stopEditing

public boolean stopEditing()
Description copied from interface: PageEditor
Stops and validates the editing. Returns true if the editing is successfully stopped.

Specified by:
stopEditing in interface PageEditor
Returns:
true if the editing is successfully stopped
See Also:
PageEditor.cancelEditing()

validatePage

protected boolean validatePage(Page page,
                               java.awt.Component component)
Validates the specified page and brings up an error message centered on component if the page is invalid. This is a convenience method for subclasses wishing this behavior in stopEditing.

Parameters:
page - page to be validated
component - component to serve as the parent of the error message dialog
Returns:
true if this page is valid
See Also:
stopEditing()

Side of Software
Wizard Library 1.6

Copyright 2004-07 Side of Software (SOS). All rights reserved.