Source Code Cross Referenced for SwingXFormDialogBuilder.java in  » Web-Services » soapui-1.7.5 » com » eviware » x » impl » swing » 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 Services » soapui 1.7.5 » com.eviware.x.impl.swing 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  soapUI, copyright (C) 2004-2007 eviware.com 
003:         *
004:         *  soapUI is free software; you can redistribute it and/or modify it under the 
005:         *  terms of version 2.1 of the GNU Lesser General Public License as published by 
006:         *  the Free Software Foundation.
007:         *
008:         *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
009:         *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
010:         *  See the GNU Lesser General Public License for more details at gnu.org.
011:         */
012:
013:        package com.eviware.x.impl.swing;
014:
015:        import java.awt.event.ActionEvent;
016:
017:        import javax.swing.AbstractAction;
018:        import javax.swing.Action;
019:        import javax.swing.ImageIcon;
020:        import javax.swing.KeyStroke;
021:
022:        import com.eviware.soapui.support.HelpActionMarker;
023:        import com.eviware.soapui.support.Tools;
024:        import com.eviware.soapui.support.UISupport;
025:        import com.eviware.soapui.support.action.swing.ActionList;
026:        import com.eviware.soapui.support.action.swing.DefaultActionList;
027:        import com.eviware.x.form.XForm;
028:        import com.eviware.x.form.XFormDialog;
029:        import com.eviware.x.form.XFormDialogBuilder;
030:
031:        public class SwingXFormDialogBuilder extends XFormDialogBuilder {
032:            private String name;
033:            private SwingXFormDialog dialog;
034:
035:            public SwingXFormDialogBuilder(String name) {
036:                this .name = name;
037:            }
038:
039:            public XForm createForm(String name) {
040:                XForm form = new SwingXFormImpl(name);
041:                addForm(form);
042:                return form;
043:            }
044:
045:            public XFormDialog buildDialog(ActionList actions,
046:                    String description, ImageIcon icon) {
047:                XForm[] forms = getForms();
048:                dialog = forms.length > 1 ? new JTabbedFormDialog(name, forms,
049:                        actions, description, icon) : new JFormDialog(name,
050:                        forms[0], actions, description, icon);
051:
052:                return dialog;
053:            }
054:
055:            public ActionList buildOkCancelActions() {
056:                DefaultActionList actions = new DefaultActionList("Actions");
057:                actions.addAction(new OKAction());
058:                actions.addAction(new CancelAction());
059:                return actions;
060:            }
061:
062:            public ActionList buildOkCancelHelpActions(String url) {
063:                DefaultActionList actions = new DefaultActionList("Actions");
064:                actions.addAction(new HelpAction(url));
065:                actions.addAction(new OKAction());
066:                actions.addAction(new CancelAction());
067:
068:                return actions;
069:            }
070:
071:            protected final class OKAction extends AbstractAction {
072:                public OKAction() {
073:                    super ("OK");
074:                }
075:
076:                public void actionPerformed(ActionEvent e) {
077:                    if (dialog != null) {
078:                        dialog.setReturnValue(XFormDialog.OK_OPTION);
079:                        dialog.setVisible(false);
080:                    }
081:                }
082:            }
083:
084:            protected final class CancelAction extends AbstractAction {
085:                public CancelAction() {
086:                    super ("Cancel");
087:                }
088:
089:                public void actionPerformed(ActionEvent e) {
090:                    if (dialog != null) {
091:                        dialog.setReturnValue(XFormDialog.CANCEL_OPTION);
092:                        dialog.setVisible(false);
093:                    }
094:                }
095:            }
096:
097:            public final class HelpAction extends AbstractAction implements 
098:                    HelpActionMarker {
099:                private final String url;
100:
101:                public HelpAction(String url) {
102:                    this ("Online Help", url, UISupport.getKeyStroke("F1"));
103:                }
104:
105:                public HelpAction(String title, String url) {
106:                    this (title, url, null);
107:                }
108:
109:                public HelpAction(String title, String url,
110:                        KeyStroke accelerator) {
111:                    super (title);
112:                    this .url = url;
113:                    putValue(Action.SHORT_DESCRIPTION, "Show online help");
114:                    if (accelerator != null)
115:                        putValue(Action.ACCELERATOR_KEY, accelerator);
116:
117:                    putValue(Action.SMALL_ICON, UISupport.HELP_ICON);
118:                }
119:
120:                public void actionPerformed(ActionEvent e) {
121:                    Tools.openURL(url);
122:                }
123:            }
124:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.