Java Doc for WorkbenchWindowAdvisor.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » application » 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 » ui workbench » org.eclipse.ui.application 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.application.WorkbenchWindowAdvisor

All known Subclasses:   org.eclipse.ui.internal.application.CompatibilityWorkbenchWindowAdvisor,
WorkbenchWindowAdvisor
public class WorkbenchWindowAdvisor (Code)
Public base class for configuring a workbench window.

The workbench window advisor object is created in response to a workbench window being created (one per window), and is used to configure the window.

An application should declare a subclass of WorkbenchWindowAdvisor and override methods to configure workbench windows to suit the needs of the particular application.

The following advisor methods are called at strategic points in the workbench window's lifecycle (as with the workbench advisor, all occur within the dynamic scope of the call to PlatformUI.createAndRunWorkbench PlatformUI.createAndRunWorkbench ):

  • preWindowOpen - called as the window is being opened; use to configure aspects of the window other than actions bars
  • postWindowRestore - called after the window has been recreated from a previously saved state; use to adjust the restored window
  • postWindowCreate - called after the window has been created, either from an initial state or from a restored state; used to adjust the window
  • openIntro - called immediately before the window is opened in order to create the introduction component, if any.
  • postWindowOpen - called after the window has been opened; use to hook window listeners, etc.
  • preWindowShellClose - called when the window's shell is closed by the user; use to pre-screen window closings


since:
   3.1



Constructor Summary
public  WorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer)
     Creates a new workbench window advisor for configuring a workbench window via the given workbench window configurer.

Method Summary
public  ActionBarAdvisorcreateActionBarAdvisor(IActionBarConfigurer configurer)
     Creates a new action bar advisor to configure the action bars of the window via the given action bar configurer.
public  ControlcreateEmptyWindowContents(Composite parent)
     Creates and returns the control to be shown when the window has no open pages.
public  voidcreateWindowContents(Shell shell)
     Creates the contents of the window.

The default implementation adds a menu bar, a cool bar, a status line, a perspective bar, and a fast view bar.

public  voiddispose()
     Disposes any resources allocated by this window advisor.
protected  IWorkbenchWindowConfigurergetWindowConfigurer()
     Returns the workbench window configurer.
public  voidopenIntro()
     Opens the introduction componenet.
public  voidpostWindowClose()
     Performs arbitrary actions after the window is closed.

This method is called after the window's controls have been disposed. Clients must not call this method directly (although super calls are okay).

public  voidpostWindowCreate()
     Performs arbitrary actions after the window has been created (possibly after being restored), but has not yet been opened.

This method is called after the window has been created from scratch, or when it has been restored from a previously-saved window.

public  voidpostWindowOpen()
     Performs arbitrary actions after the window has been opened (possibly after being restored).

This method is called after the window has been opened.

public  voidpostWindowRestore()
     Performs arbitrary actions after the window has been restored, but before it is opened.

This method is called after a previously-saved window has been recreated.

public  voidpreWindowOpen()
     Performs arbitrary actions before the window is opened.

This method is called before the window's controls have been created. Clients must not call this method directly (although super calls are okay). The default implementation does nothing.

public  booleanpreWindowShellClose()
     Performs arbitrary actions as the window's shell is being closed directly, and possibly veto the close.

This method is called from a ShellListener associated with the window, for example when the user clicks the window's close button.

public  IStatusrestoreState(IMemento memento)
     Restores arbitrary application specific state information.
public  IStatussaveState(IMemento memento)
     Saves arbitrary application specific state information.


Constructor Detail
WorkbenchWindowAdvisor
public WorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer)(Code)
Creates a new workbench window advisor for configuring a workbench window via the given workbench window configurer.
Parameters:
  configurer - an object for configuring the workbench window




Method Detail
createActionBarAdvisor
public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer)(Code)
Creates a new action bar advisor to configure the action bars of the window via the given action bar configurer. The default implementation returns a new instance of ActionBarAdvisor .
Parameters:
  configurer - the action bar configurer for the window the action bar advisor for the window



createEmptyWindowContents
public Control createEmptyWindowContents(Composite parent)(Code)
Creates and returns the control to be shown when the window has no open pages. If null is returned, the default window background is shown.

The default implementation returns null. Subclasses may override.


Parameters:
  parent - the parent composite the control or null



createWindowContents
public void createWindowContents(Shell shell)(Code)
Creates the contents of the window.

The default implementation adds a menu bar, a cool bar, a status line, a perspective bar, and a fast view bar. The visibility of these controls can be configured using the setShow* methods on IWorkbenchWindowConfigurer.

Subclasses may override to define custom window contents and layout, but must call IWorkbenchWindowConfigurer.createPageComposite.


Parameters:
  shell - the window's shell
See Also:   IWorkbenchWindowConfigurer.createMenuBar
See Also:   IWorkbenchWindowConfigurer.createCoolBarControl
See Also:   IWorkbenchWindowConfigurer.createStatusLineControl
See Also:   IWorkbenchWindowConfigurer.createPageComposite



dispose
public void dispose()(Code)
Disposes any resources allocated by this window advisor. This is the last method called on this window advisor by the workbench. The default implementation does nothing. Subclasses may extend.



getWindowConfigurer
protected IWorkbenchWindowConfigurer getWindowConfigurer()(Code)
Returns the workbench window configurer. the workbench window configurer



openIntro
public void openIntro()(Code)
Opens the introduction componenet.

Clients must not call this method directly (although super calls are okay). The default implementation opens the intro in the first window provided if the preference IWorkbenchPreferences.SHOW_INTRO is true. If an intro is shown then this preference will be set to false. Subsequently, and intro will be shown only if WorkbenchConfigurer.getSaveAndRestore() returns true and the introduction was visible on last shutdown. Subclasses may override.




postWindowClose
public void postWindowClose()(Code)
Performs arbitrary actions after the window is closed.

This method is called after the window's controls have been disposed. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override.




postWindowCreate
public void postWindowCreate()(Code)
Performs arbitrary actions after the window has been created (possibly after being restored), but has not yet been opened.

This method is called after the window has been created from scratch, or when it has been restored from a previously-saved window. In the latter case, this method is called after postWindowRestore. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override.




postWindowOpen
public void postWindowOpen()(Code)
Performs arbitrary actions after the window has been opened (possibly after being restored).

This method is called after the window has been opened. This method is called after the window has been created from scratch, or when it has been restored from a previously-saved window. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override.




postWindowRestore
public void postWindowRestore() throws WorkbenchException(Code)
Performs arbitrary actions after the window has been restored, but before it is opened.

This method is called after a previously-saved window has been recreated. This method is not called when a new window is created from scratch. This method is never called when a workbench is started for the very first time, or when workbench state is not saved or restored. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override. It is okay to call IWorkbench.close() from this method.


exception:
  WorkbenchException - thrown if there are any errors to reportfrom post-restoration of the window



preWindowOpen
public void preWindowOpen()(Code)
Performs arbitrary actions before the window is opened.

This method is called before the window's controls have been created. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override. Typical clients will use the window configurer to tweak the workbench window in an application-specific way; however, filling the window's menu bar, tool bar, and status line must be done in ActionBarAdvisor.fillActionBars , which is called immediately after this method is called.




preWindowShellClose
public boolean preWindowShellClose()(Code)
Performs arbitrary actions as the window's shell is being closed directly, and possibly veto the close.

This method is called from a ShellListener associated with the window, for example when the user clicks the window's close button. It is not called when the window is being closed for other reasons, such as if the user exits the workbench via the ActionFactory.QUIT action. Clients must not call this method directly (although super calls are okay). If this method returns false, then the user's request to close the shell is ignored. This gives the workbench advisor an opportunity to query the user and/or veto the closing of a window under some circumstances.

true to allow the window to close, andfalse to prevent the window from closing
See Also:   org.eclipse.ui.IWorkbenchWindow.close
See Also:   WorkbenchAdvisor.preShutdown



restoreState
public IStatus restoreState(IMemento memento)(Code)
Restores arbitrary application specific state information.
Parameters:
  memento - the storage area for object's state a status object indicating whether the restore was successful
since:
   3.1



saveState
public IStatus saveState(IMemento memento)(Code)
Saves arbitrary application specific state information.
Parameters:
  memento - the storage area for object's state a status object indicating whether the save was successful
since:
   3.1



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.