Eclipse eRCP
Release 1.1

org.eclipse.ui.application
Interface IWorkbenchWindowConfigurer


public interface IWorkbenchWindowConfigurer

Interface providing special access for configuring workbench windows.

Window configurer objects are in 1-1 correspondence with the workbench windows they configure. Clients may use get/setData to associate arbitrary state with the org.eclipse.jface.window configurer object.

Note that these objects are only available to the main application (the plug-in that creates and owns the workbench).

This interface is not intended to be implemented by clients.

Since:
3.0
See Also:
IWorkbenchConfigurer.getWindowConfigurer(org.eclipse.ui.IWorkbenchWindow), WorkbenchAdvisor.preWindowOpen(org.eclipse.ui.application.IWorkbenchWindowConfigurer)

Method Summary
 void addEditorAreaTransfer(Transfer transfer)
          Adds the given drag and drop Transfer type to the ones supported for drag and drop on the editor area of this workbench org.eclipse.jface.window.
 Control createPageComposite(Composite parent)
          Creates the page composite, in which the org.eclipse.jface.window's pages, and their views and editors, appear.
 Control createStatusLineControl(Composite parent)
          Creates the status line control.
 Object getData(String key)
          Returns the data associated with this workbench org.eclipse.jface.window at the given key.
 Point getInitialSize()
          Returns the size to use for the org.eclipse.jface.window's shell when it is created.
 int getShellStyle()
          Returns the style bits to use for the org.eclipse.jface.window's shell when it is created.
 boolean getShowFastViewBars()
          Returns whether the underlying workbench org.eclipse.jface.window has fast view bars.
 boolean getShowProgressIndicator()
          Returns whether the underlying workbench org.eclipse.jface.window has a progress indicator.
 boolean getShowStatusLine()
          Returns whether the underlying workbench org.eclipse.jface.window has a status line.
 String getTitle()
          Returns the title of the underlying workbench org.eclipse.jface.window.
 IWorkbenchWindow getWindow()
          Returns the underlying workbench org.eclipse.jface.window.
 IWorkbenchConfigurer getWorkbenchConfigurer()
          Returns the workbench configurer.
 void setData(String key, Object data)
          Sets the data associated with this workbench org.eclipse.jface.window at the given key.
 void setInitialSize(Point initialSize)
          Sets the size to use for the org.eclipse.jface.window's shell when it is created.
 void setShellStyle(int shellStyle)
          Sets the style bits to use for the org.eclipse.jface.window's shell when it is created.
 void setShowFastViewBars(boolean enable)
          Sets whether the underlying workbench org.eclipse.jface.window has fast view bars.
 void setShowProgressIndicator(boolean show)
          Sets whether the underlying workbench org.eclipse.jface.window has a progress indicator.
 void setShowStatusLine(boolean show)
          Sets whether the underlying workbench org.eclipse.jface.window has a status line.
 void setTitle(String title)
          Sets the title of the underlying workbench org.eclipse.jface.window.
 

Method Detail

getWindow

public IWorkbenchWindow getWindow()
Returns the underlying workbench org.eclipse.jface.window.

Returns:
the workbench org.eclipse.jface.window

getWorkbenchConfigurer

public IWorkbenchConfigurer getWorkbenchConfigurer()
Returns the workbench configurer.

Returns:
the workbench configurer

getTitle

public String getTitle()
Returns the title of the underlying workbench org.eclipse.jface.window.

Returns:
the org.eclipse.jface.window title

setTitle

public void setTitle(String title)
Sets the title of the underlying workbench org.eclipse.jface.window.

Parameters:
title - the org.eclipse.jface.window title

getShowStatusLine

public boolean getShowStatusLine()
Returns whether the underlying workbench org.eclipse.jface.window has a status line.

The initial value is true.

Returns:
true for a status line, and false for no status line

setShowStatusLine

public void setShowStatusLine(boolean show)
Sets whether the underlying workbench org.eclipse.jface.window has a status line.

Parameters:
show - true for a status line, and false for no status line

getShowFastViewBars

