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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.eclipse.ui.internal.LayoutPart
      extended byorg.eclipse.ui.internal.PartPane
All Implemented Interfaces:
org.eclipse.swt.widgets.Listener
Direct Known Subclasses:
EditorPane, ViewPane

public abstract class PartPane
extends LayoutPart
implements org.eclipse.swt.widgets.Listener

Provides the common behavior for both views and editor panes. TODO: Delete ViewPane and EditorPane, and make this class non-abstract. TODO: Stop subclassing LayoutPart. This class cannot be interchanged with other LayoutParts. Pointers that refer to PartPane instances should do so directly rather than referring to LayoutPart and downcasting. The getPresentablePart() method only applies to PartPanes, and should be removed from LayoutPart.


Nested Class Summary
static class PartPane.Sashes
           
 
Field Summary
protected  org.eclipse.swt.widgets.Composite control
           
private  boolean isZoomed
           
protected  WorkbenchPage page
           
private  org.eclipse.jface.action.MenuManager paneMenuManager
           
protected  org.eclipse.ui.IWorkbenchPartReference partReference
           
protected  org.eclipse.ui.internal.presentations.PresentablePart presentableAdapter
           
static java.lang.String PROP_ZOOMED
           
private  org.eclipse.swt.events.TraverseListener traverseListener
           
 
Fields inherited from class org.eclipse.ui.internal.LayoutPart
container, id, PROP_VISIBILITY
 
Constructor Summary
PartPane(org.eclipse.ui.IWorkbenchPartReference partReference, WorkbenchPage workbenchPage)
          Construct a pane for a part.
 
Method Summary
protected  void addSizeItem(org.eclipse.swt.widgets.Menu sizeMenu, java.lang.String labelMessage, org.eclipse.swt.widgets.Sash sash)
          Add a menu item to the Size Menu
protected  void addSizeItems(org.eclipse.swt.widgets.Menu sizeMenu)
          Add the Left,Right,Up,Botton menu items to the Size menu.
 void addSizeMenuItem(org.eclipse.swt.widgets.Menu menu, int index)
           
protected  void createChildControl()
          Factory method for creating the SWT Control hierarchy for this Pane's child.
 void createControl(org.eclipse.swt.widgets.Composite parent)
          Creates the SWT control
protected abstract  org.eclipse.ui.IWorkbenchPart createErrorPart(org.eclipse.ui.IWorkbenchPart oldPart)
           
protected abstract  void createTitleBar()
          Create a title bar for the pane if required.
 void dispose()
          Disposes the SWT control
protected  void doDock()
          Pin this part.
abstract  void doHide()
          User has requested to close the pane.
protected  void doZoom()
          Zooms in on the part contained in this pane.
protected  PartPane.Sashes findSashes()
          Finds and return the sashes around this part.
 org.eclipse.swt.graphics.Rectangle getBounds()
          Gets the presentation bounds.
 org.eclipse.swt.widgets.Control getControl()
          Get the control.
 int getMinimumHeight()
          Returns the minimum height a part can have.
 WorkbenchPage getPage()
          Returns the workbench page of this pane.
 org.eclipse.ui.IWorkbenchPartReference getPartReference()
          Answer the part child.
 org.eclipse.ui.presentations.IPresentablePart getPresentablePart()
           
 PartStack getStack()
          Returns the PartStack that contains this PartPane, or null if none.
abstract  org.eclipse.swt.widgets.Control getToolBar()
           
 void handleEvent(org.eclipse.swt.widgets.Event event)
          Sent when an event that the receiver has registered for occurs.
 boolean hasViewMenu()
           
 boolean isBusy()
           
 boolean isZoomed()
          Return whether the pane is zoomed or not
 void moveAbove(org.eclipse.swt.widgets.Control refControl)
          Move the control over another one.
protected  void moveSash(org.eclipse.swt.widgets.Sash sash)
          Enable the user to resize this part using the keyboard to move the specified sash
static void moveSash(org.eclipse.swt.widgets.Sash sash, LayoutPart toGetFocusWhenDone)
           
 void reparent(org.eclipse.swt.widgets.Composite newParent)
          Ensure that we are not in the zoomed before reparenting.
protected  void requestActivation()
          Notify the workbook page that the part pane has been activated by the user.
 void setBusy(boolean isBusy)
          Set the busy state of the pane.
 void setContainer(ILayoutContainer container)
          Sets the parent for this part.
 void setFocus()
          Sets focus to this part.
 void setVisible(boolean makeVisible)
          Shows the receiver if visible is true otherwise hide it.
 void setWorkbenchPage(WorkbenchPage workbenchPage)
          Sets the workbench page of the view.
 void setZoomed(boolean isZoomed)
          Set whether the pane is zoomed or not
(package private) abstract  void shellActivated()
          Informs the pane that it's window shell has been activated.
(package private) abstract  void shellDeactivated()
          Informs the pane that it's window shell has been deactivated.
abstract  void showFocus(boolean inFocus)
          Indicate focus in part.
 void showHighlight()
          Show a highlight for the receiver if it is not currently the part in the front of its presentation.
 void showPaneMenu()
          Show a title label menu for this pane.
 void showViewMenu()
          Show the context menu for this part.
 void showViewMenu(org.eclipse.swt.graphics.Point location)
           
 LayoutPart targetPartFor(LayoutPart dragSource)
           
 
Methods inherited from class org.eclipse.ui.internal.LayoutPart
addPropertyChangeListener, describeLayout, getCompoundId, getContainer, getID, getMinimumWidth, getPart, getPlaceHolderId, getPropertyListeners, getShellActivated, getSize, getWindow, getWorkbenchWindow, isCompressible, isVisible, removePropertyChangeListener, resizesVertically, setBounds, setID, testInvariants
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

presentableAdapter

protected org.eclipse.ui.internal.presentations.PresentablePart presentableAdapter

PROP_ZOOMED

public static final java.lang.String PROP_ZOOMED
See Also:
Constant Field Values

isZoomed

private boolean isZoomed

paneMenuManager

private org.eclipse.jface.action.MenuManager paneMenuManager

partReference

protected org.eclipse.ui.IWorkbenchPartReference partReference

page

protected WorkbenchPage page

control

protected org.eclipse.swt.widgets.Composite control

traverseListener

private org.eclipse.swt.events.TraverseListener traverseListener
Constructor Detail

PartPane

public PartPane(org.eclipse.ui.IWorkbenchPartReference partReference,
                WorkbenchPage workbenchPage)
Construct a pane for a part.

Method Detail

createChildControl

protected void createChildControl()
Factory method for creating the SWT Control hierarchy for this Pane's child.


addSizeMenuItem

public void addSizeMenuItem(org.eclipse.swt.widgets.Menu menu,
                            int index)

createControl

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

Specified by:
createControl in class LayoutPart

createErrorPart

protected abstract org.eclipse.ui.IWorkbenchPart createErrorPart(org.eclipse.ui.IWorkbenchPart oldPart)

createTitleBar

protected abstract void createTitleBar()
Create a title bar for the pane if required.


dispose

public void dispose()
Description copied from class: LayoutPart
Disposes the SWT control

Overrides:
dispose in class LayoutPart

doHide

public abstract void doHide()
User has requested to close the pane. Take appropriate action depending on type.


doZoom

protected void doZoom()
Zooms in on the part contained in this pane.


getBounds

public org.eclipse.swt.graphics.Rectangle getBounds()
Gets the presentation bounds.

Overrides:
getBounds in class LayoutPart

getControl

public org.eclipse.swt.widgets.Control getControl()
Get the control.

Specified by:
getControl in class LayoutPart

getMinimumHeight

