Source Code Cross Referenced for WizardContext.java in  » Web-Framework » aranea-mvc-1.1.1 » org » araneaframework » example » common » framework » context » 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 » Web Framework » aranea mvc 1.1.1 » org.araneaframework.example.common.framework.context 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright 2006 Webmedia Group Ltd.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *  http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         **/package org.araneaframework.example.common.framework.context;
016:
017:        import java.io.Serializable;
018:        import org.araneaframework.Widget;
019:
020:        /**
021:         * A context consisting of Widgets that could be switched through different
022:         * requests. Default page index is 0. <code>submit()</code>,
023:         * <code>cancel()</code> and all <code>gotoXXX()</code> methods invoke all
024:         * event listeners with respective method.
025:         * 
026:         * @see org.araneaframework.example.common.framework.container.StandardWizardWidget
027:         * @author Rein Raudjärv <reinra@ut.ee>
028:         */
029:        public interface WizardContext {
030:
031:            /*
032:             * Modify pages
033:             */
034:
035:            /**
036:             * Adds new page with specific index (current page indexes are modified
037:             * respectively). Wizard must be initialized before adding pages to it.
038:             * 
039:             * @param index
040:             *          page index.
041:             * @param page
042:             *          page.
043:             * @throws Exception
044:             */
045:            void addPage(int index, Widget page) throws Exception;
046:
047:            /**
048:             * Adds new page as last element. Wizard must be initialized before adding
049:             * pages to it.
050:             * 
051:             * @param page
052:             *          page.
053:             * @throws Exception
054:             */
055:            void addPage(Widget page) throws Exception;
056:
057:            /**
058:             * Removes a page. Next (previous if this was the last one) page will be
059:             * selected.
060:             * 
061:             * @param page
062:             *          page.
063:             * @throws Exception
064:             */
065:            void removePage(Widget page) throws Exception;
066:
067:            /**
068:             * Removes a page. Next (previous if this was the last one) page will be
069:             * selected.
070:             * 
071:             * @param index
072:             *          page index.
073:             * @throws Exception
074:             */
075:            void removePage(int index) throws Exception;
076:
077:            /**
078:             * Removes all pages. Page index will be reset to 0.
079:             * 
080:             * @throws Exception
081:             */
082:            void clearPages() throws Exception;
083:
084:            /*
085:             * Goto page
086:             */
087:
088:            /**
089:             * Switch to the next page.
090:             */
091:            void gotoNext();
092:
093:            /**
094:             * Switch to the previous page.
095:             */
096:            void gotoPrevious();
097:
098:            /**
099:             * Switch to the first page.
100:             */
101:            void gotoFirst();
102:
103:            /**
104:             * Switch to the last page.
105:             */
106:            void gotoLast();
107:
108:            /**
109:             * Switch to the specified page.
110:             * 
111:             * @param page
112:             *          page.
113:             */
114:            void gotoPage(Widget page);
115:
116:            /**
117:             * Switch to a page with specified index.
118:             * 
119:             * @param index
120:             *          page index.
121:             */
122:            void gotoPage(int index);
123:
124:            /*
125:             * Read only methods
126:             */
127:
128:            /**
129:             * Returns a page with specified index.
130:             * 
131:             * @param index
132:             *          page index.
133:             * @return page with specified index.
134:             */
135:            Widget getPage(int index);
136:
137:            /**
138:             * Returns all pages.
139:             * 
140:             * @return all pages.
141:             */
142:            Widget[] getAllPages();
143:
144:            /**
145:             * Returns an index of specified page.
146:             * 
147:             * @param page
148:             *          page.
149:             * @return page index.
150:             */
151:            int getIndexOfPage(Widget page);
152:
153:            /**
154:             * Count all pages.
155:             * 
156:             * @return page count.
157:             */
158:            int countPages();
159:
160:            /**
161:             * Returns whether the specified page has been added.
162:             * 
163:             * @param page
164:             *          page.
165:             * @return whether the specified page has been added.
166:             */
167:            boolean containsPage(Widget page);
168:
169:            /**
170:             * Returns whether the specified index match the page index bounds.
171:             * 
172:             * @param index
173:             *          page index.
174:             * @return whether the specified index match the page index bounds.
175:             */
176:            boolean containsIndex(int index);
177:
178:            /**
179:             * Returns the index of current page.
180:             * 
181:             * @return page index.
182:             */
183:            int getCurrentPageIndex();
184:
185:            /**
186:             * Returns the current page.
187:             * 
188:             * @return page.
189:             */
190:            Widget getCurrentPage();
191:
192:            /*
193:             * Submit & cancel
194:             */
195:
196:            /**
197:             * Calls onSubmit() on eventListeners.
198:             */
199:            void submit();
200:
201:            /**
202:             * Calls onCancel() on eventListeners.
203:             */
204:            void cancel();
205:
206:            /*
207:             * Event listeners
208:             */
209:
210:            /**
211:             * Adds new event listener.
212:             * 
213:             * @param listener
214:             *          listener.
215:             */
216:            void addEventListener(EventListener listener);
217:
218:            /**
219:             * Removes a specified event listener.
220:             * 
221:             * @param listener
222:             *          listener.
223:             */
224:            void removeEventListener(EventListener listener);
225:
226:            /**
227:             * Removes all event listeners.
228:             */
229:            void clearEventListeners();
230:
231:            /**
232:             * The event listener for providing callbacks <code>onGoto(Widget page)</code>,
233:             * <code>onSubmit</code> and <code>onCancel</code>.
234:             * <code>onGoto(Widget page)</code> gets called when <code>gotoXXX()</code>
235:             * is invoked or current page index is modified due to removing a page.
236:             * <code>onSubmit</code> gets called when <code>submit()</code> is
237:             * invoked. <code>onCancel</code> gets called when <code>cancel()</code>
238:             * is invoked.
239:             */
240:            interface EventListener extends Serializable {
241:                /**
242:                 * Callback handling a change of current page.
243:                 * 
244:                 * @param page
245:                 *          the page got activated.
246:                 */
247:                void onGoto(Widget page) throws Exception;
248:
249:                /**
250:                 * Callback handling a <code>submit()</code> call.
251:                 */
252:                void onSubmit() throws Exception;
253:
254:                /**
255:                 * Callback handling a <code>cancel()</code> call.
256:                 */
257:                void onCancel() throws Exception;
258:            }
259:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.