15.3. WorkbenchWindowAdvisorIn Hyperbola, WorkbenchWindowAdvisor plays a more visible role than WorkbenchAdvisor. It configures the window's title, the visibility of the menu bar, toolbar, and status line, and many more things. Essentially, this advisor controls the appearance of each Workbench window. The methods on WorkbenchWindowAdvisor relate to the lifecycle of the window instead of the Workbench's lifecycle. Within the lifecycle methods, the advisor can configure the window via its IWorkbenchWindowConfigurer. Think of the configurer as providing special APIs that allow the advisor to fine-tune elements of the WorkbenchWindow that are not available via the standard IWorkbenchWindow APIs. As such, the configurer has several useful methods such as setInitialSize(Point), setShowToolbar(boolean), setTitle(String), and setShowMenuBar(boolean). The following snippet shows a typical use of this advisor: org.eclipsercp.hyperbola/ApplicationWorkbenchWindowAdvisor The Hyperbola WorkbenchWindowAdvisor overrides a few methods such as:
Working through the tutorial in Part II is the best way to understand how a WorkbenchWindowAdivsor is used. For more advanced Workbench window customization, see Chapter 18, "Customizing Workbench Windows," and Chapter 19, "Customizing the Presentation of Views and Editors." 15.3.1. IWorkbenchWindowConfigurerAs shown in the previous code snippet, the window's configurer is most often used in the WorkbenchWindowAdvisor to show and hide items in the window. It can also be used to:
|
Wednesday, November 11, 2009
Section 15.3. WorkbenchWindowAdvisor
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment