Source Code Cross Referenced for SoapUIPreferencesAction.java in  » Web-Services » soapui-1.7.5 » com » eviware » soapui » actions » 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.soapui.actions 
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.soapui.actions;
014:
015:        import java.awt.event.ActionEvent;
016:        import java.util.ArrayList;
017:        import java.util.List;
018:
019:        import javax.swing.AbstractAction;
020:        import javax.swing.Action;
021:        import javax.swing.JTabbedPane;
022:
023:        import com.eviware.soapui.SoapUI;
024:        import com.eviware.soapui.impl.wsdl.support.HelpUrls;
025:        import com.eviware.soapui.model.settings.Settings;
026:        import com.eviware.soapui.settings.ProxySettings;
027:        import com.eviware.soapui.settings.SSLSettings;
028:        import com.eviware.soapui.settings.WSISettings;
029:        import com.eviware.soapui.settings.WsdlSettings;
030:        import com.eviware.soapui.support.UISupport;
031:        import com.eviware.soapui.support.components.SwingConfigurationDialogImpl;
032:        import com.eviware.soapui.support.types.StringToStringMap;
033:
034:        /**
035:         * Action for managing SoapUI preferences
036:         * 
037:         * @author Ole.Matzura
038:         */
039:
040:        public class SoapUIPreferencesAction extends AbstractAction {
041:            public static final String WS_I_SETTINGS = "WS-I Settings";
042:            public static final String WSDL_SETTINGS = "WSDL Settings";
043:            public static final String UI_SETTINGS = "UI Settings";
044:            public static final String PROXY_SETTINGS = "Proxy Settings";
045:            public static final String HTTP_SETTINGS = "HTTP Settings";
046:            public static final String SSL_SETTINGS = "SSL Settings";
047:            public static final String INTEGRATED_TOOLS = "Tools";
048:            private SwingConfigurationDialogImpl dialog;
049:            private JTabbedPane tabs;
050:            private List<Prefs> prefs = new ArrayList<Prefs>();
051:
052:            private static SoapUIPreferencesAction instance;
053:
054:            public SoapUIPreferencesAction() {
055:                super ("Preferences");
056:
057:                putValue(Action.SHORT_DESCRIPTION,
058:                        "Sets global soapUI preferences");
059:                putValue(Action.ACCELERATOR_KEY, UISupport
060:                        .getKeyStroke("menu alt P"));
061:
062:                addPrefs(new HttpPrefs(HTTP_SETTINGS));
063:                addPrefs(new AnnotatedSettingsPrefs(ProxySettings.class,
064:                        PROXY_SETTINGS));
065:                addPrefs(new AnnotatedSettingsPrefs(SSLSettings.class,
066:                        SSL_SETTINGS));
067:                addPrefs(new AnnotatedSettingsPrefs(WsdlSettings.class,
068:                        WSDL_SETTINGS));
069:                addPrefs(new UIPrefs(UI_SETTINGS));
070:                addPrefs(new ToolsPrefs(INTEGRATED_TOOLS));
071:                addPrefs(new AnnotatedSettingsPrefs(WSISettings.class,
072:                        WS_I_SETTINGS));
073:
074:                instance = this ;
075:            }
076:
077:            public void addPrefs(Prefs pref) {
078:                prefs.add(pref);
079:            }
080:
081:            public static SoapUIPreferencesAction getInstance() {
082:                if (instance == null)
083:                    instance = new SoapUIPreferencesAction();
084:
085:                return instance;
086:            }
087:
088:            public void actionPerformed(ActionEvent e) {
089:                show(HTTP_SETTINGS);
090:            }
091:
092:            public boolean show(String initialTab) {
093:                if (dialog == null)
094:                    buildDialog();
095:
096:                Settings settings = SoapUI.getSettings();
097:                for (Prefs pref : prefs)
098:                    pref.setFormValues(settings);
099:
100:                if (initialTab != null) {
101:                    int ix = tabs.indexOfTab(initialTab);
102:                    if (ix != -1)
103:                        tabs.setSelectedIndex(ix);
104:                }
105:
106:                if (dialog.show(new StringToStringMap())) {
107:                    for (Prefs pref : prefs)
108:                        pref.getFormValues(settings);
109:
110:                    return true;
111:                }
112:
113:                return false;
114:            }
115:
116:            private void buildDialog() {
117:                dialog = new SwingConfigurationDialogImpl("soapUI Preferences",
118:                        HelpUrls.PREFERENCES_HELP_URL,
119:                        "Set global soapUI settings", UISupport.OPTIONS_ICON);
120:
121:                tabs = new JTabbedPane();
122:                tabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
123:                tabs.setTabPlacement(JTabbedPane.LEFT);
124:                for (Prefs pref : prefs) {
125:                    tabs.addTab(pref.getTitle(), pref.getForm().getPanel());
126:                }
127:
128:                dialog.setContent(UISupport.createTabPanel(tabs, false));
129:
130:                //		dialog.setSize( new Dimension( 450, 390 ));
131:                // Increased size for MacOSX
132:                //dialog.setSize( new Dimension( 670, 450 ));
133:            }
134:
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.