org.eclipse.net4j.util.ui.views
Class MultiViewersView

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by org.eclipse.net4j.util.ui.views.MultiViewersView
All Implemented Interfaces:
IAdaptable, IExecutableExtension, IPersistable, IViewPart, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, ISetSelectionTarget, IWorkbenchPartOrientation
Direct Known Subclasses:
MasterDetailsView

public abstract class MultiViewersView
extends ViewPart
implements ISetSelectionTarget

Since:
2.0
Author:
Eike Stepper

Nested Class Summary
protected static class MultiViewersView.MessageType
           
 
Field Summary
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
MultiViewersView()
           
 
Method Summary
 void closeView()
           
 void createPartControl(Composite parent)
          Creates the SWT controls for this workbench part.
protected abstract  Control createUI(Composite parent)
           
protected  void doubleClicked(Object object)
           
protected  void fillContextMenu(IMenuManager manager, StructuredViewer viewer, IStructuredSelection selection)
           
protected  void fillLocalPullDown(IMenuManager manager)
           
protected  void fillLocalToolBar(IToolBarManager manager)
           
 StructuredViewer getCurrentViewer()
           
protected  Display getDisplay()
           
 Shell getShell()
           
 void refreshElement(Object element, boolean updateLabels)
           
 void refreshViewer(boolean updateLabels)
           
 void revealElement(Object element)
           
 void selectReveal(ISelection selection)
          Reveals and selects the given element within this target view.
 void setCurrentViewer(StructuredViewer viewer)
           
 void setFocus()
          Asks this part to take focus within the workbench.
protected  boolean showMessage(MultiViewersView.MessageType type, String message)
           
protected  void showMessage(String message)
           
 void updateLabels(Object element)
           
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
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.IWorkbenchPart
addPropertyListener, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

MultiViewersView

public MultiViewersView()
Method Detail

getShell

public Shell getShell()

getCurrentViewer

public StructuredViewer getCurrentViewer()

setCurrentViewer

public void setCurrentViewer(StructuredViewer viewer)

setFocus

public void setFocus()
Description copied from interface: org.eclipse.ui.IWorkbenchPart
Asks this part to take focus within the workbench. Parts must assign focus to one of the controls contained in the part's parent composite.

Clients should not call this method (the workbench calls this method at appropriate times). To have the workbench activate a part, use IWorkbenchPage.activate(IWorkbenchPart) instead.

Specified by:
setFocus in interface IWorkbenchPart
Specified by:
setFocus in class WorkbenchPart

refreshViewer

public void refreshViewer(boolean updateLabels)

refreshElement

public void refreshElement(Object element,
                           boolean updateLabels)

updateLabels

public void updateLabels(Object element)

revealElement

public void revealElement(Object element)

selectReveal

public void selectReveal(ISelection selection)
Description copied from interface: org.eclipse.ui.part.ISetSelectionTarget
Reveals and selects the given element within this target view.

Specified by:
selectReveal in interface ISetSelectionTarget
Parameters:
selection - the new element to select

closeView

public void closeView()

createPartControl

public final void createPartControl(Composite parent)
Description copied from interface: org.eclipse.ui.IWorkbenchPart
Creates the SWT controls for this workbench part.

Clients should not call this method (the workbench calls this method when it needs to, which may be never).

For implementors this is a multi-step process:

  1. Create one or more controls within the parent.
  2. Set the parent layout as needed.
  3. Register any global actions with the site's IActionBars.
  4. Register any context menus with the site.
  5. Register a selection provider with the site, to make it available to the workbench's ISelectionService (optional).

Specified by:
createPartControl in interface IWorkbenchPart
Specified by:
createPartControl in class WorkbenchPart
Parameters:
parent - the parent control

createUI

protected abstract Control createUI(Composite parent)

doubleClicked

protected void doubleClicked(Object object)

fillContextMenu

protected void fillContextMenu(IMenuManager manager,
                               StructuredViewer viewer,
                               IStructuredSelection selection)

fillLocalPullDown

protected void fillLocalPullDown(IMenuManager manager)

fillLocalToolBar

protected void fillLocalToolBar(IToolBarManager manager)

showMessage

protected final void showMessage(String message)

showMessage

protected final boolean showMessage(MultiViewersView.MessageType type,
                                    String message)

getDisplay

protected final Display getDisplay()


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.