JIVE Platform
Release 0.3.1

edu.buffalo.cse.jive.ui
Class AbstractGraphicalJiveView

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 edu.buffalo.cse.jive.ui.AbstractJiveView
                  extended by edu.buffalo.cse.jive.ui.AbstractGraphicalJiveView
All Implemented Interfaces:
IGraphicalJiveView, IJiveView, EventListener, IAdaptable, IExecutableExtension, IDebugEventSetListener, ILaunchListener, IPropertyChangeListener, IPersistable, ISelectionListener, IViewPart, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartOrientation

public abstract class AbstractGraphicalJiveView
extends AbstractJiveView
implements IGraphicalJiveView

An abstract IGraphicalJiveView using a ScalableRootEditPart as its RootEditPart. It also provides zooming controls for its tool bar.

See Also:
IGraphicalJiveView, GraphicalViewer, ScalableRootEditPart

Field Summary
protected static String ZOOM_CONTROLS_GROUP
          The group used to hold actions having to do with diagram zooming.
 
Fields inherited from class edu.buffalo.cse.jive.ui.AbstractJiveView
DISPLAY_TARGET_GROUP, REMOVE_TERMINATED_GROUP, STEP_CONTROLS_GROUP
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
AbstractGraphicalJiveView()
           
 
Method Summary
protected  void configureToolBar(IToolBarManager manager)
          Adds the actions to the tool bar using the supplied tool bar manager.
protected  void createContextMenu()
          Creates the context menu for the view.
protected abstract  org.eclipse.gef.ContextMenuProvider createContextMenuProvider()
          Creates a ContextMenuProvider to be used as the MenuManager for the viewer's context menu.
protected abstract  org.eclipse.gef.EditPartFactory createEditPartFactory()
          Creates the EditPartFactory to be used by the viewer in order to create EditParts for elements of the model.
protected abstract  org.eclipse.gef.GraphicalViewer createGraphicalViewer()
          Creates a GraphicalViewer to be used as the view part's viewer.
 Object getAdapter(Class type)
           
 org.eclipse.gef.GraphicalViewer getViewer()
          Returns the GraphicalViewer used by the view part to display its input.
protected  void initializeViewer(Composite parent)
          Called immediately in AbstractJiveView.createPartControl(Composite) to initialize the internal viewer for the view.
 void setFocus()
           
protected  void setViewerInput(IJiveDebugTarget target)
          Sets the internal viewer's input to that of the supplied target.
 
Methods inherited from class edu.buffalo.cse.jive.ui.AbstractJiveView
addUpdatableAction, configurePullDownMenu, createActions, createPartControl, display, dispose, getDefaultContentDescription, getDisplayDropDownDisabledImageDescriptor, getDisplayDropDownEnabledImageDescriptor, getDisplayed, getDisplayTargetDropDownText, handleDebugEvents, launchAdded, launchChanged, launchRemoved, propertyChange, selectionChanged
 
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, firePartPropertyChanged, firePropertyChange, 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 edu.buffalo.cse.jive.ui.IJiveView
display, getDisplayed
 
Methods inherited from interface org.eclipse.ui.IViewPart
getViewSite, init, init, saveState
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, createPartControl, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 

Field Detail

ZOOM_CONTROLS_GROUP

protected static final String ZOOM_CONTROLS_GROUP
The group used to hold actions having to do with diagram zooming.

See Also:
Constant Field Values
Constructor Detail

AbstractGraphicalJiveView

public AbstractGraphicalJiveView()
Method Detail

getViewer

public org.eclipse.gef.GraphicalViewer getViewer()
Description copied from interface: IGraphicalJiveView
Returns the GraphicalViewer used by the view part to display its input.

Specified by:
getViewer in interface IGraphicalJiveView
Returns:
the view's graphical viewer

initializeViewer

protected void initializeViewer(Composite parent)
Description copied from class: AbstractJiveView
Called immediately in AbstractJiveView.createPartControl(Composite) to initialize the internal viewer for the view. Subclasses must implement this method for the specific framework being used.

Specified by:
initializeViewer in class AbstractJiveView
Parameters:
parent - the parent widget of the viewer

createGraphicalViewer

protected abstract org.eclipse.gef.GraphicalViewer createGraphicalViewer()
Creates a GraphicalViewer to be used as the view part's viewer. This method is called by initializeViewer(Composite), and the resulting viewer is used during the lifetime of the view part.

Returns:
the viewer that was created

createEditPartFactory

protected abstract org.eclipse.gef.EditPartFactory createEditPartFactory()
Creates the EditPartFactory to be used by the viewer in order to create EditParts for elements of the model. This method is called by initializeViewer(Composite), and the resulting factory is used during the lifetime of the view part.

Returns:
the edit part factory the was created.

createContextMenu

protected void createContextMenu()
Description copied from class: AbstractJiveView
Creates the context menu for the view. Subclasses must implement this method.

Specified by:
createContextMenu in class AbstractJiveView

createContextMenuProvider

protected abstract org.eclipse.gef.ContextMenuProvider createContextMenuProvider()
Creates a ContextMenuProvider to be used as the MenuManager for the viewer's context menu. This method is called by createContextMenu(), and the resulting manager is used during the lifetime of the view part.

Returns:
the context menu provider that was created

configureToolBar

protected void configureToolBar(IToolBarManager manager)
Description copied from class: AbstractJiveView
Adds the actions to the tool bar using the supplied tool bar manager.

Overrides:
configureToolBar in class AbstractJiveView
Parameters:
manager - the manager used to add the actions to the tool bar

setViewerInput

protected void setViewerInput(IJiveDebugTarget target)
Description copied from class: AbstractJiveView
Sets the internal viewer's input to that of the supplied target. Subclasses must implement this method for the specific framework being used.

Specified by:
setViewerInput in class AbstractJiveView
Parameters:
target - the target to set as input.

setFocus

public void setFocus()
Specified by:
setFocus in interface IWorkbenchPart
Specified by:
setFocus in class WorkbenchPart

getAdapter

public Object getAdapter(Class type)
Specified by:
getAdapter in interface IAdaptable
Overrides:
getAdapter in class WorkbenchPart

JIVE Platform
Release 0.3.1