Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.forms.editor
Class SharedHeaderFormEditor


java.lang.Object
  extended by 

org.eclipse.core.commands.common.EventManager
      extended by 

org.eclipse.ui.part.WorkbenchPart
          extended by 

org.eclipse.ui.part.EditorPart
              extended by 

org.eclipse.ui.part.MultiPageEditorPart
                  extended by 

org.eclipse.ui.forms.editor.FormEditor
                      extended by 
org.eclipse.ui.forms.editor.SharedHeaderFormEditor
All Implemented Interfaces:
IAdaptable, IExecutableExtension, IPageChangeProvider, IEditorPart, ISaveablePart, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartOrientation

public abstract class SharedHeaderFormEditor
extends FormEditor

A variation of 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.

Since:
3.3

Field Summary
 
Fields inherited from class org.eclipse.ui.forms.editor. FormEditor
pages
 
Fields inherited from class org.eclipse.ui.part. MultiPageEditorPart
PAGE_CONTAINER_SITE
 
Fields inherited from interface org.eclipse.ui. IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui. IWorkbenchPart
PROP_TITLE
 
Constructor Summary
SharedHeaderFormEditor ()
          The default constructor.
 
Method Summary
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.
 
Methods inherited from class org.eclipse.ui.forms.editor. FormEditor
addPage, addPage, addPage, addPage, addPage, addPage, addPages, close, configurePage, createToolkit, editorDirtyStateChanged, findPage, getActiveEditor, getActivePageInstance, getCurrentPage, getSelectedPage, getToolkit, init, pageChange, removePage, selectReveal, setActivePage, setActivePage, updateActionBarContributor
 
Methods inherited from class org.eclipse.ui.part. MultiPageEditorPart
activateSite, addPageChangedListener, createPartControl, createSite, deactivateSite, findEditors, getActivePage, getAdapter, getContainer, getControl, getEditor, getPageCount, getPageImage, getPageSite, getPageText, handlePropertyChange, initializePageSwitching, removePageChangedListener, setActiveEditor, setControl, setPageImage, setPageText
 
Methods inherited from class org.eclipse.ui.part. EditorPart
checkSite, doSave, doSaveAs, getEditorInput, getEditorSite, getTitleToolTip, isSaveAsAllowed, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part. WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common. EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui. IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
 

Constructor Detail

SharedHeaderFormEditor

public SharedHeaderFormEditor()
The default constructor.

Method Detail

createPageContainer

protected 
Composite createPageContainer(
Composite parent)
Overrides 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.

Overrides:
createPageContainer in class FormEditor
Parameters:
parent - the page container parent
Returns:
the parent for this editor's container. Must not be null.
See Also:
MultiPageEditorPart.createPageContainer(org.eclipse.swt.widgets.Composite)

getHeaderForm

public 
IManagedForm getHeaderForm()
Returns the form that owns the shared header.

Returns:
the shared header

createPages

protected void createPages()
Description copied from class: FormEditor
Creates the common toolkit for this editor and adds pages to the editor.

Overrides:
createPages in class FormEditor
See Also:
FormEditor.addPages()

setActivePage

protected void setActivePage(int pageIndex)
Description copied from class: MultiPageEditorPart
Sets the currently active page.

Overrides:
setActivePage in class FormEditor
Parameters:
pageIndex - the index of the page to be activated; the index must be valid
See Also:
MultiPageEditorPart.setActivePage(int)

setFocus

public void setFocus()
Description copied from class: MultiPageEditorPart
The MultiPageEditor implementation of this IWorkbenchPart method sets focus on the active nested editor, if there is one.

Subclasses may extend or reimplement.

Specified by:
setFocus in interface IWorkbenchPart
Overrides:
setFocus in class MultiPageEditorPart

dispose

public void dispose()
Description copied from class: FormEditor
Disposes the pages and the toolkit after disposing the editor itself. Subclasses must call 'super' when reimplementing the method.

Specified by:
dispose in interface IWorkbenchPart
Overrides:
dispose in class FormEditor

isDirty

public boolean isDirty()
Description copied from class: FormEditor
Tests whether the editor is dirty by checking all the pages that implement IFormPage. If none of them is dirty, the method delegates further processing to super.isDirty().

Specified by:
isDirty in interface ISaveablePart
Overrides:
isDirty in class FormEditor
Returns:
true if any of the pages in the editor are dirty, false otherwise.

commitPages

protected void commitPages(boolean onSave)
Description copied from class: FormEditor
Commits all dirty pages in the editor. This method should be called as a first step of a 'save' operation.

Overrides:
commitPages in class FormEditor
Parameters:
onSave - true if commit is performed as part of the 'save' operation, false otherwise.

createHeaderContents

protected void createHeaderContents(
IManagedForm headerForm)
Subclasses should extend this method to configure the form that owns the shared header. If the header form will contain controls that can change the state of the editor, they should be wrapped in an IFormPart so that they can participate in the life cycle event management.

Parameters:
headerForm - the form that owns the shared header
See Also:
IFormPart

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire