Source Code Cross Referenced for Transformxlsxml.java in  » Test-Coverage » salome-tmf » salomeTMF_plug » pluginxlsxml » 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 » Test Coverage » salome tmf » salomeTMF_plug.pluginxlsxml 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // ###################################################################################################
002:        // Versionning du plugin
003:
004:        // 2.3.0 Plugin fontionnant pour la version 2.3 de SaloméTMF (exigences et tests)
005:        // 3.0.0 Plugin fontionnant pour la version 3 de SaloméTMF
006:        // 3.0.2 Correction de deux anomalies 
007:        // 3.1.0 Intégration des paramètres, des environnements, et des campagnes
008:        // 3.1.1 Optimisation du code et fusion des cellules du modèle Excel
009:        // 3.1.2 Ajout des colonnes PJ et liens hypertextes par actions
010:
011:        // ###################################################################################################
012:        /*
013:         SalomeTMF is a Test Management Framework
014:         * Copyright (C) 2007 EDF / France Telecom R&D
015:         *
016:         * This library is free software; you can redistribute it and/or
017:         * modify it under the terms of the GNU Lesser General Public
018:         * License as published by the Free Software Foundation; either
019:         * version 2 of the License, or (at your option) any later version.
020:         *
021:         * This library is distributed in the hope that it will be useful,
022:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
023:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
024:         * Lesser General Public License for more details.
025:         *
026:         * You should have received a copy of the GNU Lesser General Public
027:         * License along with this library; if not, write to the Free Software
028:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
029:         *
030:         * @author Jérémie DEFAYE
031:         *
032:         * Contact: mikael.marche@rd.francetelecom.com
033:         */
034:
035:        package salomeTMF_plug.pluginxlsxml;
036:
037:        import java.awt.event.ActionEvent;
038:        import java.awt.event.ActionListener;
039:        import java.util.Map;
040:        import java.util.Vector;
041:        import javax.swing.JMenu;
042:        import javax.swing.JMenuItem;
043:
044:        import org.java.plugin.ExtensionPoint;
045:        import org.java.plugin.Plugin;
046:        import org.java.plugin.PluginDescriptor;
047:        import org.java.plugin.PluginManager;
048:        import org.objectweb.salome_tmf.data.DataConstants;
049:        import org.objectweb.salome_tmf.data.Project;
050:        import org.objectweb.salome_tmf.ihm.IHMConstants;
051:        import org.objectweb.salome_tmf.ihm.tools.Tools;
052:        import org.objectweb.salome_tmf.plugins.IPlugObject;
053:        import org.objectweb.salome_tmf.plugins.core.Admin;
054:        import org.objectweb.salome_tmf.plugins.core.Common;
055:
056:        import salomeTMF_plug.pluginxlsxml.Export.ExportXLSDialog;
057:        import salomeTMF_plug.pluginxlsxml.Import.ImportXLSDialog;
058:        import salomeTMF_plug.pluginxlsxml.Commun.PopUpFormalismeExcel;
059:        import salomeTMF_plug.pluginxlsxml.language.Language;
060:
061:        /**
062:         * Plugin that can import or export data between SalomeTMF and Excel
063:         * 
064:         * @version 1
065:         */
066:        public class Transformxlsxml extends Plugin implements  Common, Admin,
067:                DataConstants, IHMConstants {
068:
069:            // SalomeTMF pIhm;
070:            private boolean isFreezed = false;
071:
072:            private JMenu testGendocSubMenu = null;
073:
074:            private JMenu campGendocSubMenu = null;
075:
076:            private JMenu dataGendocSubMenu = null;
077:
078:            private JMenu testEchangeDonneesSubMenu = null;
079:
080:            private JMenu campEchangeDonneesSubMenu = null;
081:
082:            private JMenu dataEchangeDonneesSubMenu = null;
083:
084:            private IPlugObject pIPlugObject;
085:
086:            /**
087:             * Plugin that can import or export data between SalomeTMF and Excel
088:             * 
089:             * @param manager
090:             *            Manager
091:             * @param descr
092:             *            Description
093:             */
094:            public Transformxlsxml(PluginManager manager, PluginDescriptor descr) {
095:                super (manager, descr);
096:            }
097:
098:            /**
099:             * see org.java.plugin.Plugin()
100:             * 
101:             * @throws java.lang.Exception
102:             *             Erreur language
103:             */
104:            protected void doStart() throws Exception {
105:                // no-op
106:            }
107:
108:            /**
109:             * see org.java.plugin.Plugin()
110:             * 
111:             * @throws java.lang.Exception
112:             *             Erreur Language
113:             */
114:            protected void doStop() throws Exception {
115:                // no-op
116:            }
117:
118:            /**
119:             * salome.plugins.core.Common
120:             * 
121:             * @param pIPlugObject
122:             *            Interface Homme Machine
123:             */
124:            public void init(Object pIPlugObject) {
125:                this .pIPlugObject = (IPlugObject) pIPlugObject;
126:            }
127:
128:            /**
129:             * salome.plugins.core.Common
130:             * 
131:             * @return True
132:             */
133:            public boolean isActivableInTestToolsMenu() {
134:                return true;
135:            }
136:
137:            /**
138:             * salome.plugins.core.Common
139:             * 
140:             * @return True
141:             */
142:            public boolean isActivableInCampToolsMenu() {
143:                return true;
144:            }
145:
146:            /**
147:             * salome.plugins.core.Common
148:             * 
149:             * @return True
150:             */
151:            public boolean isActivableInDataToolsMenu() {
152:                return true;
153:            }
154:
155:            /**
156:             * see salome.plugins.core.Common
157:             * 
158:             * @return False
159:             */
160:            public boolean usesOtherUIComponents() {
161:                return false;
162:            }
163:
164:            /**
165:             * see salome.plugins.core.Common
166:             * 
167:             * @param testToolsMenu
168:             *            Menu
169:             */
170:            public void activatePluginInTestToolsMenu(JMenu testToolsMenu) {
171:                testToolsMenu.addSeparator();
172:                testToolsMenu.add(createJMenu());
173:
174:            }
175:
176:            /**
177:             * see salome.plugins.core.Common
178:             * 
179:             * @param campToolsMenu
180:             *            Menu
181:             */
182:            public void activatePluginInCampToolsMenu(JMenu campToolsMenu) {
183:                campToolsMenu.addSeparator();
184:                campToolsMenu.add(createJMenu());
185:
186:            }
187:
188:            /**
189:             * see salome.plugins.core.Common
190:             * 
191:             * @param dataToolsMenu
192:             *            dataToolsMenu
193:             */
194:            public void activatePluginInDataToolsMenu(JMenu dataToolsMenu) {
195:                dataToolsMenu.addSeparator();
196:                dataToolsMenu.add(createJMenu());
197:            }
198:
199:            /**
200:             * Crée le menu de Salomé
201:             * 
202:             * @return Menu créé
203:             */
204:            public JMenu createJMenu() {
205:
206:                JMenu xlsxmlSubMenu;
207:                xlsxmlSubMenu = new JMenu(Language.getInstance().getText(
208:                        "Plugin_Excel"));
209:                JMenuItem importItem = new JMenuItem(
210:                        Language
211:                                .getInstance()
212:                                .getText(
213:                                        "Importer_des_données_à_partir_d\'un_fichier_XLS"));
214:                JMenuItem exportItem = new JMenuItem(Language.getInstance()
215:                        .getText("Exporter_au_format_XLS"));
216:                JMenuItem modeleItem = new JMenuItem(Language.getInstance()
217:                        .getText("Generer_modele_XLS"));
218:
219:                modeleItem.addActionListener(new ActionListener() {
220:                    public void actionPerformed(ActionEvent e) {
221:                        try {
222:                            new PopUpFormalismeExcel(pIPlugObject);
223:                        } catch (Exception ex) {
224:                            Tools.ihmExceptionView(ex);
225:                        }
226:                    }
227:                });
228:
229:                exportItem.addActionListener(new ActionListener() {
230:                    public void actionPerformed(ActionEvent e) {
231:                        try {
232:                            new ExportXLSDialog(pIPlugObject);
233:                        } catch (Exception ex) {
234:                            Tools.ihmExceptionView(ex);
235:                        }
236:                    }
237:                });
238:
239:                importItem.addActionListener(new ActionListener() {
240:                    public void actionPerformed(ActionEvent e) {
241:                        try {
242:                            new ImportXLSDialog(pIPlugObject);
243:                        } catch (Exception ex) {
244:                            Tools.ihmExceptionView(ex);
245:                        }
246:                    }
247:                });
248:                xlsxmlSubMenu.add(importItem);
249:                xlsxmlSubMenu.add(exportItem);
250:                xlsxmlSubMenu.addSeparator();
251:                xlsxmlSubMenu.add(modeleItem);
252:                return xlsxmlSubMenu;
253:            }
254:
255:            /**
256:             * see salome.plugins.core.Common
257:             * 
258:             * @return Null
259:             */
260:            public Vector getUsedUIComponents() {
261:                return null;
262:            }
263:
264:            /**
265:             * see salome.plugins.core.Common
266:             * 
267:             * @param uiCompCst
268:             *            Nombre
269:             */
270:            public void activatePluginInStaticComponent(Integer uiCompCst) {
271:            }
272:
273:            /**
274:             * see salome.plugins.core.Common
275:             * 
276:             * @param uiCompCst
277:             *            Nombre
278:             */
279:            public void activatePluginInDynamicComponent(Integer uiCompCst) {
280:            }
281:
282:            /**
283:             * see salome.plugins.core.Common
284:             * 
285:             * @return True
286:             */
287:            public boolean isFreezable() {
288:                return true;
289:            }
290:
291:            /**
292:             * see salome.plugins.core.Common
293:             */
294:            public void freeze() {
295:                testGendocSubMenu.setEnabled(false);
296:                campGendocSubMenu.setEnabled(false);
297:                dataGendocSubMenu.setEnabled(false);
298:                isFreezed = true;
299:            }
300:
301:            /**
302:             * see salome.plugins.core.Common
303:             */
304:            public void unFreeze() {
305:                testGendocSubMenu.setEnabled(true);
306:                campGendocSubMenu.setEnabled(true);
307:                dataGendocSubMenu.setEnabled(true);
308:                isFreezed = false;
309:            }
310:
311:            /**
312:             * see salome.plugins.core.Common
313:             * 
314:             * @return isFreezed
315:             */
316:            public boolean isFreezed() {
317:                return isFreezed;
318:            }
319:
320:            /**
321:             * see
322:             * org.objectweb.salome_tmf.plugins.core.Admin#activateInSalomeAdmin(java.util.Map)
323:             * 
324:             * @param commonExtensions
325:             *            ExtensionPoint
326:             * @param testDriverExtensions
327:             *            ExtensionPoint
328:             * @param scriptEngineExtensions
329:             *            ExtensionPoint
330:             * @param bugTrackerExtensions
331:             *            ExtensionPoint
332:             */
333:            public void allPluginActived(ExtensionPoint commonExtensions,
334:                    ExtensionPoint testDriverExtensions,
335:                    ExtensionPoint scriptEngineExtensions,
336:                    ExtensionPoint bugTrackerExtensions) {
337:
338:            }
339:
340:            // ////////////////////////////// Admin interface
341:            // ////////////////////////////////////
342:
343:            /*
344:             * (non-Javadoc)
345:             * 
346:             * @see org.objectweb.salome_tmf.plugins.core.Admin#activateInSalomeAdmin(java.util.Map)
347:             */
348:            /**
349:             * Non Javadoc
350:             * 
351:             * @param adminUIComps
352:             *            Map
353:             * @param iPlugObject
354:             *            IPlugObject
355:             */
356:            public void activateInSalomeAdmin(final Map adminUIComps,
357:                    IPlugObject iPlugObject) {
358:                // !\\ Pour la frame parent de la fenetre secondaire ->
359:                // Administarion.ptrFrame
360:            }
361:
362:            /**
363:             * Non Javadoc
364:             * 
365:             * @param p
366:             *            Project
367:             */
368:            public void onDeleteProject(Project p) {
369:
370:            }
371:
372:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.