Java Doc for AbstractWizardStep.java in  » Swing-Library » wizard-framework » org » pietschy » wizard » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » wizard framework » org.pietschy.wizard 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.pietschy.wizard.AbstractWizardStep

All known Subclasses:   org.pietschy.wizard.pane.WizardPaneStep,
AbstractWizardStep
abstract public class AbstractWizardStep implements WizardStep(Code)
This is the base class for all non panel related wizard steps. Subclasses must implement the abstract methods AbstractWizardStep.init , AbstractWizardStep.prepare , AbstractWizardStep.applyState and AbstractWizardStep.getPreferredSize . In addition an appropriate UI must be installed by calling AbstractWizardStep.setView .

The Wizard listens to property change events from the step and will update accordingly when ever AbstractWizardStep.setView , AbstractWizardStep.setComplete or AbstractWizardStep.setBusy is called.

An example is shown below.

 public class MyWizardStep
 extends WizardStep
 {
 private MyModel model;
 private JPanel mainView;
 private JCheckBox agreeCheckbox;
 private JTextArea license;
 public MyWizardStep()
 {
 super("My First Step", "A summary of the first step");
 // build and layout the components..
 mainView = new JPanel();
 agreeCheckbox = new JCheckBox("Agree");
 license = new JTextArea();
 mainView.setLayout(...);
 mainView.add(agreeCheckbox);
 ...
 // listen to changes in the state..
 agreeCheckbox.addItemListener(new ItemListener()
 {
 public void itemSelected(ItemEvent e)
 {
 // only continue if they agree
 MyWizardStep.this.setComplete(agreeCheckbox.isSelected());
 }
 });
 }
 public void init(WizardModel model)
 {
 this.model = (MyModel) model;
 }
 public void prepare()
 {
 // load our view...
 setView(mainView);
 }
 public void applyState()
 throws InvalidStateException
 {
 // display a progress bar of some kind..
 setView(myProgressView);
 setBusy(true);
 try
 {
 // do some work on another thread.. see Foxtrot
 ...
 }
 finally
 {
 setBusy(false);
 }
 // if error then throw an exception
 if (!ok)
 {
 // restore our original view..
 setView(mainView)
 throw new InvalidStateException("That didn't work!");
 }
 // this isn't really meaningful as we refuse to continue
 // while the checkbox is un-checked.
 model.setAcceptsLicense(agreeCheckbox.isSelected());
 }
 public void getPreferredSize()
 {
 // use the size of our main view...
 return mainView.getPreferredSize();
 }
 }
 



Constructor Summary
public  AbstractWizardStep(String name, String summary)
     Creates a new step with the specified name and summary.
public  AbstractWizardStep(String name, String summary, Icon icon)
     Creates a new step with the specified name and summary.

Method Summary
public  voidabortBusy()
     Called by the wizard if the user presses cancel while the step is in a AbstractWizardStep.isBusy busy state.
public  voidaddPropertyChangeListener(PropertyChangeListener listener)
    
public  voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener)
    
public  IcongetIcon()
     Gets the javax.swing.Icon that represents this step.
public  StringgetName()
     Gets the name of this step.
public  StringgetSummary()
     Gets the summary of this step.
public  ComponentgetView()
     Returns the current view this step is displaying.
abstract public  voidinit(WizardModel model)
     Called to initialize the step.
public  booleanisBusy()
     Checks if the current task is busy.
public  booleanisComplete()
     Checks if this step is compete.
public  voidremovePropertyChangeListener(PropertyChangeListener listener)
    
public  voidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener)
    
public  voidsetBusy(boolean busy)
     Sets the busy state of this wizard step.
public  voidsetComplete(boolean complete)
     Marks this step as compete.
public  voidsetIcon(Icon icon)
     Sets the javax.swing.Icon that represents this step.
public  voidsetName(String name)
     Sets the name of this step.
public  voidsetSummary(String summary)
     Sets the summary of this step.