public int getMinimumHeight()
Description copied from class: LayoutPart
Returns the minimum height a part can have. Subclasses may override as necessary.

Overrides:
getMinimumHeight in class LayoutPart

getPartReference

public org.eclipse.ui.IWorkbenchPartReference getPartReference()
Answer the part child.


handleEvent

public void handleEvent(org.eclipse.swt.widgets.Event event)
Description copied from interface: org.eclipse.swt.widgets.Listener
Sent when an event that the receiver has registered for occurs.

Specified by:
handleEvent in interface org.eclipse.swt.widgets.Listener

isZoomed

public boolean isZoomed()
Return whether the pane is zoomed or not


moveAbove

public void moveAbove(org.eclipse.swt.widgets.Control refControl)
Move the control over another one.

Overrides:
moveAbove in class LayoutPart

requestActivation

protected void requestActivation()
Notify the workbook page that the part pane has been activated by the user.


setContainer

public void setContainer(ILayoutContainer container)
Sets the parent for this part.

Overrides:
setContainer in class LayoutPart

setVisible

public void setVisible(boolean makeVisible)
Shows the receiver if visible is true otherwise hide it.

Overrides:
setVisible in class LayoutPart

setFocus

public void setFocus()
Sets focus to this part.

Overrides:
setFocus in class LayoutPart

setWorkbenchPage

public void setWorkbenchPage(WorkbenchPage workbenchPage)
Sets the workbench page of the view.


setZoomed

public void setZoomed(boolean isZoomed)
Set whether the pane is zoomed or not

Overrides:
setZoomed in class LayoutPart

shellActivated

abstract void shellActivated()
Informs the pane that it's window shell has been activated.


shellDeactivated

abstract void shellDeactivated()
Informs the pane that it's window shell has been deactivated.


showFocus

public abstract void showFocus(boolean inFocus)
Indicate focus in part.


targetPartFor

public LayoutPart targetPartFor(LayoutPart dragSource)

getStack

public PartStack getStack()
Returns the PartStack that contains this PartPane, or null if none.


showPaneMenu

public void showPaneMenu()
Show a title label menu for this pane.


showViewMenu

public void showViewMenu()
Show the context menu for this part.


findSashes

protected PartPane.Sashes findSashes()
Finds and return the sashes around this part.


moveSash

protected void moveSash(org.eclipse.swt.widgets.Sash sash)
Enable the user to resize this part using the keyboard to move the specified sash


moveSash

public static void moveSash(org.eclipse.swt.widgets.Sash sash,
                            LayoutPart toGetFocusWhenDone)

addSizeItem

protected void addSizeItem(org.eclipse.swt.widgets.Menu sizeMenu,
                           java.lang.String labelMessage,
                           org.eclipse.swt.widgets.Sash sash)
Add a menu item to the Size Menu


getPage

public WorkbenchPage getPage()
Returns the workbench page of this pane.


addSizeItems

protected void addSizeItems(org.eclipse.swt.widgets.Menu sizeMenu)
Add the Left,Right,Up,Botton menu items to the Size menu.


doDock

protected void doDock()
Pin this part.


setBusy

public void setBusy(boolean isBusy)
Set the busy state of the pane.


showHighlight

public void showHighlight()
Show a highlight for the receiver if it is not currently the part in the front of its presentation.


reparent

public void reparent(org.eclipse.swt.widgets.Composite newParent)
Ensure that we are not in the zoomed before reparenting. TODO: I am certain this isn't correct but I'll be damned if I know what is.

Overrides:
reparent in class LayoutPart

getToolBar

public abstract org.eclipse.swt.widgets.Control getToolBar()

hasViewMenu

public boolean hasViewMenu()

showViewMenu

public void showViewMenu(org.eclipse.swt.graphics.Point location)

isBusy

public boolean isBusy()

getPresentablePart

public org.eclipse.ui.presentations.IPresentablePart getPresentablePart()
Overrides:
getPresentablePart in class LayoutPart