Java Doc for ApplicationWindow.java in  » IDE-Eclipse » jface » org » eclipse » jface » window » 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 » jface » org.eclipse.jface.window 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jface.window.Window
      org.eclipse.jface.window.ApplicationWindow

ApplicationWindow
public class ApplicationWindow extends Window implements IRunnableContext(Code)
An application window is a high-level "main window", with built-in support for an optional menu bar with standard menus, an optional toolbar, and an optional status line.

Creating an application window involves the following steps:

  • creating an instance of ApplicationWindow
  • assigning the window to a window manager (optional)
  • opening the window by calling open
Only on the last step, when the window is told to open, are the window's shell and widget tree created. When the window is closed, the shell and widget tree are disposed of and are no longer referenced, and the window is automatically removed from its window manager. Like all windows, an application window may be reopened.

An application window is also a suitable context in which to perform long-running operations (that is, it implements IRunnableContext).


Inner Class :class ApplicationWindowLayout extends Layout

Field Summary
protected  Labelseperator1
     The seperator between the menu bar and the rest of the window.

Constructor Summary
public  ApplicationWindow(Shell parentShell)
     Create an application window instance, whose shell will be created under the given parent shell. Note that the window will have no visual representation (no widgets) until it is told to open.

Method Summary
protected  voidaddCoolBar(int style)
     Configures this window to have a cool bar.
protected  voidaddMenuBar()
     Configures this window to have a menu bar.
protected  voidaddStatusLine()
     Configures this window to have a status line.
protected  voidaddToolBar(int style)
     Configures this window to have a tool bar.
protected  booleancanHandleShellCloseEvent()
    
public  booleanclose()
    
protected  voidconfigureShell(Shell shell)
     Extends the super implementation by creating the trim widgets using createTrimWidgets.
protected  booleancoolBarChildrenExist()
     Returns whether or not children exist for this application window's cool bar control.
protected  ControlcreateCoolBarControl(Composite composite)
     Creates the control for the cool bar manager.
protected  CoolBarManagercreateCoolBarManager(int style)
     Returns a new cool bar manager for the window.
protected  ICoolBarManagercreateCoolBarManager2(int style)
     Returns a new cool bar manager for the window.

By default this method calls createCoolBarManager.

protected  MenuManagercreateMenuManager()
     Returns a new menu manager for the window.
protected  voidcreateStatusLine(Shell shell)
     Create the status line if required.
protected  StatusLineManagercreateStatusLineManager()
     Returns a new status line manager for the window.
protected  ControlcreateToolBarControl(Composite parent)
     Creates the control for the tool bar manager.
protected  ToolBarManagercreateToolBarManager(int style)
     Returns a new tool bar manager for the window.
protected  IToolBarManagercreateToolBarManager2(int style)
     Returns a new tool bar manager for the window.
protected  voidcreateTrimWidgets(Shell shell)
     Creates the trim widgets around the content area.
protected  ControlgetCoolBarControl()
     Returns the control for the window's cool bar.
public  CoolBarManagergetCoolBarManager()
     Returns the cool bar manager for this window.
public  ICoolBarManagergetCoolBarManager2()
     Returns the cool bar manager for this window.
protected  FontgetFont()
     Returns the default font used for this window.
protected  LayoutgetLayout()
    
public  MenuManagergetMenuBarManager()
     Returns the menu bar manager for this window (if it has one).
protected  LabelgetSeperator1()
     Return the top seperator.
protected  StatusLineManagergetStatusLineManager()
     Returns the status line manager for this window (if it has one).
public  StringgetSymbolicFontName()
     Returns the symbolic font name of the font to be used to display text in this window.
protected  ControlgetToolBarControl()
     Returns the control for the window's toolbar.
public  ToolBarManagergetToolBarManager()
     Returns the tool bar manager for this window (if it has one).
public  IToolBarManagergetToolBarManager2()
     Returns the tool bar manager for this window (if it has one).
