public abstract class SharedHeaderFormEditor extends FormEditor
FormEditor, this editor has a stable header that does
not change when pages are switched. Pages that are added to this editor
should not have the title or image set.pagesPAGE_CONTAINER_SITEPROP_DIRTY, PROP_INPUTPROP_TITLE| Constructor and Description |
|---|
SharedHeaderFormEditor()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
commitPages(boolean onSave)
Commits all dirty pages in the editor.
|
protected void |
createHeaderContents(IManagedForm headerForm)
Subclasses should extend this method to configure the form that owns the
shared header.
|
protected Composite |
createPageContainer(Composite parent)
Overrides
super to create a form in which to host the tab
folder. |
protected void |
createPages()
Creates the common toolkit for this editor and adds pages to the editor.
|
void |
dispose()
Disposes the pages and the toolkit after disposing the editor itself.
|
IManagedForm |
getHeaderForm()
Returns the form that owns the shared header.
|
boolean |
isDirty()
Tests whether the editor is dirty by checking all the pages that
implement
IFormPage. |
protected void |
setActivePage(int pageIndex)
Sets the currently active page.
|
void |
setFocus()
The
MultiPageEditor implementation of this
IWorkbenchPart method sets focus on the active nested
editor, if there is one. |
addPage, addPage, addPage, addPage, addPage, addPage, addPages, close, configurePage, createToolkit, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, init, pageChange, removePage, selectReveal, setActivePage, setActivePage, updateActionBarContributoractivateSite, addPageChangedListener, createPartControl, createSite, deactivateSite, findEditors, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, handlePropertyChange, initializePageSwitching, removePageChangedListener, setActiveEditor, setControl, setPageImage, setPageTextcheckSite, doSave, doSaveAs, getEditorInput, getEditorSite, getTitleToolTip, isSaveAsAllowed, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartNameaddPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusyaddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyListener, getSite, getTitle, getTitleImage, removePropertyListenerprotected Composite createPageContainer(Composite parent)
super to create a form in which to host the tab
folder. This form will be responsible for creating a common form header.
Child pages should not have a header of their own.createPageContainer in class FormEditorparent - the page container parentnull.MultiPageEditorPart.createPageContainer(org.eclipse.swt.widgets.Composite)public IManagedForm getHeaderForm()
protected void createPages()
FormEditorcreatePages in class FormEditorFormEditor.addPages()protected void setActivePage(int pageIndex)
MultiPageEditorPartsetActivePage in class FormEditorpageIndex - the index of the page to be activated; the index must be validMultiPageEditorPart.setActivePage(int)public void setFocus()
MultiPageEditorPartMultiPageEditor implementation of this
IWorkbenchPart method sets focus on the active nested
editor, if there is one.
Subclasses may extend or reimplement.
setFocus in interface IWorkbenchPartsetFocus in class MultiPageEditorPartpublic void dispose()
FormEditordispose in interface IWorkbenchPartdispose in class FormEditorpublic boolean isDirty()
FormEditorIFormPage. If none of them is dirty, the method
delegates further processing to super.isDirty().isDirty in interface ISaveablePartisDirty in class FormEditortrue if any of the pages in the editor are dirty,
false otherwise.protected void commitPages(boolean onSave)
FormEditorcommitPages in class FormEditoronSave - true if commit is performed as part
of the 'save' operation, false otherwise.protected void createHeaderContents(IManagedForm headerForm)
headerForm - the form that owns the shared headerIFormPart
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.