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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.eclipse.ui.internal.LayoutPart
      extended byorg.eclipse.ui.internal.PartSashContainer
          extended byorg.eclipse.ui.internal.EditorSashContainer
All Implemented Interfaces:
org.eclipse.ui.internal.dnd.IDragOverListener, ILayoutContainer

public class EditorSashContainer
extends PartSashContainer

Represents the area set aside for editor workbooks. This container only accepts EditorStack and PartSash as layout parts. Note no views are allowed within this container.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.ui.internal.PartSashContainer
PartSashContainer.RelationshipInfo
 
Field Summary
private  EditorStack activeEditorWorkbook
           
private static java.lang.String DEFAULT_WORKBOOK_ID
           
private  org.eclipse.swt.dnd.DropTarget dropTarget
           
private  java.util.ArrayList editorWorkbooks
           
private  WorkbenchPage page
           
 
Fields inherited from class org.eclipse.ui.internal.PartSashContainer
active, children, parent, resizeListener, root, unzoomRoot
 
Fields inherited from class org.eclipse.ui.internal.LayoutPart
container, id, PROP_VISIBILITY
 
Constructor Summary
EditorSashContainer(java.lang.String editorId, WorkbenchPage page)
           
 
Method Summary
private  void addDropSupport()
           
 void addEditor(EditorPane pane)
          Add an editor to the active workbook.
 boolean allowsAutoFocus()
          When a layout part closes, focus will return to the previously active part.
protected  void childAdded(LayoutPart child)
          Notification that a child layout part has been added to the container.
protected  void childRemoved(LayoutPart child)
          Notification that a child layout part has been removed from the container.
 void createControl(org.eclipse.swt.widgets.Composite parent)
          Creates the SWT control
protected  EditorStack createDefaultWorkbook()
           
protected  org.eclipse.swt.widgets.Composite createParent(org.eclipse.swt.widgets.Composite parentWidget)
          Subclasses override this method to specify the composite to use to parent all children layout parts it contains.
protected  PartStack createStack()
           
 void dispose()
          Dispose of the editor area.
protected  void disposeParent()
          Subclasses override this method to dispose of any swt resources created during createParent.
 void findSashes(LayoutPart pane, PartPane.Sashes sashes)
          Find the sashs around the specified part.
 EditorStack getActiveWorkbook()
          Return the editor workbook which is active.
 java.lang.String getActiveWorkbookID()
          Return the editor workbook id which is active.
(package private)  org.eclipse.swt.dnd.DropTarget getDropTarget()
           
 int getEditorWorkbookCount()
          Return the all the editor workbooks.
 java.util.ArrayList getEditorWorkbooks()
          Return the all the editor workbooks.
protected  LayoutPart getVisiblePart(ILayoutContainer container)
           
protected  boolean isActiveWorkbook(EditorStack workbook)
          Return true is the workbook specified is the active one.
 boolean isCompressible()
           
 boolean isPaneType(LayoutPart toTest)
           
 boolean isStackType(LayoutPart toTest)
          Returns true iff this PartSashContainer allows its parts to be stacked onto the given container.
 void removeAllEditors()
          Remove all the editors
 void removeEditor(EditorPane pane)
          Remove an editor from its' workbook.
 org.eclipse.core.runtime.IStatus restorePresentationState(org.eclipse.ui.IMemento areaMem)
          Restore the presentation state.
 org.eclipse.core.runtime.IStatus restoreState(org.eclipse.ui.IMemento memento)
           
 org.eclipse.core.runtime.IStatus saveState(org.eclipse.ui.IMemento memento)
           
 void setActiveWorkbook(EditorStack newWorkbook, boolean hasFocus)
          Set the editor workbook which is active.
 void setActiveWorkbookFromID(java.lang.String id)
          Set the editor workbook which is active.
protected  void setVisiblePart(ILayoutContainer container, LayoutPart visiblePart)
           
 void updateTabList()
          Updates the editor area's tab list to include the active editor and its tab.
 
Methods inherited from class org.eclipse.ui.internal.PartSashContainer
add, add, add, addChild, addChildForPlaceholder, addEnhanced, allowsBorder, computeRelation, derefPart, describeLayout, disposeSashes, drag, dropObject, findBottomRight, getBounds, getChildren, getControl, getDockingRatio, getLayoutTree, getMinimumHeight, getMinimumWidth, getPage, getParent, getVisibleChildrenCount, isChild, isZoomed, measureTree, remove, replace, setBounds, stack, testInvariants, zoomIn, zoomOut
 
Methods inherited from class org.eclipse.ui.internal.LayoutPart
addPropertyChangeListener, getCompoundId, getContainer, getID, getPart, getPlaceHolderId, getPresentablePart, getPropertyListeners, getShellActivated, getSize, getWindow, getWorkbenchWindow, isVisible, moveAbove, removePropertyChangeListener, reparent, resizesVertically, setContainer, setFocus, setID, setVisible, setZoomed
 
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.internal.ILayoutContainer
setZoomed
 

