Source Code Cross Referenced for TestPilotTopComponent.java in  » XML-UI » xui32 » com » xoetrope » carousel » testpilot » 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 » XML UI » xui32 » com.xoetrope.carousel.testpilot 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.xoetrope.carousel.testpilot;
002:
003:        import com.xoetrope.editor.netbeans.wizard.XuiTopComponent;
004:        import java.awt.Component;
005:        import org.openide.text.CloneableEditorSupport;
006:        import org.openide.windows.Mode;
007:        import org.openide.windows.WindowManager;
008:        import net.xoetrope.xui.XProject;
009:        import net.xoetrope.xui.XProjectManager;
010:        import net.xoetrope.editor.project.XEditorProject;
011:        import java.util.Hashtable;
012:        import net.xoetrope.xui.PageSupport;
013:        import net.xoetrope.xui.XApplicationContext;
014:        import net.xoetrope.xui.XPage;
015:
016:        /**
017:         * A TopComponent for hosting the TestPilot tool
018:         * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
019:         * the GNU Public License (GPL), please see license.txt for more details. If
020:         * you make commercial use of this software you must purchase a commercial
021:         * license from Xoetrope.</p>
022:         * <p> $Revision: 1.8 $</p>
023:         */
024:        public class TestPilotTopComponent extends XuiTopComponent {
025:            /**
026:             * The owner project and the context in which this object operates.
027:             */
028:            protected XProject currentProject = XProjectManager
029:                    .getCurrentProject();
030:
031:            /** Creates a new instance of TestPilotTopComponent */
032:            public TestPilotTopComponent() {
033:                super (TestPilotTopComponent.class,
034:                        "com/xoetrope/carousel/testpilot/project.xui",
035:                        "com/xoetrope/carousel/testpilot/resources/testPilotStartup.properties");
036:                currentProject.setObject("TestPilotTopComponent", this );
037:
038:                setName("TestPilot ("
039:                        + currentProject.getStartupParam("ProjectPath") + ")");
040:                currentProject.setObject("TestPilot", this );
041:            }
042:
043:            public void restoreViews() {
044:
045:            }
046:
047:            /**
048:             * Setup the windowing.
049:             * @param context the owner application context
050:             * @param currentProject the owner project
051:             * @param clientWidth the desired width of the application
052:             * @param clientHeight the desired height of the application
053:             */
054:            public void setupWindow(XApplicationContext context,
055:                    XProject currentProject, int clientWidth, int clientHeight) {
056:                //    if ( clientFrame != null )
057:                //      clientFrame.setSize( clientWidth, clientHeight );
058:                //
059:                //    appWindow = null;
060:                //    if ( bUseWindow ) {
061:                //      appWindow = new JWindow( clientFrame );
062:                //      appWindow.setSize( clientWidth, clientHeight );
063:                //      appWindow.addWindowListener( context );
064:                //      clientFrame.addWindowListener( context );
065:                //    }
066:                //    else {
067:                //      appWindow = clientFrame;
068:                //      if ( clientFrame != null )
069:                //        clientFrame.addWindowListener( context );
070:                //    }
071:                //    appWindow.setLayout( new BorderLayout());
072:                //    appWindow.add( pageHolder = new Panel(), BorderLayout.CENTER );
073:                //    
074:                //    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
075:                //    if ( bUseWindow ) {
076:                //      Dimension frameSize = appWindow.getSize();
077:                //      appWindow.setLocation( ( screenSize.width - frameSize.width ) / 2, ( screenSize.height - frameSize.height ) / 2 );
078:                //      appWindow.setVisible( true );
079:                //      clientFrame.setLocation( screenSize.width / 2, screenSize.height / 2 );
080:                //      clientFrame.setSize( 0,0 );
081:                //      clientFrame.setVisible( true );
082:                //    }
083:                //    else if ( clientFrame != null ) {
084:                //      Dimension frameSize = clientFrame.getSize();
085:                //      String center = null;
086:                //      try {
087:                //        center = currentProject.getStartupParam( "CenterWin" );
088:                //      }
089:                //      catch ( Exception ex ) {
090:                //      }
091:                //      if ( ( center != null ) && ( center.compareTo( "true" ) == 0 ) )
092:                //        clientFrame.setLocation(( screenSize.width - frameSize.width ) / 2, ( screenSize.height - frameSize.height ) / 2 );
093:                //      clientFrame.setVisible( true );
094:                //    }
095:                //
096:                //    currentProject.setApplet( this );
097:                //    currentProject.setStartupObject( this );
098:                //    currentProject.setAppFrame( clientFrame );
099:                //    currentProject.setAppWindow( appWindow );
100:            }
101:
102:            public Object getContentPaneEx() {
103:                return null;//pageHolder;
104:            }
105:
106:            /**
107:             * Get the parent object
108:             * @return the parent
109:             */
110:            public Object getParentObject() {
111:                return getParent();
112:            }
113:
114:            /**
115:             * Get the package name for the default widget set
116:             */
117:            public String getWidgetClassPackage() {
118:                return XPage.XUI_SWING_PACKAGE;
119:            }
120:
121:            public static TestPilotTopComponent getInstance() {
122:                XProject currentProject = XProjectManager.getCurrentProject();
123:                if (currentProject instanceof  XEditorProject) {
124:                    Object obj = currentProject.getObject("TestPilot");
125:                    if ((obj == null) || !((Component) obj).isValid()) {
126:                        obj = new TestPilotTopComponent();
127:                        TestPilotTopComponent tptc = (TestPilotTopComponent) obj;
128:                        tptc.open();
129:                        tptc.requestVisible();
130:                        tptc.requestActive();
131:                        return (TestPilotTopComponent) obj;
132:                    } else
133:                        return (TestPilotTopComponent) obj;
134:                }
135:                return null;
136:            }
137:
138:            public int getPersistenceType() {
139:                return PERSISTENCE_NEVER;
140:            }
141:
142:            public String preferredID() {
143:                return "XuiProTestPilot";
144:            }
145:
146:            public void open() {
147:                Mode mode = WindowManager.getDefault().findMode(
148:                        CloneableEditorSupport.EDITOR_MODE);
149:                if (mode != null)
150:                    mode.dockInto(this );
151:                super .open();
152:            }
153:
154:            protected boolean closeLast() {
155:                // You might want to prompt the user first and maybe return false:
156:                return true;
157:            }
158:
159:            /**
160:             * Get the menubar, setting it up if it is not already added to the 
161:             * application frame
162:             * @return the menu bar
163:             */
164:            public Object getApplicationMenuBar() {
165:                return null;//clientFrame.getMenuBar();
166:            }
167:
168:            /**
169:             * Set the menubar
170:             * @param mb the menubar
171:             */
172:            public void setApplicationMenuBar(Object mb) {
173:                //clientFrame.setMenuBar( (MenuBar)mb );
174:            }
175:
176:            /**
177:             * Setup frameset. This method is called prior to the addition of any target 
178:             * areas in the framset and prior to the display of any pages. Since this
179:             * applet does not support configurable framesets, this method ignores the
180:             * parameter values passed.
181:             * @param params the framset parameters if any
182:             */
183:            public void setupFrameset(Hashtable params) {
184:            }
185:
186:            /**
187:             * Display a window decoration, for example a toolbar
188:             * @param page the new page
189:             * @param constraint a value controlling how and where the decoration is 
190:             * displayed, this value is application type specific
191:             * @return the page being displayed
192:             */
193:            public Object displayDecoration(PageSupport page, String constraint) {
194:                return null;
195:            }
196:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.