public interface IWorkbenchWindowConfigurer
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 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.
IWorkbenchConfigurer.getWindowConfigurer(org.eclipse.ui.IWorkbenchWindow)
,
WorkbenchAdvisor.preWindowOpen(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
Modifier and Type | Method and Description |
---|---|
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 window. |
void |
configureEditorAreaDropListener(DropTargetListener dropTargetListener)
Configures the drop target listener for the editor area of this workbench window.
|
Control |
createCoolBarControl(Composite parent)
Deprecated.
This method is no longer used. Applications now define
workbench window contents in their application model.
|
Menu |
createMenuBar()
Deprecated.
This method is no longer used. Applications now define
workbench window contents in their application model.
|
Control |
createPageComposite(Composite parent)
Deprecated.
This method is no longer used. Applications now define
workbench window contents in their application model.
|
Control |
createStatusLineControl(Composite parent)
Deprecated.
This method is no longer used. Applications now define
workbench window contents in their application model.
|
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 |
getShowFastViewBars()
Deprecated.
discontinued support for fast views
|
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 initialSize)
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 |
setShowFastViewBars(boolean enable)
Deprecated.
discontinued support for fast views
|
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.
|
IWorkbenchWindow getWindow()
IWorkbenchConfigurer getWorkbenchConfigurer()
IActionBarConfigurer getActionBarConfigurer()
String getTitle()
void setTitle(String title)
title
- the window titleboolean getShowMenuBar()
The initial value is true
.
true
for a menu bar, and false
for no menu barvoid setShowMenuBar(boolean show)
show
- true
for a menu bar, and false
for no menu barboolean getShowCoolBar()
The initial value is true
.
true
for a cool bar, and false
for no cool barvoid setShowCoolBar(boolean show)
show
- true
for a cool bar, and false
for no cool barboolean getShowStatusLine()
The initial value is true
.
true
for a status line, and false
for no status linevoid setShowStatusLine(boolean show)
show
- true
for a status line, and false
for no status lineboolean getShowPerspectiveBar()
The initial value is false
.
true
for a perspective bar, and false
for no perspective barvoid setShowPerspectiveBar(boolean show)
show
- true
for a perspective bar, and
false
for no perspective bar@Deprecated boolean getShowFastViewBars()
The initial value is false
.
true
for fast view bars, and
false
for no fast view bars@Deprecated void setShowFastViewBars(boolean enable)
enable
- true
for fast view bars, and
false
for no fast view barsboolean getShowProgressIndicator()
The initial value is false
.
true
for a progress indicator, and false
for no progress indicatorvoid setShowProgressIndicator(boolean show)
show
- true
for a progress indicator, and false
for no progress indicatorint getShellStyle()
SWT.SHELL_TRIM
.void setShellStyle(int shellStyle)
preWindowOpen
callback on WorkbenchAdvisor
.
For more details on the applicable shell style bits, see the
documentation for Shell
.
shellStyle
- the shell style bitsPoint getInitialSize()
void setInitialSize(Point initialSize)
preWindowOpen
callback on WorkbenchAdvisor
.initialSize
- the initial size to use for the shellObject getData(String key)
key
- the keynull
if there is no data at the given
keyvoid setData(String key, Object data)
key
- the keydata
- the data, or null
to delete existing datavoid addEditorAreaTransfer(Transfer transfer)
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.
transfer
- a drag and drop transfer objectconfigureEditorAreaDropListener(org.eclipse.swt.dnd.DropTargetListener)
,
EditorInputTransfer
void configureEditorAreaDropListener(DropTargetListener dropTargetListener)
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.
dropTargetListener
- the drop target listener that will handle
requests to drop an object on to the editor area of this windowaddEditorAreaTransfer(org.eclipse.swt.dnd.Transfer)
@Deprecated Menu createMenuBar()
This should only be called if the advisor is defining custom window
contents in createWindowContents
, and may only be called
once. The caller must set it in the shell using
Shell.setMenuBar(Menu)
but must not make add, remove or
change items in the result. The menu bar is populated by the window's
menu manager. The application can add to the menu manager in the
advisor's fillActionBars
method instead.
@Deprecated Control createCoolBarControl(Composite parent)
This should only be called if the advisor is defining custom window
contents in createWindowContents
, and may only be called
once. The caller must lay out the cool bar appropriately within the
parent, but must not add, remove or change items in the result (hence the
return type of Control
). The cool bar is populated by the
window's cool bar manager. The application can add to the cool bar
manager in the advisor's fillActionBars
method instead.
parent
- the parent composite@Deprecated Control createStatusLineControl(Composite parent)
This should only be called if the advisor is defining custom window
contents in createWindowContents
, and may only be called
once. 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
window's status line manager. The application can add to the status line
manager in the advisor's fillActionBars
method instead.
parent
- the parent composite@Deprecated Control createPageComposite(Composite parent)
This should only be called if the advisor is defining custom window
contents in createWindowContents
, and may only be called
once. 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.
parent
- the parent compositeIStatus saveState(IMemento memento)
memento
- the memento in which to save the window's stateIWorkbenchConfigurer.restoreWorkbenchWindow(IMemento)
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.