org.eclipse.datatools.sqltools.plan
Class AbstractPlanDrawer

java.lang.Object
  extended by org.eclipse.datatools.sqltools.plan.AbstractPlanDrawer
All Implemented Interfaces:
IPlanDrawer
Direct Known Subclasses:
TreePlanDrawer

public abstract class AbstractPlanDrawer
extends java.lang.Object
implements IPlanDrawer

Consumers of Execution Plan View can extend this class intead of implementing IPlanDrawer from scratch.

Author:
Dafan Yang

Constructor Summary
AbstractPlanDrawer()
          The invoker should call setCanvas() and setBrowser() after contruct a plan drawer using this contructor.
AbstractPlanDrawer(org.eclipse.swt.widgets.Canvas canvas, org.eclipse.swt.browser.Browser browser)
          Constructor
 
Method Summary
abstract  void drawPlan(IExecutionPlanDocument planDoc)
          Draws the given execution plan
abstract  void init()
          Initializes the drawer, this method will be invoked after the drawer is constructed
 void setBrowser(org.eclipse.swt.browser.Browser browser)
          Sets the browser on which the detail information of one plan node is displayed
 void setCanvas(org.eclipse.swt.widgets.Canvas canvas)
          Sets the canvas on which the graphic plan is drawn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPlanDrawer

public AbstractPlanDrawer()
The invoker should call setCanvas() and setBrowser() after contruct a plan drawer using this contructor.


AbstractPlanDrawer

public AbstractPlanDrawer(org.eclipse.swt.widgets.Canvas canvas,
                          org.eclipse.swt.browser.Browser browser)
Constructor

Parameters:
canvas - the canvas, will be used to display graphic plan
browser - the browser, will be used to display node detail information
Method Detail

drawPlan

public abstract void drawPlan(IExecutionPlanDocument planDoc)
Description copied from interface: IPlanDrawer
Draws the given execution plan

Specified by:
drawPlan in interface IPlanDrawer
Parameters:
planDoc - the exeuction plan

init

public abstract void init()
Description copied from interface: IPlanDrawer
Initializes the drawer, this method will be invoked after the drawer is constructed

Specified by:
init in interface IPlanDrawer

setBrowser

public void setBrowser(org.eclipse.swt.browser.Browser browser)
Description copied from interface: IPlanDrawer
Sets the browser on which the detail information of one plan node is displayed

Specified by:
setBrowser in interface IPlanDrawer
Parameters:
browser - the browser

setCanvas

public void setCanvas(org.eclipse.swt.widgets.Canvas canvas)
Description copied from interface: IPlanDrawer
Sets the canvas on which the graphic plan is drawn

Specified by:
setCanvas in interface IPlanDrawer
Parameters:
canvas - the canvas