Source Code Cross Referenced for PropertiesPageUtil.java in  » Workflow-Engines » osbl-1_0 » newprocess » diagram » cust » annotations » utils » 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 » Workflow Engines » osbl 1_0 » newprocess.diagram.cust.annotations.utils 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * 
003:         */package newprocess.diagram.cust.annotations.utils;
004:
005:        import java.util.Vector;
006:
007:        import newprocess.diagram.cust.annotations.actions.ProgramAnnotationAction;
008:
009:        import org.eclipse.jface.resource.ImageDescriptor;
010:        import org.eclipse.jface.viewers.IStructuredSelection;
011:        import org.eclipse.ui.PlatformUI;
012:
013:        /**
014:         * This class is intended to fetch the programms
015:         * specified for an editor from the Annotations 
016:         * property sheet page.
017:         * @author sh
018:         */
019:        public class PropertiesPageUtil {
020:            Vector<ProgramAnnotationAction> actions = new Vector<ProgramAnnotationAction>();
021:            private String projectName = null;
022:
023:            /**
024:             * Constructor
025:             */
026:            public PropertiesPageUtil(String projectName) {
027:                super ();
028:                this .projectName = projectName;
029:            }
030:
031:            /**
032:             * fetch the mappings of the Annotations
033:             * property sheet page.
034:             * This is just a dummy method
035:             * @return
036:             */
037:            public Object[] getAnnotationProperties() {
038:                return null;
039:                // FIXME "Preferences Sheet Page Workaround"
040:            }
041:
042:            /**
043:             * get the program actions
044:             */
045:            public Vector<ProgramAnnotationAction> getProgramActions() {
046:                return actions;
047:            }
048:
049:            /**
050:             * create actions for each program
051:             */
052:            public Vector<ProgramAnnotationAction> createProgramActions(
053:                    IStructuredSelection structuredSelection) {
054:                // get the editormappings of the property sheet page
055:                //Object[] mappings = getAnnotationProperties();
056:
057:                //***************************************************************
058:                // in the first release "MS Word", "MS Excel" are set as default
059:                if (structuredSelection == null)
060:                    return null;
061:                // create a MS Word Action
062:                ProgramAnnotationAction wordAction = createMSWordAction(structuredSelection);
063:                actions.add(wordAction);
064:
065:                // create a MS Excel Action
066:                ProgramAnnotationAction excelAction = createMSExcelAction(structuredSelection);
067:                actions.add(excelAction);
068:                //***************************************************************
069:                return actions;
070:                // FIXME "Preferences Sheet Page Workaround"
071:            }
072:
073:            /**
074:             * Create a MS Word Action
075:             * This method is a workaound
076:             */
077:            private ProgramAnnotationAction createMSWordAction(
078:                    IStructuredSelection structuredSelection) {
079:                String text = "New " + AnnotationTypes.MSWORD + "...";
080:                ImageDescriptor wordImage = PlatformUI.getWorkbench()
081:                        .getSharedImages().getImageDescriptor(
082:                                AnnotationTypes.MSWORD_ICON_PATH);
083:                ProgramAnnotationAction wordAction = new ProgramAnnotationAction(
084:                        text, wordImage, structuredSelection, projectName);
085:                return wordAction;
086:                // FIXME "Preferences Sheet Page Workaround"
087:            }
088:
089:            /**
090:             * Create a MS Excel Action
091:             * This method is a workaound
092:             */
093:            private ProgramAnnotationAction createMSExcelAction(
094:                    IStructuredSelection structuredSelection) {
095:                String text = "New " + AnnotationTypes.MSEXCEL + "...";
096:                ImageDescriptor excelImage = PlatformUI.getWorkbench()
097:                        .getSharedImages().getImageDescriptor(
098:                                AnnotationTypes.MSEXCEL_ICON_PATH);
099:                ProgramAnnotationAction excelAction = new ProgramAnnotationAction(
100:                        text, excelImage, structuredSelection, projectName);
101:                return excelAction;
102:                // FIXME "Preferences Sheet Page Workaround"
103:            }
104:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.