public boolean getShowFastViewBars()
Returns whether the underlying workbench org.eclipse.jface.window has fast view bars.

The initial value is false.

Returns:
true for fast view bars, and false for no fast view bars

setShowFastViewBars

public void setShowFastViewBars(boolean enable)
Sets whether the underlying workbench org.eclipse.jface.window has fast view bars.

Parameters:
enable - true for fast view bars, and false for no fast view bars

getShowProgressIndicator

public boolean getShowProgressIndicator()
Returns whether the underlying workbench org.eclipse.jface.window has a progress indicator.

The initial value is false.

Returns:
true for a progress indicator, and false for no progress indicator

setShowProgressIndicator

public void setShowProgressIndicator(boolean show)
Sets whether the underlying workbench org.eclipse.jface.window has a progress indicator.

Parameters:
show - true for a progress indicator, and false for no progress indicator

getShellStyle

public int getShellStyle()
Returns the style bits to use for the org.eclipse.jface.window's shell when it is created. The default is SWT.SHELL_TRIM.

Returns:
the shell style bits

setShellStyle

public void setShellStyle(int shellStyle)
Sets the style bits to use for the org.eclipse.jface.window's shell when it is created. This method has no effect after the shell is created. That is, it must be called within the preWindowOpen callback on WorkbenchAdvisor.

Parameters:
shellStyle - the shell style bits

getInitialSize

public Point getInitialSize()
Returns the size to use for the org.eclipse.jface.window's shell when it is created. The default is 800x600.

Returns:
the initial size to use for the shell

setInitialSize

public void setInitialSize(Point initialSize)
Sets the size to use for the org.eclipse.jface.window's shell when it is created. This method has no effect after the shell is created. That is, it must be called within the preWindowOpen callback on WorkbenchAdvisor.

Parameters:
initialSize - the initial size to use for the shell

getData

public Object getData(String key)
Returns the data associated with this workbench org.eclipse.jface.window at the given key.

Parameters:
key - the key
Returns:
the data, or null if there is no data at the given key

setData

public void setData(String key,
                    Object data)
Sets the data associated with this workbench org.eclipse.jface.window at the given key.

Parameters:
key - the key
data - the data, or null to delete existing data

addEditorAreaTransfer

public void addEditorAreaTransfer(Transfer transfer)
Adds the given drag and drop Transfer type to the ones supported for drag and drop on the editor area of this workbench org.eclipse.jface.window.

The workbench advisor would ordinarily call this method from the preWindowOpen callback. A newly-created workbench org.eclipse.jface.window supports no drag and drop transfer types. Adding EditorInputTransfer.getInstance() enables IEditorInputs to be transferred.

Note that drag and drop to the editor area requires adding one or more transfer types (using addEditorAreaTransfer) and configuring a drop target listener (with configureEditorAreaDropListener) capable of handling any of those transfer types.

Parameters:
transfer - a drag and drop transfer object
See Also:
#configureEditorAreaDropListener, org.eclipse.ui.part.EditorInputTransfer

createStatusLineControl

public Control createStatusLineControl(Composite parent)
Creates the status line control.

This should only be called if the advisor is defining custom org.eclipse.jface.window contents in createWindowContents. The caller must lay out the status line appropriately within the parent, but must not add, remove or change items in the result (hence the return type of Control). The status line is populated by the org.eclipse.jface.window's status line manager. The application can add to the status line manager in the advisor's fillActionBars method instead.

Parameters:
parent - the parent composite
Returns:
the status line control, suitable for laying out in the parent

createPageComposite

public Control createPageComposite(Composite parent)
Creates the page composite, in which the org.eclipse.jface.window's pages, and their views and editors, appear.

This should only be called if the advisor is defining custom org.eclipse.jface.window contents in createWindowContents. The caller must lay out the page composite appropriately within the parent, but must not add, remove or change items in the result (hence the return type of Control). The page composite is populated by the workbench.

Parameters:
parent - the parent composite
Returns:
the page composite, suitable for laying out in the parent

Eclipse eRCP
Release 1.1