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 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)
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addEditorAreaTransfer(Transfer transfer)
Adds the given drag and dropTransfer
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.Menu
createMenuBar()
Deprecated.This method is no longer used.Control
createPageComposite(Composite parent)
Deprecated.This method is no longer used.Control
createStatusLineControl(Composite parent)
Deprecated.This method is no longer used.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 viewsboolean
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 viewsvoid
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.
-
-
-
Method Detail
-
getWindow
IWorkbenchWindow getWindow()
Returns the underlying workbench window.- Returns:
- the workbench window
-
getWorkbenchConfigurer
IWorkbenchConfigurer getWorkbenchConfigurer()
Returns the workbench configurer.- Returns:
- the workbench configurer
-
getActionBarConfigurer
IActionBarConfigurer getActionBarConfigurer()
Returns the action bar configurer for this workbench window.- Returns:
- the action bar configurer
-
getTitle
String getTitle()
Returns the title of the underlying workbench window.- Returns:
- the window title
-
setTitle
void setTitle(String title)
Sets the title of the underlying workbench window.- Parameters:
title
- the window title
-
getShowMenuBar
boolean getShowMenuBar()
Returns whether the underlying workbench window has a menu bar.The initial value is
true
.- Returns:
true
for a menu bar, andfalse
for no menu bar
-
setShowMenuBar
void setShowMenuBar(boolean show)
Sets whether the underlying workbench window has a menu bar.- Parameters:
show
-true
for a menu bar, andfalse
for no menu bar
-
getShowCoolBar
boolean getShowCoolBar()
Returns whether the underlying workbench window has a cool bar.The initial value is
true
.- Returns:
true
for a cool bar, andfalse
for no cool bar
-
setShowCoolBar
void setShowCoolBar(boolean show)
Sets whether the underlying workbench window has a cool bar.- Parameters:
show
-true
for a cool bar, andfalse
for no cool bar
-
getShowStatusLine
boolean getShowStatusLine()
Returns whether the underlying workbench window has a status line.The initial value is
true
.- Returns:
true
for a status line, andfalse
for no status line
-
setShowStatusLine
void setShowStatusLine(boolean show)
Sets whether the underlying workbench window has a status line.- Parameters:
show
-true
for a status line, andfalse
for no status line
-
getShowPerspectiveBar
boolean getShowPerspectiveBar()
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
.- Returns:
true
for a perspective bar, andfalse
for no perspective bar
-
setShowPerspectiveBar
void setShowPerspectiveBar(boolean show)
Sets whether the underlying workbench window has a perspective bar (the perspective bar provides buttons to quickly switch between perspectives).- Parameters:
show
-true
for a perspective bar, andfalse
for no perspective bar
-
getShowFastViewBars
@Deprecated boolean getShowFastViewBars()
Deprecated.discontinued support for fast viewsNo longer used by the platform- Returns:
true
for fast view bars, andfalse
for no fast view bars- Restriction:
- This method is not intended to be referenced by clients. This method is planned to be deleted, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=485835
-
setShowFastViewBars
@Deprecated void setShowFastViewBars(boolean enable)
Deprecated.discontinued support for fast viewsNo longer used by the platform- Parameters:
enable
-true
for fast view bars, andfalse
for no fast view bars- Restriction:
- This method is not intended to be referenced by clients. This method is planned to be deleted, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=485835
-
getShowProgressIndicator
boolean getShowProgressIndicator()
Returns whether the underlying workbench window has a progress indicator.The initial value is
false
.- Returns:
true
for a progress indicator, andfalse
for no progress indicator
-
setShowProgressIndicator
void setShowProgressIndicator(boolean show)
Sets whether the underlying workbench window has a progress indicator.- Parameters:
show
-true
for a progress indicator, andfalse
for no progress indicator
-
getShellStyle
int getShellStyle()
Returns the style bits to use for the window's shell when it is created. The default isSWT.SHELL_TRIM
.- Returns:
- the shell style bits
-
setShellStyle
void setShellStyle(int shellStyle)
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 thepreWindowOpen
callback onWorkbenchAdvisor
.For more details on the applicable shell style bits, see the documentation for
Shell
.- Parameters:
shellStyle
- the shell style bits
-
getInitialSize
Point getInitialSize()
Returns the size to use for the window's shell when it is created.- Returns:
- the initial size to use for the shell
-
setInitialSize
void setInitialSize(Point initialSize)
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 thepreWindowOpen
callback onWorkbenchAdvisor
.- Parameters:
initialSize
- the initial size to use for the shell
-
getData
Object getData(String key)
Returns the data associated with this workbench window at the given key.- Parameters:
key
- the key- Returns:
- the data, or
null
if there is no data at the given key
-
setData
void setData(String key, Object data)
Sets the data associated with this workbench window at the given key.- Parameters:
key
- the keydata
- the data, ornull
to delete existing data
-
addEditorAreaTransfer
void addEditorAreaTransfer(Transfer transfer)
Adds the given drag and dropTransfer
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. AddingEditorInputTransfer.getInstance()
enablesIEditorInput
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 (withconfigureEditorAreaDropListener
) capable of handling any of those transfer types.- Parameters:
transfer
- a drag and drop transfer object- See Also:
configureEditorAreaDropListener(org.eclipse.swt.dnd.DropTargetListener)
,EditorInputTransfer
-
configureEditorAreaDropListener
void configureEditorAreaDropListener(DropTargetListener dropTargetListener)
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 (withconfigureEditorAreaDropListener
) capable of handling any of those transfer types.- Parameters:
dropTargetListener
- the drop target listener that will handle requests to drop an object on to the editor area of this window- See Also:
addEditorAreaTransfer(org.eclipse.swt.dnd.Transfer)
-
createMenuBar
@Deprecated Menu createMenuBar()
Deprecated.This method is no longer used. Applications now define workbench window contents in their application model.No longer used by the platform- Returns:
- the menu bar, suitable for setting in the shell extended by clients.
- Restriction:
- This method is not intended to be referenced by clients. This method is planned to be deleted, see ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=485835
-
createCoolBarControl
@Deprecated Control createCoolBarControl(Composite parent)
Deprecated.This method is no longer used. Applications now define workbench window contents in their application model.No longer used by the platform- Parameters:
parent
- the parent composite- Returns:
- the cool bar control, suitable for laying out in the parent
- Restriction:
- This method is not intended to be referenced by clients. This method is planned to be deleted, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=485835
-
createStatusLineControl
@Deprecated Control createStatusLineControl(Composite parent)
Deprecated.This method is no longer used. Applications now define workbench window contents in their application model.No longer used by the platform- Parameters:
parent
- the parent composite- Returns:
- the status line control, suitable for laying out in the parent
- Restriction:
- This method is not intended to be referenced by clients. This method is planned to be deleted, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=485835
-
createPageComposite
@Deprecated Control createPageComposite(Composite parent)
Deprecated.This method is no longer used. Applications now define workbench window contents in their application model.No longer used by the platform- Parameters:
parent
- the parent composite- Returns:
- the page composite, suitable for laying out in the parent
- Restriction:
- This method is not intended to be referenced by clients. This method is planned to be deleted, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=485835
-
saveState
IStatus saveState(IMemento memento)
Saves the current state of the window using the specified memento.- Parameters:
memento
- the memento in which to save the window's state- Returns:
- a status object indicating whether the save was successful
- Since:
- 3.1
- See Also:
IWorkbenchConfigurer.restoreWorkbenchWindow(IMemento)
-
-