protected  voidsetView(Component component)
     Sets the current view this step is displaying.


Constructor Detail
AbstractWizardStep
public AbstractWizardStep(String name, String summary)(Code)
Creates a new step with the specified name and summary. The name and summary are displayed in the wizard title block while this step is active.
Parameters:
  name - the name of this step.
Parameters:
  summary - a brief summary of this step or some usage guidelines.



AbstractWizardStep
public AbstractWizardStep(String name, String summary, Icon icon)(Code)
Creates a new step with the specified name and summary. The name and summary are displayed in the wizard title block while this step is active.
Parameters:
  name - the name of this step.
Parameters:
  summary - a brief summary of this step or some usage guidelines.




Method Detail
abortBusy
public void abortBusy()(Code)
Called by the wizard if the user presses cancel while the step is in a AbstractWizardStep.isBusy busy state. Steps that are never busy need not override this method.



addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)(Code)



addPropertyChangeListener
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)



getIcon
public Icon getIcon()(Code)
Gets the javax.swing.Icon that represents this step. the javax.swing.Icon that represents this step, or null if the stepdoesn't have an icon.



getName
public String getName()(Code)
Gets the name of this step. This will be displayed in the title of the wizard while this step is active. the name of this step.



getSummary
public String getSummary()(Code)
Gets the summary of this step. This will be displayed in the title of the wizard while this step is active. The summary is typically an overview of the step or some usage guidelines for the user. the summary of this step.



getView
public Component getView()(Code)
Returns the current view this step is displaying. This component will be displayed in the main section of the wizard with this step is active. This may changed at any time by calling AbstractWizardStep.setView and the wizard will update accordingly. the current view of the step.
See Also:   AbstractWizardStep.setView



init
abstract public void init(WizardModel model)(Code)
Called to initialize the step. This method will be called when the wizard is first initialising.
Parameters:
  model - the model to which the step belongs.



isBusy
public boolean isBusy()(Code)
Checks if the current task is busy. This usually indicates that the step is performing a time consuming task on a background thread. true if step is busy performing a background operation, falseotherwise.



isComplete
public boolean isComplete()(Code)
Checks if this step is compete. This method should return true if the wizard can proceed to the next step. This property is bound and changes can be made at anytime by calling AbstractWizardStep.setComplete(boolean) . true if the wizard can proceed from this step, false otherwise.
See Also:   AbstractWizardStep.setComplete



removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)(Code)



removePropertyChangeListener
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)



setBusy
public void setBusy(boolean busy)(Code)
Sets the busy state of this wizard step. This should usually be set when a time consuming task is being performed on a background thread. The Wizard responds by disabling the various buttons appropriately.

Wizard steps that go into a busy state must also implement AbstractWizardStep.abortBusy to cancel any inprogress operation.
Parameters:
  busy - true to mark the step as busy and disable further user action, falseto return the wizard to its normal state.




setComplete
public void setComplete(boolean complete)(Code)
Marks this step as compete. The wizard will not be able to proceed from this step until this property is configured to true.
Parameters:
  complete - true to allow the wizard to proceed, false otherwise.
See Also:   AbstractWizardStep.isComplete



setIcon
public void setIcon(Icon icon)(Code)
Sets the javax.swing.Icon that represents this step.
Parameters:
  icon - the javax.swing.Icon that represents this step, or null if the stepdoesn't have an icon.



setName
public void setName(String name)(Code)
Sets the name of this step. This will be displayed in the title of the wizard while this step is active.
Parameters:
  name - the name of this step.



setSummary
public void setSummary(String summary)(Code)
Sets the summary of this step. This will be displayed in the title of the wizard while this step is active. The summary is typically an overview of the step or some usage guidelines for the user.
Parameters:
  summary - the summary of this step.



setView
protected void setView(Component component)(Code)
Sets the current view this step is displaying. This component will be displayed in the main section of the wizard with this step is active. This method may changed at any time and the wizard will update accordingly.
Parameters:
  component - the current view of the step.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.