# Class WorkbenchWindowConfigurer

java.lang.Object
org.eclipse.ui.internal.WorkbenchWindowConfigurer

All Implemented Interfaces:
  `IWorkbenchWindowConfigurer`

public final class WorkbenchWindowConfigurer extends Object implements IWorkbenchWindowConfigurer
Internal class providing special access for configuring workbench windows.

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

This class is not intended to be instantiated or subclassed by clients.

Since:
  3.0

## Method Summary

Modifier and Type
Method
Description
`void`
`addEditorAreaTransfer(Transfer tranfer)`
Adds the given drag and drop `Transfer` type to the ones supported for drag and drop on the editor area of this workbench window.
`void`
`configureEditorAreaDropListener(DropTargetListener dropTargetListener)`
Configures the drop target listener for the editor area of this workbench window.
`void`
`createDefaultContents(Shell shell)`
Creates the default window contents.
`IActionBarConfigurer`
`getActionBarConfigurer()`
Returns the action bar configurer for this workbench window.
`Object`
`getData(String key)`
Returns the data associated with this workbench window at the given key.
`Point`
`getInitialSize()`
Returns the size to use for the window's shell when it is created.
`int`
`getShellStyle()`
Returns the style bits to use for the window's shell when it is created.
`boolean`
`getShowCoolBar()`
Returns whether the underlying workbench window has a cool bar.
`boolean`
`getShowMenuBar()`
Returns whether the underlying workbench window has a menu bar.
`boolean`
`getShowPerspectiveBar()`
Returns whether the underlying workbench window has a perspective bar (the perspective bar provides buttons to quickly switch between perspectives).
`boolean`
`getShowProgressIndicator()`
Returns whether the underlying workbench window has a progress indicator.
`boolean`
`getShowStatusLine()`
Returns whether the underlying workbench window has a status line.
`String`
`getTitle()`
Returns the title of the underlying workbench window.
`IWorkbenchWindow`
`getWindow()`
Returns the underlying workbench window.
`IWorkbenchConfigurer`
`getWorkbenchConfigurer()`
Returns the workbench configurer.
`IStatus`
`saveState(IMemento memento)`
Saves the current state of the window using the specified memento.
`void`
`setData(String key, Object data)`
Sets the data associated with this workbench window at the given key.
`void`
`setInitialSize(Point size)`
Sets the size to use for the window's shell when it is created.
`void`
`setShellStyle(int shellStyle)`
Sets the style bits to use for the window's shell when it is created.
`void`
`setShowCoolBar(boolean show)`
Sets whether the underlying workbench window has a cool bar.
`void`
`setShowMenuBar(boolean show)`
Sets whether the underlying workbench window has a menu bar.
`void`
`setShowPerspectiveBar(boolean show)`
Sets whether the underlying workbench window has a perspective bar (the perspective bar provides buttons to quickly switch between perspectives).
`void`
`setShowProgressIndicator(boolean show)`
Sets whether the underlying workbench window has a progress indicator.
`void`
`setShowStatusLine(boolean show)`
Sets whether the underlying workbench window has a status line.
`void`
`setTitle(String title)`
Sets the title of the underlying workbench window.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getWindow

public IWorkbenchWindow getWindow()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns the underlying workbench window.

Specified by:
  `getWindow` in interface `IWorkbenchWindowConfigurer`
Returns:
  the workbench window

### getWorkbenchConfigurer

public IWorkbenchConfigurer getWorkbenchConfigurer()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns the workbench configurer.

Specified by:
  `getWorkbenchConfigurer` in interface `IWorkbenchWindowConfigurer`
Returns:
  the workbench configurer

### getTitle

public String getTitle()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns the title of the underlying workbench window.

Specified by:
  `getTitle` in interface `IWorkbenchWindowConfigurer`
Returns:
  the window title

### setTitle

public void setTitle(String title)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets the title of the underlying workbench window.

Specified by:
  `setTitle` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `title` - the window title

### getShowMenuBar

public boolean getShowMenuBar()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns whether the underlying workbench window has a menu bar.

The initial value is `true`.

Specified by:
  `getShowMenuBar` in interface `IWorkbenchWindowConfigurer`
Returns:
  `true` for a menu bar, and `false` for no menu bar

### setShowMenuBar

public void setShowMenuBar(boolean show)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets whether the underlying workbench window has a menu bar.

Specified by:
  `setShowMenuBar` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `show` - `true` for a menu bar, and `false` for no menu bar

### getShowCoolBar

public boolean getShowCoolBar()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns whether the underlying workbench window has a cool bar.

The initial value is `true`.

Specified by:
  `getShowCoolBar` in interface `IWorkbenchWindowConfigurer`
Returns:
  `true` for a cool bar, and `false` for no cool bar

### setShowCoolBar

public void setShowCoolBar(boolean show)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets whether the underlying workbench window has a cool bar.

Specified by:
  `setShowCoolBar` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `show` - `true` for a cool bar, and `false` for no cool bar

### getShowPerspectiveBar

public boolean getShowPerspectiveBar()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns whether the underlying workbench window has a perspective bar (the perspective bar provides buttons to quickly switch between perspectives).

