|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ui.presentations.StackPresentation
This represents an object that can supply trim around a IPresentablePart. Clients can implement subclasses to provide the appearance for editor workbooks, view folders, fast views, and detached windows.
StackPresentations do not store any persistent state and cannot directly make changes to the workbench. They are given an IStackPresentationSite reference on creation, which allows them to send events and requests to the workbench. However, the workbench is free to ignore these requests. The workbench will call one of the public methods on StackPresentation when (and if) the presentation is expected to change state.
For example, if the user clicks a button that is intended to close a part, the StackPresentation will send a close request to its site, but should not assume that the part has been closed until the workbench responds with a call StackPresentation.remove.
Field Summary | |
static int | AS_ACTIVE_FOCUS
Activation state indicating that one of the parts in the presentation currently has focus |
static int | AS_ACTIVE_NOFOCUS
Activation state indicating that none of the parts in the presentation have focus, but one of the parts is being used as the context for global menus and toolbars |
static int | AS_INACTIVE
Inactive state. |
Constructor Summary | |
protected | StackPresentation(IStackPresentationSite stackSite)
Constructs a new stack presentation with the given site. |
Method Summary | |
abstract void | addPart(IPresentablePart newPart,
Object cookie)
Adds the given part to the stack. |
abstract Point | computeMinimumSize()
Returns the minimum size for this stack. |
abstract void | dispose()
Disposes all SWT resources being used by the stack. |
abstract StackDropResult | dragOver(Control currentControl,
Point location)
This method is invoked whenever a part is dragged over the stack's control. |
abstract Control | getControl()
Returns the control for this presentation |
protected IStackPresentationSite | getSite()
Returns the presentation site (not null). |
abstract Control[] | getTabList(IPresentablePart part)
Returns the tab-key traversal order for the given IPresentablePart. |
abstract void | removePart(IPresentablePart oldPart)
Removes the given part from the stack. |
void | restoreState(IPresentationSerializer context,
IMemento memento)
Restores the state of this presentation to a previously saved state. |
void | saveState(IPresentationSerializer context,
IMemento memento)
Saves the state of this presentation to the given memento. |
abstract void | selectPart(IPresentablePart toSelect)
Brings the specified part to the foreground. |
abstract void | setActive(int newState)
This is invoked to notify the presentation that its activation state has changed. |
abstract void | setBounds(Rectangle bounds)
Sets the bounding rectangle for this presentation. |
abstract void | setState(int state)
Sets the state of the presentation. |
abstract void | setVisible(boolean isVisible)
This causes the presentation to become visible or invisible. |
abstract void | showPaneMenu()
Instructs the presentation to display the pane menu |
void | showPartList()
Instructs the presentation to display a list of all parts in the stack, and allow the user to change the selection using the keyboard. |
abstract void | showSystemMenu()
Instructs the presentation to display the system menu |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AS_INACTIVE
public static final int AS_ACTIVE_FOCUS
public static final int AS_ACTIVE_NOFOCUS
Constructor Detail |
protected StackPresentation(IStackPresentationSite stackSite)
Method Detail |
protected IStackPresentationSite getSite()
public abstract void setBounds(Rectangle bounds)
public abstract Point computeMinimumSize()
public abstract void dispose()
public abstract void setActive(int newState)
public abstract void setVisible(boolean isVisible)
public abstract void setState(int state)
If a presentation wishes to minimize itself, it must call setState on its associated IPresentationSite. If the site chooses to respond to the state change, it will call this method at the correct time. The presentation should not call this method directly.
public abstract Control getControl()
public abstract void addPart(IPresentablePart newPart, Object cookie)
public abstract void removePart(IPresentablePart oldPart)
public abstract void selectPart(IPresentablePart toSelect)
public abstract StackDropResult dragOver(Control currentControl, Point location)
public abstract void showSystemMenu()
public abstract void showPaneMenu()
public void showPartList()
public void saveState(IPresentationSerializer context, IMemento memento)
public void restoreState(IPresentationSerializer context, IMemento memento)
public abstract Control[] getTabList(IPresentablePart part)
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.