Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ui.internal
Class EditorStack  view EditorStack download EditorStack.java

java.lang.Object
  extended byorg.eclipse.ui.internal.LayoutPart
      extended byorg.eclipse.ui.internal.PartStack
          extended byorg.eclipse.ui.internal.EditorStack
All Implemented Interfaces:
ILayoutContainer

public class EditorStack
extends PartStack

Represents a tab folder of editors. This layout part container only accepts EditorPane parts. TODO: Make PartStack non-abstract and delete this class. The differences between editors and views should be handled by the presentation or the editors/views themselves.


Field Summary
private  EditorSashContainer editorArea
           
private  WorkbenchPage page
           
private  org.eclipse.ui.internal.presentations.SystemMenuPinEditor pinEditorItem
           
private  org.eclipse.ui.internal.presentations.SystemMenuSize sizeItem
           
 
Fields inherited from class org.eclipse.ui.internal.PartStack
appearance, savedPresentationState
 
Fields inherited from class org.eclipse.ui.internal.LayoutPart
container, id, PROP_VISIBILITY
 
Constructor Summary
EditorStack(EditorSashContainer editorArea, WorkbenchPage page)
           
 
Method Summary
 void add(LayoutPart child)
          See IVisualContainer#add
protected  void add(LayoutPart newChild, java.lang.Object cookie)
          Add a part at a particular position
 void addSystemActions(org.eclipse.jface.action.IMenuManager menuManager)
           
protected  boolean allowsDrop(PartPane part)
           
 void becomeActiveWorkbook(boolean hasFocus)
           
protected  boolean canMoveFolder()
           
protected  void close(org.eclipse.ui.presentations.IPresentablePart[] parts)
           
 void createControl(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.presentations.StackPresentation presentation)
           
protected  void derefPart(LayoutPart toDeref)
           
 EditorSashContainer getEditorArea()
           
 EditorPane[] getEditors()
           
protected  WorkbenchPage getPage()
           
 org.eclipse.swt.widgets.Control[] getTabList()
           
 EditorPane getVisibleEditor()
           
 boolean isActiveWorkbook()
           
 boolean isCloseable(org.eclipse.ui.presentations.IPresentablePart part)
           
 boolean isMoveable(org.eclipse.ui.presentations.IPresentablePart part)
           
static EditorStack newEditorWorkbook(EditorSashContainer editorArea, WorkbenchPage page)
          Factory method for editor workbooks.
 void removeAll()
           
 org.eclipse.core.runtime.IStatus restoreState(org.eclipse.ui.IMemento memento)
           
 org.eclipse.core.runtime.IStatus saveState(org.eclipse.ui.IMemento memento)
           
 void setFocus()
          Sets focus to this part.
 void setSelection(LayoutPart part)
           
 void setVisibleEditor(EditorPane editorPane)
           
 void showVisibleEditor()
           
 boolean supportsState(int state)
           
 void testInvariants()
          Tests the integrity of this object.
protected  void updateActions()
          Subclasses should override this method to update the enablement state of their actions
 
Methods inherited from class org.eclipse.ui.internal.PartStack
allowsAutoFocus, appendToGroupIfPossible, close, createControl, describeLayout, dispose, dragStart, findSashes, getActive, getBounds, getChildren, getControl, getFactory, getItemCount, getMinimumHeight, getPaneFor, getParent, getPresentableParts, getPresentation, getPresentationSite, getSavedPresentationState, getSelectedPart, getTabList, getVisiblePart, isDisposed, remove, reparent, replace, resizesVertically, savePresentationState, setActive, setBounds, setState, setZoomed, showPaneMenu, showPartList, showSystemMenu
 
Methods inherited from class org.eclipse.ui.internal.LayoutPart
addPropertyChangeListener, getCompoundId, getContainer, getID, getMinimumWidth, getPart, getPlaceHolderId, getPresentablePart, getPropertyListeners, getShellActivated, getSize, getWindow, getWorkbenchWindow, isCompressible, isVisible, moveAbove, removePropertyChangeListener, setContainer, setID, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editorArea

private EditorSashContainer editorArea

page

private WorkbenchPage page

sizeItem

private org.eclipse.ui.internal.presentations.SystemMenuSize sizeItem

pinEditorItem

private org.eclipse.ui.internal.presentations.SystemMenuPinEditor pinEditorItem
Constructor Detail

EditorStack

public EditorStack(EditorSashContainer editorArea,
                   WorkbenchPage page)
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent,
                          org.eclipse.ui.presentations.StackPresentation presentation)
Overrides:
createControl in class PartStack

getPage

protected WorkbenchPage getPage()
Overrides:
getPage in class PartStack

addSystemActions

public void addSystemActions(org.eclipse.jface.action.IMenuManager menuManager)
Specified by:
addSystemActions in class PartStack

isMoveable

public boolean isMoveable(org.eclipse.ui.presentations.IPresentablePart part)
Specified by:
isMoveable in class PartStack

isCloseable

public boolean isCloseable(org.eclipse.ui.presentations.IPresentablePart part)
Specified by:
isCloseable in class PartStack

supportsState

public boolean supportsState(int state)
Specified by:
supportsState in class PartStack

newEditorWorkbook

public static EditorStack newEditorWorkbook(EditorSashContainer editorArea,
                                            WorkbenchPage page)
Factory method for editor workbooks.


add

protected void add(LayoutPart newChild,
                   java.lang.Object cookie)
Description copied from class: PartStack
Add a part at a particular position

Overrides:
add in class PartStack

add

public void add(LayoutPart child)
See IVisualContainer#add

Specified by:
add in interface ILayoutContainer
Overrides:
add in class PartStack

updateActions

protected void updateActions()
Description copied from class: PartStack
Subclasses should override this method to update the enablement state of their actions

Overrides:
updateActions in class PartStack

getTabList

public org.eclipse.swt.widgets.Control[] getTabList()

removeAll

public void removeAll()

isActiveWorkbook

public boolean isActiveWorkbook()

becomeActiveWorkbook

public void becomeActiveWorkbook(boolean hasFocus)

getEditors

public EditorPane[] getEditors()

getEditorArea

public EditorSashContainer getEditorArea()

getVisibleEditor

public EditorPane getVisibleEditor()

setSelection

public void setSelection(LayoutPart part)
Overrides:
setSelection in class PartStack

setVisibleEditor

public void setVisibleEditor(EditorPane editorPane)

showVisibleEditor

public void showVisibleEditor()

canMoveFolder

protected boolean canMoveFolder()
Specified by:
canMoveFolder in class PartStack

derefPart

protected void derefPart(LayoutPart toDeref)
Specified by:
derefPart in class PartStack

allowsDrop

protected boolean allowsDrop(PartPane part)
Specified by:
allowsDrop in class PartStack

setFocus

public void setFocus()
Description copied from class: LayoutPart
Sets focus to this part.

Overrides:
setFocus in class LayoutPart

close

protected void close(org.eclipse.ui.presentations.IPresentablePart[] parts)
Overrides:
close in class PartStack

testInvariants

public void testInvariants()
Description copied from class: PartStack
Tests the integrity of this object. Throws an exception if the object's state is invalid. For use in test suites.

Overrides:
testInvariants in class PartStack

restoreState

public org.eclipse.core.runtime.IStatus restoreState(org.eclipse.ui.IMemento memento)
Overrides:
restoreState in class PartStack

saveState

public org.eclipse.core.runtime.IStatus saveState(org.eclipse.ui.IMemento memento)
Overrides:
saveState in class PartStack