Side of Software
Wizard Library 1.6

sos.wizard
Class AbstractPage

java.lang.Object
  |
  +--sos.wizard.AbstractModel
        |
        +--sos.wizard.AbstractPage
All Implemented Interfaces:
Model, Page, java.io.Serializable
Direct Known Subclasses:
OptionPage, ProgressPage

public abstract class AbstractPage
extends AbstractModel
implements Page, java.io.Serializable

A partial implementation of the Page interface. It handles the mapping of keys to values and the registration of property change listeners. Subclasses need only implement isComplete. This class assumes that it is always valid. Subclasses with different validation requirements should also implement validate.

Since:
1.0
See Also:
Page

Field Summary
 
Fields inherited from interface sos.wizard.Page
COMPLETE_PROPERTY, NAME_PROPERTY
 
Constructor Summary
AbstractPage()
          Creates a new instance of AbstractPage with no name.
AbstractPage(java.lang.Object name)
          Creates a new instance of AbstractPage with the specified name.
 
Method Summary
 java.lang.Object getValue(java.lang.String key)
          Returns the value associated with the specified key, or null if this page does not contain the key.
 java.lang.Object putValue(java.lang.String key, java.lang.Object value)
          Associates value with key.
 void validate()
          Checks if this page has acceptable values.
 
Methods inherited from class sos.wizard.AbstractModel
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sos.wizard.Page
isComplete
 
Methods inherited from interface sos.wizard.Model
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

AbstractPage

public AbstractPage()
Creates a new instance of AbstractPage with no name.


AbstractPage

public AbstractPage(java.lang.Object name)
Creates a new instance of AbstractPage with the specified name.

Parameters:
name - this page's name
Method Detail

getValue

public java.lang.Object getValue(java.lang.String key)
Description copied from interface: Page
Returns the value associated with the specified key, or null if this page does not contain the key.

Specified by:
getValue in interface Page
Parameters:
key - a string that identifies the stored object
Returns:
the object associated with key, or null if no such object exists
See Also:
Page.putValue(java.lang.String, java.lang.Object)

putValue

public java.lang.Object putValue(java.lang.String key,
                                 java.lang.Object value)
Description copied from interface: Page
Associates value with key.

Specified by:
putValue in interface Page
Parameters:
key - a string that identifies the object
value - the object to be associated with key
Returns:
the object previously associated with key, or null if no such object existed
See Also:
Page.getValue(java.lang.String)

validate

public void validate()
              throws InvalidPageException
Description copied from interface: Page
Checks if this page has acceptable values. If it does not, it throws an InvalidPageException with an appropriate localized message.

Specified by:
validate in interface Page
Throws:
InvalidPageException - if this page is not valid

Side of Software
Wizard Library 1.6

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