The initial value is `false`.

Specified by:
  `getShowPerspectiveBar` in interface `IWorkbenchWindowConfigurer`
Returns:
  `true` for a perspective bar, and `false` for no perspective bar

### setShowPerspectiveBar

public void setShowPerspectiveBar(boolean show)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets whether the underlying workbench window has a perspective bar (the perspective bar provides buttons to quickly switch between perspectives).

Specified by:
  `setShowPerspectiveBar` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `show` - `true` for a perspective bar, and `false` for no perspective bar

### getShowStatusLine

public boolean getShowStatusLine()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns whether the underlying workbench window has a status line.

The initial value is `true`.

Specified by:
  `getShowStatusLine` in interface `IWorkbenchWindowConfigurer`
Returns:
  `true` for a status line, and `false` for no status line

### setShowStatusLine

public void setShowStatusLine(boolean show)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets whether the underlying workbench window has a status line.

Specified by:
  `setShowStatusLine` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `show` - `true` for a status line, and `false` for no status line

### getShowProgressIndicator

public boolean getShowProgressIndicator()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns whether the underlying workbench window has a progress indicator.

The initial value is `false`.

Specified by:
  `getShowProgressIndicator` in interface `IWorkbenchWindowConfigurer`
Returns:
  `true` for a progress indicator, and `false` for no progress indicator

### setShowProgressIndicator

public void setShowProgressIndicator(boolean show)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets whether the underlying workbench window has a progress indicator.

Specified by:
  `setShowProgressIndicator` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `show` - `true` for a progress indicator, and `false` for no progress indicator

### getData

public Object getData(String key)
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns the data associated with this workbench window at the given key.

Specified by:
  `getData` in interface `IWorkbenchWindowConfigurer`
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)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets the data associated with this workbench window at the given key.

Specified by:
  `setData` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `key` - the key
  `data` - the data, or `null` to delete existing data

### addEditorAreaTransfer

public void addEditorAreaTransfer(Transfer tranfer)
Description copied from interface: `IWorkbenchWindowConfigurer`
Adds the given drag and drop `Transfer` type to the ones supported for drag and drop on the editor area of this workbench window.

The workbench advisor would ordinarily call this method from the `preWindowOpen` callback. A newly-created workbench window supports no drag and drop transfer types. Adding `EditorInputTransfer.getInstance()` enables `IEditorInput`s 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.

Specified by:
  `addEditorAreaTransfer` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `tranfer` - a drag and drop transfer object
See Also:
  - `IWorkbenchWindowConfigurer.configureEditorAreaDropListener(DropTargetListener)`
  - `EditorInputTransfer`

### configureEditorAreaDropListener

public void configureEditorAreaDropListener(DropTargetListener dropTargetListener)
Description copied from interface: `IWorkbenchWindowConfigurer`
Configures the drop target listener for the editor area of this workbench window.

The workbench advisor ordinarily calls this method from the `preWindowOpen` callback. A newly-created workbench window has no configured drop target listener for its editor area.

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.

Specified by:
  `configureEditorAreaDropListener` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `dropTargetListener` - the drop target listener that will handle requests to drop an object on to the editor area of this window
See Also:
  - `IWorkbenchWindowConfigurer.addEditorAreaTransfer(Transfer)`

### getActionBarConfigurer

public IActionBarConfigurer getActionBarConfigurer()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns the action bar configurer for this workbench window.

Specified by:
  `getActionBarConfigurer` in interface `IWorkbenchWindowConfigurer`
Returns:
  the action bar configurer

### getShellStyle

public int getShellStyle()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns the style bits to use for the window's shell when it is created. The default is `SWT.SHELL_TRIM`.

Specified by:
  `getShellStyle` in interface `IWorkbenchWindowConfigurer`
Returns:
  the shell style bits

### setShellStyle

public void setShellStyle(int shellStyle)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets the style bits to use for the 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`.

For more details on the applicable shell style bits, see the documentation for `Shell`.

Specified by:
  `setShellStyle` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `shellStyle` - the shell style bits

### getInitialSize

public Point getInitialSize()
Description copied from interface: `IWorkbenchWindowConfigurer`
Returns the size to use for the window's shell when it is created.

Specified by:
  `getInitialSize` in interface `IWorkbenchWindowConfigurer`
Returns:
  the initial size to use for the shell

### setInitialSize

public void setInitialSize(Point size)
Description copied from interface: `IWorkbenchWindowConfigurer`
Sets the size to use for the 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`.

Specified by:
  `setInitialSize` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `size` - the initial size to use for the shell

### createDefaultContents

public void createDefaultContents(Shell shell)
Creates the default window contents.

Parameters:
  `shell` - the shell

### saveState

public IStatus saveState(IMemento memento)
Description copied from interface: `IWorkbenchWindowConfigurer`
Saves the current state of the window using the specified memento.

Specified by:
  `saveState` in interface `IWorkbenchWindowConfigurer`
Parameters:
  `memento` - the memento in which to save the window's state
Returns:
  a status object indicating whether the save was successful
See Also:
  - `IWorkbenchConfigurer.restoreWorkbenchWindow(IMemento)`