public  voidrun(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
     This implementation of IRunnableContext#run(boolean, boolean, IRunnableWithProgress) blocks until the runnable has been run, regardless of the value of fork. It is recommended that fork is set to true in most cases.
public  voidsetStatus(String message)
     Sets or clears the message displayed in this window's status line (if it has one).
protected  booleanshowTopSeperator()
     Returns whether to show a top separator line between the menu bar and the rest of the window contents.
protected  booleantoolBarChildrenExist()
     Returns whether or not children exist for the Application Window's toolbar control.

Field Detail
seperator1
protected Label seperator1(Code)
The seperator between the menu bar and the rest of the window.




Constructor Detail
ApplicationWindow
public ApplicationWindow(Shell parentShell)(Code)
Create an application window instance, whose shell will be created under the given parent shell. Note that the window will have no visual representation (no widgets) until it is told to open. By default, open does not block.
Parameters:
  parentShell - the parent shell, or null to create a top-level shell




Method Detail
addCoolBar
protected void addCoolBar(int style)(Code)
Configures this window to have a cool bar. Does nothing if it already has one. This method must be called before this window's shell is created.
Parameters:
  style - the cool bar style
since:
   3.0



addMenuBar
protected void addMenuBar()(Code)
Configures this window to have a menu bar. Does nothing if it already has one. This method must be called before this window's shell is created.



addStatusLine
protected void addStatusLine()(Code)
Configures this window to have a status line. Does nothing if it already has one. This method must be called before this window's shell is created.



addToolBar
protected void addToolBar(int style)(Code)
Configures this window to have a tool bar. Does nothing if it already has one. This method must be called before this window's shell is created.
Parameters:
  style - swt style bits used to create the Toolbar
See Also:   ToolBarManager.ToolBarManager(int)
See Also:   ToolBar
See Also:    for style bits



canHandleShellCloseEvent
protected boolean canHandleShellCloseEvent()(Code)



close
public boolean close()(Code)



configureShell
protected void configureShell(Shell shell)(Code)
Extends the super implementation by creating the trim widgets using createTrimWidgets.



coolBarChildrenExist
protected boolean coolBarChildrenExist()(Code)
Returns whether or not children exist for this application window's cool bar control. boolean true if children exist, false otherwise
since:
   3.0



createCoolBarControl
protected Control createCoolBarControl(Composite composite)(Code)
Creates the control for the cool bar manager.

Subclasses may override this method to customize the cool bar manager.


Parameters:
  composite - the parent used for the control an instance of CoolBar
since:
   3.0



createCoolBarManager
protected CoolBarManager createCoolBarManager(int style)(Code)
Returns a new cool bar manager for the window.

Subclasses may override this method to customize the cool bar manager.


Parameters:
  style - swt style bits used to create the Coolbar a cool bar manager
since:
   3.0
See Also:   CoolBarManager.CoolBarManager(int)
See Also:   CoolBar
See Also:    for style bits



createCoolBarManager2
protected ICoolBarManager createCoolBarManager2(int style)(Code)
Returns a new cool bar manager for the window.

By default this method calls createCoolBarManager. Subclasses may override this method to provide an alternative implementation for the cool bar manager.


Parameters:
  style - swt style bits used to create the Coolbar a cool bar manager
since:
   3.2
See Also:   ApplicationWindow.createCoolBarManager(int)



createMenuManager
protected MenuManager createMenuManager()(Code)
Returns a new menu manager for the window.

Subclasses may override this method to customize the menu manager.

a menu manager



createStatusLine
protected void createStatusLine(Shell shell)(Code)
Create the status line if required.
Parameters:
  shell -



createStatusLineManager
protected StatusLineManager createStatusLineManager()(Code)
Returns a new status line manager for the window.

Subclasses may override this method to customize the status line manager.

a status line manager



createToolBarControl
protected Control createToolBarControl(Composite parent)(Code)
Creates the control for the tool bar manager.

Subclasses may override this method to customize the tool bar manager.


Parameters:
  parent - the parent used for the control a Control



createToolBarManager
protected ToolBarManager createToolBarManager(int style)(Code)
Returns a new tool bar manager for the window.

Subclasses may override this method to customize the tool bar manager.


Parameters:
  style - swt style bits used to create the Toolbar a tool bar manager
See Also:   ToolBarManager.ToolBarManager(int)
See Also:   ToolBar
See Also:    for style bits



createToolBarManager2
protected IToolBarManager createToolBarManager2(int style)(Code)
Returns a new tool bar manager for the window.

By default this method calls createToolBarManager. Subclasses may override this method to provide an alternative implementation for the tool bar manager.


Parameters:
  style - swt style bits used to create the Toolbar a tool bar manager
since:
   3.2
See Also:   ApplicationWindow.createToolBarManager(int)



createTrimWidgets
protected void createTrimWidgets(Shell shell)(Code)
Creates the trim widgets around the content area.
Parameters:
  shell - the shell
since:
   3.0



getCoolBarControl
protected Control getCoolBarControl()(Code)
Returns the control for the window's cool bar.

Subclasses may override this method to customize the cool bar manager.

an instance of CoolBar
since:
   3.0



getCoolBarManager
public CoolBarManager getCoolBarManager()(Code)
Returns the cool bar manager for this window. the cool bar manager, or null ifthis window does not have a cool bar
See Also:   ApplicationWindow.addCoolBar(int)
since:
   3.0



getCoolBarManager2
public ICoolBarManager getCoolBarManager2()(Code)
Returns the cool bar manager for this window. the cool bar manager, or null ifthis window does not have a cool bar
See Also:   ApplicationWindow.addCoolBar(int)
since:
   3.2



getFont
protected Font getFont()(Code)
Returns the default font used for this window.

The default implementation of this framework method obtains the symbolic name of the font from the getSymbolicFontName framework method and retrieves this font from JFace's font registry using JFaceResources.getFont. Subclasses may override to use a different registry, etc.

the default font, or null if none



getLayout
protected Layout getLayout()(Code)



getMenuBarManager
public MenuManager getMenuBarManager()(Code)
Returns the menu bar manager for this window (if it has one). the menu bar manager, or null ifthis window does not have a menu bar
See Also:   ApplicationWindow.addMenuBar()



getSeperator1
protected Label getSeperator1()(Code)
Return the top seperator. Label



getStatusLineManager
protected StatusLineManager getStatusLineManager()(Code)
Returns the status line manager for this window (if it has one). the status line manager, or null ifthis window does not have a status line
See Also:   ApplicationWindow.addStatusLine



getSymbolicFontName
public String getSymbolicFontName()(Code)
Returns the symbolic font name of the font to be used to display text in this window. This is not recommended and is included for backwards compatability. It is recommended to use the default font provided by SWT (that is, do not set the font). the symbolic font name



getToolBarControl
protected Control getToolBarControl()(Code)
Returns the control for the window's toolbar.

Subclasses may override this method to customize the tool bar manager.

a Control



getToolBarManager
public ToolBarManager getToolBarManager()(Code)
Returns the tool bar manager for this window (if it has one). the tool bar manager, or null ifthis window does not have a tool bar
See Also:   ApplicationWindow.addToolBar(int)



getToolBarManager2
public IToolBarManager getToolBarManager2()(Code)
Returns the tool bar manager for this window (if it has one). the tool bar manager, or null ifthis window does not have a tool bar
See Also:   ApplicationWindow.addToolBar(int)
since:
   3.2



run
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException(Code)
This implementation of IRunnableContext#run(boolean, boolean, IRunnableWithProgress) blocks until the runnable has been run, regardless of the value of fork. It is recommended that fork is set to true in most cases. If fork is set to false, the runnable will run in the UI thread and it is the runnable's responsibility to call Display.readAndDispatch() to ensure UI responsiveness.



setStatus
public void setStatus(String message)(Code)
Sets or clears the message displayed in this window's status line (if it has one). This method has no effect if the window does not have a status line.
Parameters:
  message - the status message, or null to clear it



showTopSeperator
protected boolean showTopSeperator()(Code)
Returns whether to show a top separator line between the menu bar and the rest of the window contents. On some platforms such as the Mac, the menu is separated from the main window already, so a separator line is not desired. true to show the top separator, falseto not show it
since:
   3.0



toolBarChildrenExist
protected boolean toolBarChildrenExist()(Code)
Returns whether or not children exist for the Application Window's toolbar control.

boolean true if children exist, false otherwise




Fields inherited from org.eclipse.jface.window.Window
final public static int CANCEL(Code)(Java Doc)
final public static int OK(Code)(Java Doc)

Methods inherited from org.eclipse.jface.window.Window
protected boolean canHandleShellCloseEvent()(Code)(Java Doc)
public boolean close()(Code)(Java Doc)
protected void configureShell(Shell newShell)(Code)(Java Doc)
protected void constrainShellSize()(Code)(Java Doc)
public void create()(Code)(Java Doc)
protected Control createContents(Composite parent)(Code)(Java Doc)
final protected Shell createShell()(Code)(Java Doc)
protected Rectangle getConstrainedShellBounds(Rectangle preferredSize)(Code)(Java Doc)
protected Control getContents()(Code)(Java Doc)
public static Image getDefaultImage()(Code)(Java Doc)
public static Image[] getDefaultImages()(Code)(Java Doc)
public static int getDefaultOrientation()(Code)(Java Doc)
protected Point getInitialLocation(Point initialSize)(Code)(Java Doc)
protected Point getInitialSize()(Code)(Java Doc)
protected Layout getLayout()(Code)(Java Doc)
protected Shell getParentShell()(Code)(Java Doc)
public int getReturnCode()(Code)(Java Doc)
public Shell getShell()(Code)(Java Doc)
protected ShellListener getShellListener()(Code)(Java Doc)
protected int getShellStyle()(Code)(Java Doc)
public WindowManager getWindowManager()(Code)(Java Doc)
protected void handleFontChange(PropertyChangeEvent event)(Code)(Java Doc)
protected void handleShellCloseEvent()(Code)(Java Doc)
protected void initializeBounds()(Code)(Java Doc)
public int open()(Code)(Java Doc)
public void setBlockOnOpen(boolean shouldBlock)(Code)(Java Doc)
public static void setDefaultImage(Image image)(Code)(Java Doc)
public static void setDefaultImages(Image[] images)(Code)(Java Doc)
public static void setDefaultModalParent(IShellProvider provider)(Code)(Java Doc)
public static void setDefaultOrientation(int defaultOrientation)(Code)(Java Doc)
public static void setExceptionHandler(IExceptionHandler handler)(Code)(Java Doc)
protected void setParentShell(Shell newParentShell)(Code)(Java Doc)
protected void setReturnCode(int code)(Code)(Java Doc)
protected void setShellStyle(int newShellStyle)(Code)(Java Doc)
public void setWindowManager(WindowManager manager)(Code)(Java Doc)

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.