GEF v2.0

org.eclipse.gef.ui.parts
Class GraphicalViewerImpl

java.lang.Object
  |
  +--org.eclipse.gef.ui.parts.AbstractEditPartViewer
        |
        +--org.eclipse.gef.ui.parts.GraphicalViewerImpl
All Implemented Interfaces:
EditPartViewer, GraphicalViewer, IMenuListener, ISelectionProvider
Direct Known Subclasses:
PaletteViewerImpl, ScrollingGraphicalViewer

public class GraphicalViewerImpl
extends AbstractEditPartViewer
implements GraphicalViewer


Fields inherited from class org.eclipse.gef.ui.parts.AbstractEditPartViewer
constantSelection, selection, selectionListeners
 
Constructor Summary
GraphicalViewerImpl()
           
 
Method Summary
 Control createControl(Composite composite)
          if called, will create the default Control with the default style bits.
protected  void createDefaultRoot()
           
protected  void expose(EditPart part)
           
 Handle findHandleAt(Point p)
          Finds the view handle at the point specified by x,y.
 EditPart findObjectAt(Point pt)
          Returns null or the EditPart at the given mouse location.
 EditPart findObjectAtExcluding(Point pt, Collection exclude)
          Returns null or the EditPart at the given mouse location, excluding all EditParts in the Collection c.
 void flush()
           
protected  DomainEventDispatcher getEventDispatcher()
          Deprecated.  
protected  Collection getInactiveLayers()
          Deprecated.  
protected  LayerManager getLayerManager()
           
protected  LightweightSystem getLightweightSystem()
           
protected  IFigure getRootFigure()
          Deprecated. There is no reason to call this method
protected  void hookControl()
           
protected  void hookDropTarget()
           
 void menuAboutToShow(IMenuManager menu)
          Called just before the context menu is shown.
 void registerAccessibleEditPart(AccessibleEditPart acc)
           
 void setCursor(Cursor newCursor)
          Sets the cursor for the viewer's control.
 void setEditDomain(EditDomain domain)
          Sets the EditDomain for this viewer.
 void setRootEditPart(RootEditPart editpart)
          Sets the root of this viewer.
protected  void setRootFigure(IFigure figure)
           
 void setRouteEventsToEditor(boolean value)
          Turns on/off the routing of events directly to the Editor.
 void unregisterAccessibleEditPart(AccessibleEditPart acc)
           
 
Methods inherited from class org.eclipse.gef.ui.parts.AbstractEditPartViewer
addDragSourceListener, addDropTargetListener, addSelectionChangedListener, appendSelection, deselect, deselectAll, dispose, fireSelectionChanged, getContents, getContextMenuProvider, getControl, getDelegatingDragAdapter, getDelegatingDropAdapter, getDragSource, getDropTarget, getEditDomain, getEditPartFactory, getEditPartRegistry, getFocusEditPart, getKeyHandler, getRootEditPart, getSelectedEditParts, getSelection, getVisualPartMap, hookDragSource, init, primGetSelectedEditParts, refreshDragSourceAdapter, refreshDropTargetAdapter, removeDragSourceListener, removeDropTargetListener, removeSelectionChangedListener, select, setContents, setContents, setContextMenuProvider, setControl, setDropTarget, setEditPartFactory, setFocus, setKeyHandler, setSelection, unhookControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gef.EditPartViewer
addDragSourceListener, addDropTargetListener, appendSelection, deselect, deselectAll, dispose, getContents, getControl, getEditDomain, getEditPartFactory, getEditPartRegistry, getFocusEditPart, getKeyHandler, getRootEditPart, getSelectedEditParts, getVisualPartMap, select, setContents, setContents, setContextMenuProvider, setControl, setEditPartFactory, setFocus, setKeyHandler
 
Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider
addSelectionChangedListener, getSelection, removeSelectionChangedListener, setSelection
 

Constructor Detail

GraphicalViewerImpl

public GraphicalViewerImpl()
Method Detail

createControl

public Control createControl(Composite composite)
Description copied from interface: EditPartViewer
if called, will create the default Control with the default style bits. The control can also be created externally and then set into the Viewer.
Specified by:
createControl in interface EditPartViewer
Overrides:
createControl in class AbstractEditPartViewer
Following copied from interface: org.eclipse.gef.EditPartViewer
See Also:
EditPartViewer.setControl(Control)

createDefaultRoot

protected void createDefaultRoot()

expose

protected void expose(EditPart part)
Overrides:
expose in class AbstractEditPartViewer

findHandleAt

public Handle findHandleAt(Point p)
Description copied from interface: GraphicalViewer
Finds the view handle at the point specified by x,y. If there is not a handle at this position, null is returned.
Specified by:
findHandleAt in interface GraphicalViewer
Following copied from interface: org.eclipse.gef.GraphicalViewer
Parameters:
p - Point the location on the View
Returns:
Handle The handle at the point or null if no handle is found

findObjectAt

public EditPart findObjectAt(Point pt)
Description copied from interface: EditPartViewer
Returns null or the EditPart at the given mouse location.
Specified by:
findObjectAt in interface EditPartViewer
Following copied from interface: org.eclipse.gef.EditPartViewer
Parameters:
point - The mouse location

findObjectAtExcluding

public EditPart findObjectAtExcluding(Point pt,
                                      Collection exclude)
Deprecated. should be passing EditParts, not Figures

Description copied from interface: EditPartViewer
Returns null or the EditPart at the given mouse location, excluding all EditParts in the Collection c. If the editpart at the location is part of the exclusion set, the Viewer should try to search through other EditParts in z-order that also occupy that point.
Specified by:
findObjectAtExcluding in interface EditPartViewer
Following copied from interface: org.eclipse.gef.EditPartViewer
Parameters:
point - The mouse location
c - The collection of editpart that should be excluded from the search

flush

public void flush()
Specified by:
flush in interface EditPartViewer
Overrides:
flush in class AbstractEditPartViewer

getEventDispatcher

protected DomainEventDispatcher getEventDispatcher()
Deprecated.  


getInactiveLayers

protected Collection getInactiveLayers()
Deprecated.  


getLayerManager

protected LayerManager getLayerManager()

getLightweightSystem

protected LightweightSystem getLightweightSystem()

getRootFigure

protected IFigure getRootFigure()
Deprecated. There is no reason to call this method


hookDropTarget

protected void hookDropTarget()
Overrides:
hookDropTarget in class AbstractEditPartViewer

menuAboutToShow

public void menuAboutToShow(IMenuManager menu)
Description copied from class: AbstractEditPartViewer
Called just before the context menu is shown.
Overrides:
menuAboutToShow in class AbstractEditPartViewer

hookControl

protected void hookControl()
Overrides:
hookControl in class AbstractEditPartViewer

registerAccessibleEditPart

public void registerAccessibleEditPart(AccessibleEditPart acc)
Specified by:
registerAccessibleEditPart in interface EditPartViewer
Overrides:
registerAccessibleEditPart in class AbstractEditPartViewer

setCursor

public void setCursor(Cursor newCursor)
Description copied from interface: EditPartViewer
Sets the cursor for the viewer's control.
Specified by:
setCursor in interface EditPartViewer
Overrides:
setCursor in class AbstractEditPartViewer
Following copied from interface: org.eclipse.gef.EditPartViewer
See Also:
EditPartViewer.getControl()

setEditDomain

public void setEditDomain(EditDomain domain)
Description copied from interface: EditPartViewer
Sets the EditDomain for this viewer. When this editor is set, it is the viewer's resposibility to route all of the mouse and keyboard events to the editor.
Specified by:
setEditDomain in interface EditPartViewer
Overrides:
setEditDomain in class AbstractEditPartViewer
Following copied from interface: org.eclipse.gef.EditPartViewer
Parameters:
domain - The EditDomain

setRootEditPart

public void setRootEditPart(RootEditPart editpart)
Description copied from interface: EditPartViewer
Sets the root of this viewer. It is uncommon to replace the default root. Instead, applications will typically call setContents(EditPart)
Specified by:
setRootEditPart in interface EditPartViewer
Overrides:
setRootEditPart in class AbstractEditPartViewer

setRootFigure

protected void setRootFigure(IFigure figure)

setRouteEventsToEditor

public void setRouteEventsToEditor(boolean value)
Description copied from interface: EditPartViewer
Turns on/off the routing of events directly to the Editor. If supported by the viewer, all events should be routed to the EditDomain rather than handled in the default way.
Specified by:
setRouteEventsToEditor in interface EditPartViewer
Overrides:
setRouteEventsToEditor in class AbstractEditPartViewer

unregisterAccessibleEditPart

public void unregisterAccessibleEditPart(AccessibleEditPart acc)
Specified by:
unregisterAccessibleEditPart in interface EditPartViewer
Overrides:
unregisterAccessibleEditPart in class AbstractEditPartViewer

GEF v2.0