| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
jas.util.JASWizardPage
public abstract class JASWizardPage
Extend this class to create a page for the JASWizard.  Implement the
 interface HasNextPages if you want there to be pages following this
 page, and implement the Finishable interface if you want this to be
 the final page.  You may implement one or both, but implementing
 neither would be silly because then neither the "Next" nor "Finish"
 button will enable and your page will be a "dead end".  Implement
 HasHelpPage if you want your page to link to a help topic.  Override
 the methods getNextEnabled() and getFinishEnabled()
 to control how the "Next" and "Finish" buttons enable.
 
 This class is a KeyListener and has implemented the interface
 with non-final methods.  If you do not override these
 methods, doEnable() will be called when a key
 is released on components registered as KeyListeners.
 This implementation is designed for when the buttons
 enable when text is added to them.  For example, if you page had
 
 m_text = new JASTextField();
 text.addKeyListener(this);
 
 then the "Next" and "Finish" buttons would enable each time a key is released
 in the field text.  You might define getNextEnabled()
 as follows:
 
 protected boolean getNextEnabled()
 {
                final String s = m_text.getText();
                return s != null && s.length() > 0;
 }
 
JASWizard, 
HasNextPages, 
Finishable, 
HasHelpPage, 
Serialized Form| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel | 
|---|
JPanel.AccessibleJPanel | 
| Nested classes/interfaces inherited from class javax.swing.JComponent | 
|---|
JComponent.AccessibleJComponent | 
| Nested classes/interfaces inherited from class java.awt.Container | 
|---|
Container.AccessibleAWTContainer | 
| Nested classes/interfaces inherited from class java.awt.Component | 
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy | 
| Field Summary | 
|---|
| Fields inherited from class javax.swing.JComponent | 
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW | 
| Fields inherited from class java.awt.Component | 
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT | 
| Fields inherited from interface java.awt.image.ImageObserver | 
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH | 
| Constructor Summary | |
|---|---|
JASWizardPage(LayoutManager lm)
Supply a layout manager for the panel to use.  | 
|
| Method Summary | |
|---|---|
 void | 
beforeShowing()
This method is called just before the page is brought to the screen.  | 
protected  void | 
dispose()
Call to dispose the wizard (i.e., to have it close).  | 
 void | 
doBusy(Runnable run)
 | 
protected  void | 
doEnable()
Forces the wizard to call getNextEnabled() and getFinishEnabled() to enable the
 buttons on the wizard. | 
protected  boolean | 
getFinishEnabled()
Override to provide customized behaviour for enabling the "Finish" button.  | 
protected  boolean | 
getNextEnabled()
Override to provide customized behaviour for enabling the "Next" button.  | 
protected  void | 
handleError(String message,
            Throwable t)
 | 
 void | 
keyPressed(KeyEvent e)
Override this to provide your own behaviour for key events; does nothing by default.  | 
 void | 
keyReleased(KeyEvent e)
If you add this class as a KeyListener and don't override this method then the buttons will be enabled on every key event in the definition for this method.  | 
 void | 
keyTyped(KeyEvent e)
Override this to provide your own behaviour for key events; does nothing by default.  | 
 void | 
onCancel()
This method is called if the user has canceled the wizard.  | 
 String | 
toString()
This method is public as an implementation side effect; do not call.  | 
| Methods inherited from class javax.swing.JPanel | 
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public JASWizardPage(LayoutManager lm)
add(..) methods.  It is not a good idea to use AWT components
 here because those heavy-weight components do not mix well with swing's
 light-weight components.  You should use only
 swing components.
 The jas.util package has a number of
 utility
 components that may be useful for these pages.
lm - the layout manager to use for this page.LayoutManager| Method Detail | 
|---|
protected boolean getNextEnabled()
doEnable() to call this method, or add your
 page as a key listener to a component, and then doEnable() will
 be called each time a key is released in that component.
doEnable(), 
HasNextPagesprotected boolean getFinishEnabled()
doEnable() to call this method, or add your
 page as a key listener to a component, and then doEnable() will
 be called each time a key is released in that component.
doEnable(), 
Finishableprotected void doEnable()
getNextEnabled() and getFinishEnabled() to enable the
 buttons on the wizard.  This method is called by the keyReleased(KeyEvent) method
 if you add this class as a KeyListener to a text field.
getNextEnabled(), 
getFinishEnabled(), 
keyReleased(KeyEvent), 
KeyEvent, 
KeyListenerpublic String toString()
toString in class Componentprotected void dispose()
public void onCancel()
onCancel() methods are called starting from the bottom
 and working up each branch separately to the root.
public void keyPressed(KeyEvent e)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent e)
keyReleased in interface KeyListenerpublic void beforeShowing()
public void doBusy(Runnable run)
protected void handleError(String message,
                           Throwable t)
public void keyTyped(KeyEvent e)
keyTyped in interface KeyListener
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||