Field Detail

DEFAULT_WORKBOOK_ID

private static final java.lang.String DEFAULT_WORKBOOK_ID
See Also:
Constant Field Values

editorWorkbooks

private java.util.ArrayList editorWorkbooks

activeEditorWorkbook

private EditorStack activeEditorWorkbook

dropTarget

private org.eclipse.swt.dnd.DropTarget dropTarget

page

private WorkbenchPage page
Constructor Detail

EditorSashContainer

public EditorSashContainer(java.lang.String editorId,
                           WorkbenchPage page)
Method Detail

addEditor

public void addEditor(EditorPane pane)
Add an editor to the active workbook.


childAdded

protected void childAdded(LayoutPart child)
Notification that a child layout part has been added to the container. Subclasses may override this method to perform any container specific work.

Specified by:
childAdded in class PartSashContainer

childRemoved

protected void childRemoved(LayoutPart child)
Notification that a child layout part has been removed from the container. Subclasses may override this method to perform any container specific work.

Specified by:
childRemoved in class PartSashContainer

createDefaultWorkbook

protected EditorStack createDefaultWorkbook()

createParent

protected org.eclipse.swt.widgets.Composite createParent(org.eclipse.swt.widgets.Composite parentWidget)
Subclasses override this method to specify the composite to use to parent all children layout parts it contains.

Specified by:
createParent in class PartSashContainer

dispose

public void dispose()
Dispose of the editor area.

Overrides:
dispose in class PartSashContainer

disposeParent

protected void disposeParent()
Subclasses override this method to dispose of any swt resources created during createParent.

Specified by:
disposeParent in class PartSashContainer

getActiveWorkbook

public EditorStack getActiveWorkbook()
Return the editor workbook which is active.


getActiveWorkbookID

public java.lang.String getActiveWorkbookID()
Return the editor workbook id which is active.


getEditorWorkbooks

public java.util.ArrayList getEditorWorkbooks()
Return the all the editor workbooks.


getEditorWorkbookCount

public int getEditorWorkbookCount()
Return the all the editor workbooks.


isActiveWorkbook

protected boolean isActiveWorkbook(EditorStack workbook)
Return true is the workbook specified is the active one.


findSashes

public void findSashes(LayoutPart pane,
                       PartPane.Sashes sashes)
Find the sashs around the specified part.

Specified by:
findSashes in interface ILayoutContainer
Overrides:
findSashes in class PartSashContainer

removeAllEditors

public void removeAllEditors()
Remove all the editors


removeEditor

public void removeEditor(EditorPane pane)
Remove an editor from its' workbook.


restoreState

public org.eclipse.core.runtime.IStatus restoreState(org.eclipse.ui.IMemento memento)

saveState

public org.eclipse.core.runtime.IStatus saveState(org.eclipse.ui.IMemento memento)

setActiveWorkbook

public void setActiveWorkbook(EditorStack newWorkbook,
                              boolean hasFocus)
Set the editor workbook which is active.


setActiveWorkbookFromID

public void setActiveWorkbookFromID(java.lang.String id)
Set the editor workbook which is active.


updateTabList

public void updateTabList()
Updates the editor area's tab list to include the active editor and its tab.


createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
Description copied from class: LayoutPart
Creates the SWT control

Overrides:
createControl in class PartSashContainer

addDropSupport

private void addDropSupport()

getDropTarget

org.eclipse.swt.dnd.DropTarget getDropTarget()

isCompressible

public boolean isCompressible()
Overrides:
isCompressible in class LayoutPart

allowsAutoFocus

public boolean allowsAutoFocus()
Description copied from interface: ILayoutContainer
When a layout part closes, focus will return to the previously active part. This method determines whether the parts in this container should participate in this behavior. If this method returns true, its parts may automatically be given focus when another part is closed.


isStackType

public boolean isStackType(LayoutPart toTest)
Description copied from class: PartSashContainer
Returns true iff this PartSashContainer allows its parts to be stacked onto the given container.

Specified by:
isStackType in class PartSashContainer

isPaneType

public boolean isPaneType(LayoutPart toTest)
Specified by:
isPaneType in class PartSashContainer

createStack

protected PartStack createStack()
Specified by:
createStack in class PartSashContainer

setVisiblePart

protected void setVisiblePart(ILayoutContainer container,
                              LayoutPart visiblePart)
Specified by:
setVisiblePart in class PartSashContainer

getVisiblePart

protected LayoutPart getVisiblePart(ILayoutContainer container)
Specified by:
getVisiblePart in class PartSashContainer

restorePresentationState

public org.eclipse.core.runtime.IStatus restorePresentationState(org.eclipse.ui.IMemento areaMem)
Restore the presentation state. Loop over the workbooks, create the appropriate serializer and pass to the presentation.