Source Code Cross Referenced for CMWAdvViewCEF.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » ui » ide » security » 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 » ESB » cbesb 1.2 » com.bostechcorp.cbesb.ui.ide.security 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ChainBuilder ESB
003:         *          Visual Enterprise Integration
004:         * 
005:         * Copyright (C) 2006 Bostech Corporation
006:         * 
007:         * This program is free software; you can redistribute it and/or modify it 
008:         * under the terms of the GNU General Public License as published by the 
009:         * Free Software Foundation; either version 2 of the License, or (at your option) 
010:         * any later version.
011:         *
012:         * This program is distributed in the hope that it will be useful, 
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
014:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
015:         * for more details.
016:         * 
017:         * You should have received a copy of the GNU General Public License along with 
018:         * this program; if not, write to the Free Software Foundation, Inc., 
019:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020:         *
021:         *
022:         * $Id$
023:         */
024:
025:        package com.bostechcorp.cbesb.ui.ide.security;
026:
027:        import java.io.File;
028:
029:        import org.eclipse.jface.wizard.IWizardPage;
030:        import org.eclipse.swt.SWT;
031:        import org.eclipse.swt.events.ModifyEvent;
032:        import org.eclipse.swt.events.ModifyListener;
033:        import org.eclipse.swt.events.SelectionAdapter;
034:        import org.eclipse.swt.events.SelectionEvent;
035:        import org.eclipse.swt.layout.GridData;
036:        import org.eclipse.swt.layout.GridLayout;
037:        import org.eclipse.swt.widgets.Button;
038:        import org.eclipse.swt.widgets.Composite;
039:        import org.eclipse.swt.widgets.Label;
040:        import org.eclipse.swt.widgets.Text;
041:
042:        import com.bostechcorp.cbesb.common.i18n.I18N;
043:        import com.bostechcorp.cbesb.common.i18n.Messages;
044:        import com.bostechcorp.cbesb.ui.util.AuthenticationUtil;
045:
046:        public class CMWAdvViewCEF extends CMWContextAwarePage {
047:
048:            private Button viewButton;
049:            private Text text_2;
050:            private Text text;
051:
052:            protected CMWAdvViewCEF(String pageName) {
053:                super (pageName);
054:                setTitle(I18N.getString(Messages.CMW_ADVANCED_VIEW_CEF_TITLE));
055:                setDescription(I18N
056:                        .getString(Messages.CMW_ADVANCED_VIEW_CEF_DESCRIPTION));
057:            }
058:
059:            public void createControl(Composite parent) {
060:                Composite shell = new Composite(parent, SWT.NONE);
061:                final GridLayout gridLayout = new GridLayout();
062:                gridLayout.numColumns = 3;
063:                shell.setLayout(gridLayout);
064:
065:                final Label keystoreFileLabel = new Label(shell, SWT.NONE);
066:                keystoreFileLabel.setLayoutData(new GridData(SWT.FILL,
067:                        SWT.CENTER, false, false));
068:                keystoreFileLabel.setText(I18N
069:                        .getString(Messages.CMW_ADVANCED_VIEW_CEF_LABEL_CEF));
070:
071:                text = new Text(shell, SWT.READ_ONLY | SWT.BORDER);
072:                text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
073:                        false));
074:
075:                final Button browseButton = new Button(shell, SWT.NONE);
076:                browseButton.addSelectionListener(new SelectionAdapter() {
077:                    public void widgetSelected(final SelectionEvent e) {
078:                        systemFileBrowse(text);
079:                    }
080:                });
081:                browseButton.setText(I18N
082:                        .getString(Messages.CMW_ADVANCED_LABEL_BROWSE));
083:
084:                text_2 = new Text(shell, SWT.V_SCROLL | SWT.MULTI
085:                        | SWT.READ_ONLY | SWT.BORDER | SWT.WRAP);
086:                text_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false,
087:                        true, 3, 1));
088:                //
089:                setControl(shell);
090:                //		some Listeners
091:                ModifyListener mody = new ModifyListener() {
092:                    public void modifyText(ModifyEvent e) {
093:                        updatePageComplete();
094:                    }
095:                };
096:
097:                text.addModifyListener(mody);
098:
099:                final Label label = new Label(shell, SWT.SEPARATOR
100:                        | SWT.HORIZONTAL);
101:                label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
102:                        false, 3, 1));
103:
104:                viewButton = new Button(shell, SWT.NONE);
105:                viewButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER,
106:                        false, false));
107:                viewButton.addSelectionListener(new SelectionAdapter() {
108:                    public void widgetSelected(final SelectionEvent e) {
109:                        performAction();
110:                    }
111:                });
112:                viewButton.setText(I18N
113:                        .getString(Messages.CMW_ADVANCED_LABEL_VIEW_BUTTON));
114:                viewButton.setVisible(true);
115:                new Label(shell, SWT.NONE);
116:                new Label(shell, SWT.NONE);
117:                //
118:                updatePageComplete();
119:            }
120:
121:            @Override
122:            public IWizardPage getNextPage() {
123:                CertificateManagerWizard parent = (CertificateManagerWizard) getWizard();
124:                return parent.getNextPage(this );
125:            }
126:
127:            @Override
128:            public IWizardPage getPreviousPage() {
129:                CertificateManagerWizard parent = (CertificateManagerWizard) getWizard();
130:                return parent.getPreviousPage(this );
131:            }
132:
133:            @Override
134:            protected void updatePageComplete() {
135:                setPageComplete(verify());
136:                if (viewButton != null)
137:                    viewButton.setEnabled(verify());
138:                //if(verify()) performAction();
139:            }
140:
141:            private boolean verify() {
142:                if (text == null)
143:                    return false;
144:                if (text.getText().equals("")) {
145:                    showError(I18N
146:                            .getString(Messages.CMW_ADVANCED_MESSAGE_ERROR_SELECT_FILE));
147:                    return false;
148:                }
149:                showClean();
150:                return true;
151:            }
152:
153:            /**
154:             * executes action if Finish is pressed
155:             */
156:            public boolean performFinish() {
157:                //return performAction();
158:                return false;
159:            }
160:
161:            /**
162:             * Executes the certificate deletion
163:             * @return
164:             */
165:            protected boolean performAction() {
166:                //String filePath=getPro_path()+"/"+text.getText().substring(text.getText().indexOf("::")+2);
167:                //File file= new File(filePath);
168:                File file = new File(text.getText());
169:                showWarning(I18N
170:                        .getString(Messages.CMW_ADVANCED_MESSAGE_OPERATION_PRGRESS));
171:                try {
172:                    text_2.setText(AuthenticationUtil.exportFileToString(file));
173:                    showInfo(I18N
174:                            .getString(Messages.CMW_ADVANCED_MESSAGE_OPERATION_SUCCES));
175:                } catch (Exception e) {
176:                    setPageComplete(false);
177:                    showError(I18N
178:                            .getString(Messages.CMW_ADVANCED_MESSAGE_OPERATION_EXCEPTION));
179:                    e.printStackTrace();
180:                    currentExceptionMessage = e.getMessage();
181:                    return false;
182:                }
183:                return true;
184:            }
185:
186:            @Override
187:            public boolean canFinish() {
188:                //if ( getWizard().getNextPage(this)==null && verify()) return true;
189:                return false;
190:            }
191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.