Source Code Cross Referenced for HelpSystemPlugin.java in  » 6.0-JDK-Modules » java-3d » org » jdesktop » j3dfly » plugins » 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 » 6.0 JDK Modules » java 3d » org.jdesktop.j3dfly.plugins 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  $Header: /cvs/j3dfly/J3dFly/src/org/jdesktop/j3dfly/plugins/HelpSystemPlugin.java,v 1.1 2005/04/20 21:04:40 paulby Exp $
003:         *
004:         *                         Sun Public License Notice
005:         *
006:         *  The contents of this file are subject to the Sun Public License Version
007:         *  1.0 (the "License"). You may not use this file except in compliance with
008:         *  the License. A copy of the License is available at http://www.sun.com/
009:         *  
010:         *  The Original Code is Java 3D(tm) Fly Through.
011:         *  The Initial Developer of the Original Code is Paul Byrne.
012:         *  Portions created by Paul Byrne are Copyright (C) 2002.
013:         *  All Rights Reserved.
014:         *  
015:         *  Contributor(s): Paul Byrne.
016:         *  
017:         **/
018:        package org.jdesktop.j3dfly.plugins;
019:
020:        import javax.media.j3d.BranchGroup;
021:        import org.jdesktop.j3dfly.J3dFlyContext;
022:        import org.jdesktop.j3dfly.utils.help.Help;
023:        import org.jdesktop.j3dfly.utils.gui.SplashWindow;
024:
025:        /**
026:         *
027:         * @author  Paul Byrne
028:         * @version $Revision: 1.1 $
029:         */
030:        public class HelpSystemPlugin extends J3dFlyPlugin {
031:
032:            /** Creates new form J3dFlyMenu */
033:            public HelpSystemPlugin() {
034:                super ();
035:                javax.swing.JPopupMenu.setDefaultLightWeightPopupEnabled(false);
036:                initComponents();
037:                menuBar.remove(helpMenu);
038:                menuBar = null;
039:
040:                SplashWindow.showMessage("Initialising Help");
041:                Help.initialize("com/sun/j3d/demos/j3dfly/help/J3dFlyHelp");
042:            }
043:
044:            /**
045:             * Returns the class of the plugin preference.
046:             *
047:             * Plugins that require more preference information should provide a
048:             * subclass of PluginPrefernece that contains all the extra preference
049:             * data. This class must be Serializable.
050:             */
051:            public Class getPluginPreferenceClass() {
052:                return HelpSystemPluginPreference.class;
053:            }
054:
055:            public void installPlugin(PluginPreference pluginPref,
056:                    J3dFlyContext j3dflyContext) {
057:                super .installPlugin(pluginPref, j3dflyContext);
058:                if (pluginPref.isInstallInMenu())
059:                    j3dflyContext.getMainMenuBar().add(helpMenu);
060:                if (org.jdesktop.j3dfly.utils.help.Help.isEnabled())
061:                    org.jdesktop.j3dfly.utils.help.Help.addHelpButton(helpMI,
062:                            "j3dfly.main");
063:                else
064:                    helpMI.setEnabled(false);
065:            }
066:
067:            public void uninstallPlugin() {
068:                super .uninstallPlugin();
069:                if (pluginPref.isInstallInMenu())
070:                    j3dflyContext.getMainMenuBar().remove(helpMenu);
071:            }
072:
073:            /** This method is called from within the constructor to
074:             * initialize the form.
075:             * WARNING: Do NOT modify this code. The content of this method is
076:             * always regenerated by the FormEditor.
077:             */
078:            private void initComponents() {//GEN-BEGIN:initComponents
079:                menuBar = new javax.swing.JMenuBar();
080:                helpMenu = new javax.swing.JMenu();
081:                helpMI = new javax.swing.JMenuItem();
082:                aboutMI = new javax.swing.JMenuItem();
083:
084:                helpMenu.setText("Help");
085:                helpMI.setText("Help...");
086:                helpMenu.add(helpMI);
087:                aboutMI.setText("About...");
088:                helpMenu.add(aboutMI);
089:                menuBar.add(helpMenu);
090:
091:            }//GEN-END:initComponents
092:
093:            /**
094:             * Returns the control panel for this plugin, or null if there
095:             * is no control panel
096:             */
097:            public javax.swing.JPanel getControlPanel() {
098:                return null;
099:            }
100:
101:            /**
102:             * Get the title of the plugin
103:             */
104:            public String getPluginTitle() {
105:                return "Help";
106:            }
107:
108:            /**
109:             * Forte thinks this class is a subclass of JFrame, it's not so add
110:             * this NOP method to allow compilation in Forte
111:             */
112:            private void setJMenuBar(javax.swing.JMenuBar mb) {
113:            }
114:
115:            public static class HelpSystemPluginPreference extends
116:                    PluginPreference {
117:                public HelpSystemPluginPreference() {
118:                    super ();
119:                }
120:
121:                public HelpSystemPluginPreference(boolean enabled,
122:                        boolean installed) {
123:                    super (enabled, installed);
124:                }
125:
126:                public J3dFlyPlugin instantiatePlugin() {
127:                    return new HelpSystemPlugin();
128:                }
129:
130:                /**
131:                 * Return a description of this plugin
132:                 */
133:                public String getDescription() {
134:                    return "Application Help Infrastructure";
135:                }
136:
137:                /**
138:                 * Return the name of the Plugin for this prefernece.
139:                 * This is the name that will appear in the list of plugins
140:                 */
141:                public String getName() {
142:                    return "Help";
143:                }
144:
145:            }
146:
147:            /** Exit the Application */
148:            // Variables declaration - do not modify//GEN-BEGIN:variables
149:            private javax.swing.JMenuBar menuBar;
150:            private javax.swing.JMenuItem aboutMI;
151:            private javax.swing.JMenuItem helpMI;
152:            private javax.swing.JMenu helpMenu;
153:            // End of variables declaration//GEN-END:variables
154:
155:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.