Source Code Cross Referenced for WizardModel.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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Wizard Framework
003:         * Copyright 2004 - 2005 Andrew Pietsch
004:         *
005:         * This library is free software; you can redistribute it and/or
006:         * modify it under the terms of the GNU Lesser General Public
007:         * License as published by the Free Software Foundation; either
008:         * version 2.1 of the License, or (at your option) any later version.
009:         *
010:         * This library is distributed in the hope that it will be useful,
011:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
012:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013:         * Lesser General Public License for more details.
014:         *
015:         * You should have received a copy of the GNU Lesser General Public
016:         * License along with this library; if not, write to the Free Software
017:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
018:         *
019:         * $Id: WizardModel.java,v 1.13 2007/09/22 01:34:11 pietschy Exp $
020:         */package org.pietschy.wizard;
021:
022:        import org.pietschy.wizard.models.StaticModel;
023:        import org.pietschy.wizard.models.MultiPathModel;
024:
025:        import javax.swing.*;
026:        import java.beans.PropertyChangeListener;
027:        import java.beans.PropertyChangeEvent;
028:        import java.util.Iterator;
029:
030:        /**
031:         * This interface defines the Model for wizards.  It provides various methods for determining
032:         * the steps of the wizard along with the current traversal state of the wizard.  The {@link Wizard}
033:         * monitors the model using a {@link PropertyChangeListener} so all changes to the model properties
034:         * must fire {@link PropertyChangeEvent}s.
035:         * <p>
036:         * Most users should subclass either {@link StaticModel} or {@link MultiPathModel}.  Implementors
037:         * of more specialized models should consider extending {@link AbstractWizardModel} as it provides
038:         * the basic methods and propery change management required by all models.
039:         */
040:        public interface WizardModel {
041:
042:            /**
043:             * Checks if the previous button should be enabled.
044:             * @return <tt>true</tt> if the previou button should be enabled, <tt>false</tt> otherwise.
045:             */
046:            public boolean isPreviousAvailable();
047:
048:            /**
049:             * Checks if the next button should be enabled.
050:             * @return <tt>true</tt> if the next button should be enabled, <tt>false</tt> otherwise.
051:             */
052:            public boolean isNextAvailable();
053:
054:            /**
055:             * Checks if the last button should be enabled.
056:             * @return <tt>true</tt> if the last button should be enabled, <tt>false</tt> otherwise.
057:             * @see #isLastVisible
058:             */
059:            public boolean isLastAvailable();
060:
061:            /**
062:             * Checks if the last button should be displayed.  This method should only return true if
063:             * the {@link #isLastAvailable} will return true at any point.  Returning false will prevent
064:             * the last button from appearing on the wizard at all.
065:             * @return <tt>true</tt> if the last button should be displayed, <tt>false</tt> otherwise.
066:             */
067:            boolean isLastVisible();
068:
069:            /**
070:             * Increments the model the the next step and fires the appropriate property change events.
071:             * This method must only be called if {@link #isNextAvailable} returns <tt>true</tt>.
072:             */
073:            public void nextStep();
074:
075:            /**
076:             * Takes the model back to the previsou step and fires the appropriate property change events.
077:             * This method must only be called if {@link #isPreviousAvailable} returns <tt>true</tt>.
078:             */
079:            public void previousStep();
080:
081:            /**
082:             * Takes the model to the last step in the wizard and fires the appropriate property change
083:             * events.  This method must only be called if
084:             * {@link #isLastAvailable} returns <tt>true</tt>.
085:             */
086:            public void lastStep();
087:
088:            /**
089:             * Takes the model back to the first step and fires the appropriate property change events.
090:             */
091:            public void reset();
092:
093:            /**
094:             * Gets the current active step the wizard should display.
095:             * @return the active step.
096:             */
097:            public WizardStep getActiveStep();
098:
099:            /**
100:             * Checks if the specified step is the last step in the wizard.
101:             * @param step the step to check
102:             * @return <tt>true</tt> if its the final step in the wizard, <tt>false</tt> otherwise.
103:             */
104:            public boolean isLastStep(WizardStep step);
105:
106:            /**
107:             * Returns an iterator over all the steps in the model.  The iteration order is not guarenteed
108:             * to the be the order of traversal.
109:             * @return an iterator over all the steps of the model
110:             */
111:            public Iterator stepIterator();
112:
113:            /**
114:             * Adds a {@link PropertyChangeListener} to this model.
115:             * @param listener the listener to add.
116:             */
117:            public void addPropertyChangeListener(
118:                    PropertyChangeListener listener);
119:
120:            /**
121:             * Removes a {@link PropertyChangeListener} from this model.
122:             * @param listener the listener to remove.
123:             */
124:            public void removePropertyChangeListener(
125:                    PropertyChangeListener listener);
126:
127:            /**
128:             * Adds a {@link PropertyChangeListener} to this model.
129:             * @param propertyName the property to listen to.
130:             * @param listener the listener to add.
131:             */
132:            public void addPropertyChangeListener(String propertyName,
133:                    PropertyChangeListener listener);
134:
135:            /**
136:             * Removes a {@link PropertyChangeListener} from this model.
137:             * @param propertyName the property to stop listening to.
138:             * @param listener the listener to remove.
139:             */
140:            public void removePropertyChangeListener(String propertyName,
141:                    PropertyChangeListener listener);
142:
143:            /**
144:             * Called to request the model to update it current state.  This will be called when ever
145:             * a step transition occurs but may also be called by the current {@link WizardStep} to
146:             * force a refresh.
147:             */
148:            public void refreshModelState();
149:
150:            boolean isCancelAvailable();
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.