Source Code Cross Referenced for SimpleCSBlock.java in  » IDE-Eclipse » Eclipse-plug-in-development » org » eclipse » pde » internal » ui » editor » cheatsheet » simple » 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 » IDE Eclipse » Eclipse plug in development » org.eclipse.pde.internal.ui.editor.cheatsheet.simple 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2006, 2007 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.pde.internal.ui.editor.cheatsheet.simple;
011:
012:        import org.eclipse.jface.viewers.ISelection;
013:        import org.eclipse.pde.core.IModelChangedEvent;
014:        import org.eclipse.pde.core.IModelChangedListener;
015:        import org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCS;
016:        import org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSIntro;
017:        import org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSItem;
018:        import org.eclipse.pde.internal.core.icheatsheet.simple.ISimpleCSSubItem;
019:        import org.eclipse.pde.internal.ui.editor.PDEFormPage;
020:        import org.eclipse.pde.internal.ui.editor.PDEMasterDetailsBlock;
021:        import org.eclipse.pde.internal.ui.editor.PDESection;
022:        import org.eclipse.pde.internal.ui.editor.cheatsheet.ICSMaster;
023:        import org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.SimpleCSDetails;
024:        import org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.SimpleCSIntroDetails;
025:        import org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.SimpleCSItemDetails;
026:        import org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.SimpleCSSubItemDetails;
027:        import org.eclipse.swt.widgets.Composite;
028:        import org.eclipse.ui.forms.DetailsPart;
029:        import org.eclipse.ui.forms.IDetailsPage;
030:        import org.eclipse.ui.forms.IDetailsPageProvider;
031:        import org.eclipse.ui.forms.IManagedForm;
032:
033:        /**
034:         * SimpleCSBlock
035:         *
036:         */
037:        public class SimpleCSBlock extends PDEMasterDetailsBlock implements 
038:                IDetailsPageProvider, IModelChangedListener {
039:
040:            private SimpleCSMasterTreeSection fMasterSection;
041:
042:            private SimpleCSItemDetails fItemDetails;
043:
044:            private SimpleCSSubItemDetails fSubItemDetails;
045:
046:            private SimpleCSDetails fCheatSheetDetails;
047:
048:            private SimpleCSIntroDetails fIntroDetails;
049:
050:            /**
051:             * @param page
052:             */
053:            public SimpleCSBlock(PDEFormPage page) {
054:                super (page);
055:            }
056:
057:            /* (non-Javadoc)
058:             * @see org.eclipse.pde.internal.ui.editor.PDEMasterDetailsBlock#createMasterSection(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite)
059:             */
060:            protected PDESection createMasterSection(IManagedForm managedForm,
061:                    Composite parent) {
062:                fMasterSection = new SimpleCSMasterTreeSection(getPage(),
063:                        parent);
064:                return fMasterSection;
065:            }
066:
067:            /* (non-Javadoc)
068:             * @see org.eclipse.ui.forms.MasterDetailsBlock#registerPages(org.eclipse.ui.forms.DetailsPart)
069:             */
070:            protected void registerPages(DetailsPart detailsPart) {
071:                // Only static pages to be defined.  Do not cache pages
072:                detailsPart.setPageLimit(0);
073:                // Register static page:  item
074:                fItemDetails = new SimpleCSItemDetails(fMasterSection);
075:                detailsPart.registerPage(SimpleCSItemDetails.class,
076:                        fItemDetails);
077:                // Register static page:  subitem
078:                fSubItemDetails = new SimpleCSSubItemDetails(fMasterSection);
079:                detailsPart.registerPage(SimpleCSSubItemDetails.class,
080:                        fSubItemDetails);
081:                // Register static page:  cheatsheet
082:                fCheatSheetDetails = new SimpleCSDetails(fMasterSection);
083:                detailsPart.registerPage(SimpleCSDetails.class,
084:                        fCheatSheetDetails);
085:                // Register static page:  intro
086:                fIntroDetails = new SimpleCSIntroDetails(fMasterSection);
087:                detailsPart.registerPage(SimpleCSIntroDetails.class,
088:                        fIntroDetails);
089:                // Set this class as the page provider
090:                detailsPart.setPageProvider(this );
091:            }
092:
093:            /* (non-Javadoc)
094:             * @see org.eclipse.ui.forms.IDetailsPageProvider#getPageKey(java.lang.Object)
095:             */
096:            public Object getPageKey(Object object) {
097:                // Get static page key
098:                if (object instanceof  ISimpleCSItem) {
099:                    // Static page:  item
100:                    return SimpleCSItemDetails.class;
101:                } else if (object instanceof  ISimpleCSSubItem) {
102:                    // Static page:  subitem
103:                    return SimpleCSSubItemDetails.class;
104:                } else if (object instanceof  ISimpleCS) {
105:                    // Static page:  cheatsheet
106:                    return SimpleCSDetails.class;
107:                } else if (object instanceof  ISimpleCSIntro) {
108:                    // Static page:  intro
109:                    return SimpleCSIntroDetails.class;
110:                }
111:                // Should never reach here
112:                return object.getClass();
113:            }
114:
115:            /* (non-Javadoc)
116:             * @see org.eclipse.ui.forms.IDetailsPageProvider#getPage(java.lang.Object)
117:             */
118:            public IDetailsPage getPage(Object key) {
119:                // No dynamic pages.  Static pages already registered
120:                return null;
121:            }
122:
123:            /* (non-Javadoc)
124:             * @see org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde.core.IModelChangedEvent)
125:             */
126:            public void modelChanged(IModelChangedEvent event) {
127:                // Inform the master section
128:                if (fMasterSection != null) {
129:                    fMasterSection.modelChanged(event);
130:                }
131:                // Inform the details section
132:                // Unnecessary
133:                //if (fCurrentDetailsSection != null) {
134:                //	fCurrentDetailsSection.modelChanged(event);
135:                //}
136:            }
137:
138:            /**
139:             * @return
140:             */
141:            public ICSMaster getMastersSection() {
142:                return fMasterSection;
143:            }
144:
145:            /**
146:             * @return
147:             */
148:            public ISelection getSelection() {
149:                if (fMasterSection != null) {
150:                    return fMasterSection.getSelection();
151:                }
152:                return null;
153:            }
154:
155:        }
w_w_w.ja___v_a2__s.co_m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.