|
|||||||||
| Home >> All >> org >> eclipse >> ui >> [ internal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.ui.internal
Class PartStack

java.lang.Objectorg.eclipse.ui.internal.LayoutPart
org.eclipse.ui.internal.PartStack
- All Implemented Interfaces:
- ILayoutContainer
- Direct Known Subclasses:
- EditorStack, ViewStack
- public abstract class PartStack
- extends LayoutPart
- implements ILayoutContainer
- extends LayoutPart
Implements the common behavior for stacks of Panes (ie: EditorStack and ViewStack) This layout container has PartPanes as children and belongs to a PartSashContainer.
- Since:
- 3.0
| Field Summary | |
protected int |
appearance
|
private java.util.List |
children
|
private LayoutPart |
current
|
private boolean |
ignoreSelectionChanges
|
private DefaultStackPresentationSite |
presentationSite
|
protected org.eclipse.ui.IMemento |
savedPresentationState
|
| Fields inherited from class org.eclipse.ui.internal.LayoutPart |
container, id, PROP_VISIBILITY |
| Constructor Summary | |
PartStack(int appearance)
Creates a new PartStack, given a constant determining which presentation to use |
|
| 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 |
protected abstract void |
addSystemActions(org.eclipse.jface.action.IMenuManager menuManager)
|
boolean |
allowsAutoFocus()
When a layout part closes, focus will return to the previously active part. |
protected abstract boolean |
allowsDrop(PartPane part)
|
protected static void |
appendToGroupIfPossible(org.eclipse.jface.action.IMenuManager m,
java.lang.String groupId,
org.eclipse.jface.action.ContributionItem item)
|
protected abstract boolean |
canMoveFolder()
|
protected void |
close(org.eclipse.ui.presentations.IPresentablePart part)
|
protected void |
close(org.eclipse.ui.presentations.IPresentablePart[] parts)
|
void |
createControl(org.eclipse.swt.widgets.Composite parent)
Creates the SWT control |
void |
createControl(org.eclipse.swt.widgets.Composite parent,
org.eclipse.ui.presentations.StackPresentation presentation)
|
protected abstract void |
derefPart(LayoutPart toDeref)
|
void |
describeLayout(java.lang.StringBuffer buf)
Writes a description of the layout to the given string buffer. |
void |
dispose()
See LayoutPart#dispose |
void |
dragStart(org.eclipse.ui.presentations.IPresentablePart beingDragged,
org.eclipse.swt.graphics.Point initialLocation,
boolean keyboard)
|
void |
findSashes(LayoutPart part,
PartPane.Sashes sashes)
|
private void |
forceLayout()
Forces the layout to be recomputed for all parts |
int |
getActive()
|
org.eclipse.swt.graphics.Rectangle |
getBounds()
Gets the presentation bounds. |
LayoutPart[] |
getChildren()
See IVisualContainer#getChildren |
org.eclipse.swt.widgets.Control |
getControl()
Get the part control. |
protected org.eclipse.ui.presentations.AbstractPresentationFactory |
getFactory()
|
int |
getItemCount()
Answer the number of children. |
int |
getMinimumHeight()
Returns the minimum height a part can have. |
protected WorkbenchPage |
getPage()
|
protected LayoutPart |
getPaneFor(org.eclipse.ui.presentations.IPresentablePart part)
Returns the LayoutPart for the given IPresentablePart, or null if the given IPresentablePart is not in this stack. |
org.eclipse.swt.widgets.Composite |
getParent()
Get the parent control. |
private org.eclipse.ui.presentations.IPresentablePart |
getPresentablePartAtIndex(int idx)
|
java.util.List |
getPresentableParts()
Returns a list of IPresentablePart |
protected org.eclipse.ui.presentations.StackPresentation |
getPresentation()
|
protected org.eclipse.ui.presentations.IStackPresentationSite |
getPresentationSite()
|
org.eclipse.ui.IMemento |
getSavedPresentationState()
|
protected org.eclipse.ui.presentations.IPresentablePart |
getSelectedPart()
Returns the currently selected IPresentablePart, or null if none |
org.eclipse.swt.widgets.Control[] |
getTabList(LayoutPart part)
|
PartPane |
getVisiblePart()
Returns the visible child. |
protected abstract boolean |
isCloseable(org.eclipse.ui.presentations.IPresentablePart part)
|
boolean |
isDisposed()
|
protected abstract boolean |
isMoveable(org.eclipse.ui.presentations.IPresentablePart part)
|
private void |
presentationSelectionChanged(org.eclipse.ui.presentations.IPresentablePart newSelection)
|
private void |
refreshPresentationSelection()
|
void |
remove(LayoutPart child)
See IVisualContainer#remove |
void |
reparent(org.eclipse.swt.widgets.Composite newParent)
Reparent a part. |
void |
replace(LayoutPart oldChild,
LayoutPart newChild)
See IVisualContainer#replace |
boolean |
resizesVertically()
|
org.eclipse.core.runtime.IStatus |
restoreState(org.eclipse.ui.IMemento memento)
|
protected void |
savePresentationState()
Saves the current state of the presentation to savedPresentationState, if the presentation exists. |
org.eclipse.core.runtime.IStatus |
saveState(org.eclipse.ui.IMemento memento)
|
void |
setActive(int activeState)
Set the active appearence on the tab folder. |
void |
setBounds(org.eclipse.swt.graphics.Rectangle r)
Sets the presentation bounds. |
void |
setSelection(LayoutPart part)
|
protected void |
setState(int newState)
|
void |
setZoomed(boolean isZoomed)
|
void |
showPaneMenu()
|
private void |
showPart(LayoutPart part,
java.lang.Object cookie)
Makes the given part visible in the presentation |
void |
showPartList()
|
void |
showSystemMenu()
|
protected abstract boolean |
supportsState(int newState)
|
void |
testInvariants()
Tests the integrity of this object. |
protected void |
updateActions()
Subclasses should override this method to update the enablement state of their actions |
private void |
updateContainerVisibleTab()
Update the container to show the correct visible tab based on the activation list. |
private void |
updateControlBounds()
|
| 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, setFocus, setID, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
children
private java.util.List children
appearance
protected int appearance
current
private LayoutPart current
ignoreSelectionChanges
private boolean ignoreSelectionChanges
savedPresentationState
protected org.eclipse.ui.IMemento savedPresentationState
presentationSite
private DefaultStackPresentationSite presentationSite
| Constructor Detail |
PartStack
public PartStack(int appearance)
- Creates a new PartStack, given a constant determining which presentation to use
| Method Detail |
isMoveable
protected abstract boolean isMoveable(org.eclipse.ui.presentations.IPresentablePart part)
isCloseable
protected abstract boolean isCloseable(org.eclipse.ui.presentations.IPresentablePart part)
addSystemActions
protected abstract void addSystemActions(org.eclipse.jface.action.IMenuManager menuManager)
supportsState
protected abstract boolean supportsState(int newState)
canMoveFolder
protected abstract boolean canMoveFolder()
derefPart
protected abstract void derefPart(LayoutPart toDeref)
allowsDrop
protected abstract boolean allowsDrop(PartPane part)
appendToGroupIfPossible
protected static void appendToGroupIfPossible(org.eclipse.jface.action.IMenuManager m, java.lang.String groupId, org.eclipse.jface.action.ContributionItem item)
getSelectedPart
protected org.eclipse.ui.presentations.IPresentablePart getSelectedPart()
- Returns the currently selected IPresentablePart, or null if none
getPresentationSite
protected org.eclipse.ui.presentations.IStackPresentationSite getPresentationSite()
testInvariants
public void testInvariants()
- Tests the integrity of this object. Throws an exception if the object's state
is invalid. For use in test suites.
- Overrides:
testInvariantsin classLayoutPart
describeLayout
public void describeLayout(java.lang.StringBuffer buf)
- Description copied from class:
LayoutPart - Writes a description of the layout to the given string buffer.
This is used for drag-drop test suites to determine if two layouts are the
same. Like a hash code, the description should compare as equal iff the
layouts are the same. However, it should be user-readable in order to
help debug failed tests. Although these are english readable strings,
they do not need to be translated.
- Overrides:
describeLayoutin classLayoutPart
add
public void add(LayoutPart child)
- See IVisualContainer#add
- Specified by:
addin interfaceILayoutContainer
add
protected void add(LayoutPart newChild, java.lang.Object cookie)
- Add a part at a particular position
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.
- Specified by:
allowsAutoFocusin interfaceILayoutContainer
close
protected void close(org.eclipse.ui.presentations.IPresentablePart[] parts)
close
protected void close(org.eclipse.ui.presentations.IPresentablePart part)
isDisposed
public boolean isDisposed()
getFactory
protected org.eclipse.ui.presentations.AbstractPresentationFactory getFactory()
createControl
public void createControl(org.eclipse.swt.widgets.Composite parent)
- Description copied from class:
LayoutPart - Creates the SWT control
- Specified by:
createControlin classLayoutPart
createControl
public void createControl(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.presentations.StackPresentation presentation)
savePresentationState
protected void savePresentationState()
- Saves the current state of the presentation to savedPresentationState, if the
presentation exists.
dispose
public void dispose()
- See LayoutPart#dispose
- Overrides:
disposein classLayoutPart
findSashes
public void findSashes(LayoutPart part, PartPane.Sashes sashes)
- Specified by:
findSashesin interfaceILayoutContainer
forceLayout
private void forceLayout()
- Forces the layout to be recomputed for all parts
getBounds
public org.eclipse.swt.graphics.Rectangle getBounds()
- Gets the presentation bounds.
- Overrides:
getBoundsin classLayoutPart
getChildren
public LayoutPart[] getChildren()
- See IVisualContainer#getChildren
- Specified by:
getChildrenin interfaceILayoutContainer
getControl
public org.eclipse.swt.widgets.Control getControl()
- Description copied from class:
LayoutPart - Get the part control. This method may return null.
- Specified by:
getControlin classLayoutPart
getItemCount
public int getItemCount()
- Answer the number of children.
getMinimumHeight
public int getMinimumHeight()
- Description copied from class:
LayoutPart - Returns the minimum height a part can have. Subclasses may
override as necessary.
- Overrides:
getMinimumHeightin classLayoutPart
getPaneFor
protected LayoutPart getPaneFor(org.eclipse.ui.presentations.IPresentablePart part)
- Returns the LayoutPart for the given IPresentablePart, or null if the given
IPresentablePart is not in this stack. Returns null if given a null argument.
getParent
public org.eclipse.swt.widgets.Composite getParent()
- Get the parent control.
getPresentablePartAtIndex
private org.eclipse.ui.presentations.IPresentablePart getPresentablePartAtIndex(int idx)
getPresentableParts
public java.util.List getPresentableParts()
- Returns a list of IPresentablePart
getPresentation
protected org.eclipse.ui.presentations.StackPresentation getPresentation()
getVisiblePart
public PartPane getVisiblePart()
- Returns the visible child.
presentationSelectionChanged
private void presentationSelectionChanged(org.eclipse.ui.presentations.IPresentablePart newSelection)
remove
public void remove(LayoutPart child)
- See IVisualContainer#remove
- Specified by:
removein interfaceILayoutContainer
reparent
public void reparent(org.eclipse.swt.widgets.Composite newParent)
- Reparent a part. Also reparent visible children...
- Overrides:
reparentin classLayoutPart
replace
public void replace(LayoutPart oldChild, LayoutPart newChild)
- See IVisualContainer#replace
- Specified by:
replacein interfaceILayoutContainer
resizesVertically
public boolean resizesVertically()
- Overrides:
resizesVerticallyin classLayoutPart
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)
getPage
protected WorkbenchPage getPage()
setActive
public void setActive(int activeState)
- Set the active appearence on the tab folder.
getActive
public int getActive()
setBounds
public void setBounds(org.eclipse.swt.graphics.Rectangle r)
- Sets the presentation bounds.
- Overrides:
setBoundsin classLayoutPart
setSelection
public void setSelection(LayoutPart part)
updateActions
protected void updateActions()
- Subclasses should override this method to update the enablement state of their
actions
refreshPresentationSelection
private void refreshPresentationSelection()
setState
protected void setState(int newState)
setZoomed
public void setZoomed(boolean isZoomed)
- Specified by:
setZoomedin interfaceILayoutContainer- Overrides:
setZoomedin classLayoutPart
showPart
private void showPart(LayoutPart part, java.lang.Object cookie)
- Makes the given part visible in the presentation
updateContainerVisibleTab
private void updateContainerVisibleTab()
- Update the container to show the correct visible tab based on the
activation list.
updateControlBounds
private void updateControlBounds()
showSystemMenu
public void showSystemMenu()
showPaneMenu
public void showPaneMenu()
showPartList
public void showPartList()
getTabList
public org.eclipse.swt.widgets.Control[] getTabList(LayoutPart part)
dragStart
public void dragStart(org.eclipse.ui.presentations.IPresentablePart beingDragged, org.eclipse.swt.graphics.Point initialLocation, boolean keyboard)
getSavedPresentationState
public org.eclipse.ui.IMemento getSavedPresentationState()
|
|||||||||
| Home >> All >> org >> eclipse >> ui >> [ internal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC