Class WorkbenchWindowConfigurer
- All Implemented Interfaces:
IWorkbenchWindowConfigurer
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 TypeMethodDescriptionvoidaddEditorAreaTransfer(Transfer tranfer) Adds the given drag and dropTransfertype to the ones supported for drag and drop on the editor area of this workbench window.voidconfigureEditorAreaDropListener(DropTargetListener dropTargetListener) Configures the drop target listener for the editor area of this workbench window.voidcreateDefaultContents(Shell shell) Creates the default window contents.Returns the action bar configurer for this workbench window.Returns the data associated with this workbench window at the given key.Returns the size to use for the window's shell when it is created.intReturns the style bits to use for the window's shell when it is created.booleanReturns whether the underlying workbench window has a cool bar.booleanReturns whether the underlying workbench window has a menu bar.booleanReturns whether the underlying workbench window has a perspective bar (the perspective bar provides buttons to quickly switch between perspectives).booleanReturns whether the underlying workbench window has a progress indicator.booleanReturns whether the underlying workbench window has a status line.getTitle()Returns the title of the underlying workbench window.Returns the underlying workbench window.Returns the workbench configurer.Saves the current state of the window using the specified memento.voidSets the data associated with this workbench window at the given key.voidsetInitialSize(Point size) Sets the size to use for the window's shell when it is created.voidsetShellStyle(int shellStyle) Sets the style bits to use for the window's shell when it is created.voidsetShowCoolBar(boolean show) Sets whether the underlying workbench window has a cool bar.voidsetShowMenuBar(boolean show) Sets whether the underlying workbench window has a menu bar.voidsetShowPerspectiveBar(boolean show) Sets whether the underlying workbench window has a perspective bar (the perspective bar provides buttons to quickly switch between perspectives).voidsetShowProgressIndicator(boolean show) Sets whether the underlying workbench window has a progress indicator.voidsetShowStatusLine(boolean show) Sets whether the underlying workbench window has a status line.voidSets the title of the underlying workbench window.
-
Method Details
-
getWindow
Description copied from interface:IWorkbenchWindowConfigurerReturns the underlying workbench window.- Specified by:
getWindowin interfaceIWorkbenchWindowConfigurer- Returns:
- the workbench window
-
getWorkbenchConfigurer
Description copied from interface:IWorkbenchWindowConfigurerReturns the workbench configurer.- Specified by:
getWorkbenchConfigurerin interfaceIWorkbenchWindowConfigurer- Returns:
- the workbench configurer
-
getTitle
Description copied from interface:IWorkbenchWindowConfigurerReturns the title of the underlying workbench window.- Specified by:
getTitlein interfaceIWorkbenchWindowConfigurer- Returns:
- the window title
-
setTitle
Description copied from interface:IWorkbenchWindowConfigurerSets the title of the underlying workbench window.- Specified by:
setTitlein interfaceIWorkbenchWindowConfigurer- Parameters:
title- the window title
-
getShowMenuBar
public boolean getShowMenuBar()Description copied from interface:IWorkbenchWindowConfigurerReturns whether the underlying workbench window has a menu bar.The initial value is
true.- Specified by:
getShowMenuBarin interfaceIWorkbenchWindowConfigurer- Returns:
truefor a menu bar, andfalsefor no menu bar
-
setShowMenuBar
public void setShowMenuBar(boolean show) Description copied from interface:IWorkbenchWindowConfigurerSets whether the underlying workbench window has a menu bar.- Specified by:
setShowMenuBarin interfaceIWorkbenchWindowConfigurer- Parameters:
show-truefor a menu bar, andfalsefor no menu bar
-
getShowCoolBar
public boolean getShowCoolBar()Description copied from interface:IWorkbenchWindowConfigurerReturns whether the underlying workbench window has a cool bar.The initial value is
true.- Specified by:
getShowCoolBarin interfaceIWorkbenchWindowConfigurer- Returns:
truefor a cool bar, andfalsefor no cool bar
-
setShowCoolBar
public void setShowCoolBar(boolean show) Description copied from interface:IWorkbenchWindowConfigurerSets whether the underlying workbench window has a cool bar.- Specified by:
setShowCoolBarin interfaceIWorkbenchWindowConfigurer- Parameters:
show-truefor a cool bar, andfalsefor no cool bar
-
getShowPerspectiveBar
public boolean getShowPerspectiveBar()Description copied from interface:IWorkbenchWindowConfigurerReturns 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:
getShowPerspectiveBarin interfaceIWorkbenchWindowConfigurer- Returns:
truefor a perspective bar, andfalsefor no perspective bar
-
setShowPerspectiveBar
public void setShowPerspectiveBar(boolean show) Description copied from interface:IWorkbenchWindowConfigurerSets whether the underlying workbench window has a perspective bar (the perspective bar provides buttons to quickly switch between perspectives).- Specified by:
setShowPerspectiveBarin interfaceIWorkbenchWindowConfigurer- Parameters:
show-truefor a perspective bar, andfalsefor no perspective bar
-
getShowStatusLine
public boolean getShowStatusLine()Description copied from interface:IWorkbenchWindowConfigurerReturns whether the underlying workbench window has a status line.The initial value is
true.- Specified by:
getShowStatusLinein interfaceIWorkbenchWindowConfigurer- Returns:
truefor a status line, andfalsefor no status line
-
setShowStatusLine
public void setShowStatusLine(boolean show) Description copied from interface:IWorkbenchWindowConfigurerSets whether the underlying workbench window has a status line.- Specified by:
setShowStatusLinein interfaceIWorkbenchWindowConfigurer- Parameters:
show-truefor a status line, andfalsefor no status line
-
getShowProgressIndicator
public boolean getShowProgressIndicator()Description copied from interface:IWorkbenchWindowConfigurerReturns whether the underlying workbench window has a progress indicator.The initial value is
false.- Specified by:
getShowProgressIndicatorin interfaceIWorkbenchWindowConfigurer- Returns:
truefor a progress indicator, andfalsefor no progress indicator
-
setShowProgressIndicator
public void setShowProgressIndicator(boolean show) Description copied from interface:IWorkbenchWindowConfigurerSets whether the underlying workbench window has a progress indicator.- Specified by:
setShowProgressIndicatorin interfaceIWorkbenchWindowConfigurer- Parameters:
show-truefor a progress indicator, andfalsefor no progress indicator
-
getData
Description copied from interface:IWorkbenchWindowConfigurerReturns the data associated with this workbench window at the given key.- Specified by:
getDatain interfaceIWorkbenchWindowConfigurer- Parameters:
key- the key- Returns:
- the data, or
nullif there is no data at the given key
-
setData
Description copied from interface:IWorkbenchWindowConfigurerSets the data associated with this workbench window at the given key.- Specified by:
setDatain interfaceIWorkbenchWindowConfigurer- Parameters:
key- the keydata- the data, ornullto delete existing data
-
addEditorAreaTransfer
Description copied from interface:IWorkbenchWindowConfigurerAdds the given drag and dropTransfertype 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
preWindowOpencallback. A newly-created workbench window supports no drag and drop transfer types. AddingEditorInputTransfer.getInstance()enablesIEditorInputs 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.- Specified by:
addEditorAreaTransferin interfaceIWorkbenchWindowConfigurer- Parameters:
tranfer- a drag and drop transfer object- See Also:
-
configureEditorAreaDropListener
Description copied from interface:IWorkbenchWindowConfigurerConfigures the drop target listener for the editor area of this workbench window.The workbench advisor ordinarily calls this method from the
preWindowOpencallback. 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.- Specified by:
configureEditorAreaDropListenerin interfaceIWorkbenchWindowConfigurer- Parameters:
dropTargetListener- the drop target listener that will handle requests to drop an object on to the editor area of this window- See Also:
-
getActionBarConfigurer
Description copied from interface:IWorkbenchWindowConfigurerReturns the action bar configurer for this workbench window.- Specified by:
getActionBarConfigurerin interfaceIWorkbenchWindowConfigurer- Returns:
- the action bar configurer
-
getShellStyle
public int getShellStyle()Description copied from interface:IWorkbenchWindowConfigurerReturns the style bits to use for the window's shell when it is created. The default isSWT.SHELL_TRIM.- Specified by:
getShellStylein interfaceIWorkbenchWindowConfigurer- Returns:
- the shell style bits
-
setShellStyle
public void setShellStyle(int shellStyle) Description copied from interface:IWorkbenchWindowConfigurerSets 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 thepreWindowOpencallback onWorkbenchAdvisor.For more details on the applicable shell style bits, see the documentation for
Shell.- Specified by:
setShellStylein interfaceIWorkbenchWindowConfigurer- Parameters:
shellStyle- the shell style bits
-
getInitialSize
Description copied from interface:IWorkbenchWindowConfigurerReturns the size to use for the window's shell when it is created.- Specified by:
getInitialSizein interfaceIWorkbenchWindowConfigurer- Returns:
- the initial size to use for the shell
-
setInitialSize
Description copied from interface:IWorkbenchWindowConfigurerSets 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 thepreWindowOpencallback onWorkbenchAdvisor.- Specified by:
setInitialSizein interfaceIWorkbenchWindowConfigurer- Parameters:
size- the initial size to use for the shell
-
createDefaultContents
Creates the default window contents.- Parameters:
shell- the shell
-
saveState
Description copied from interface:IWorkbenchWindowConfigurerSaves the current state of the window using the specified memento.- Specified by:
saveStatein interfaceIWorkbenchWindowConfigurer- Parameters:
memento- the memento in which to save the window's state- Returns:
- a status object indicating whether the save was successful
- See Also:
-