org.eclipse.swtbot.eclipse.gef.finder.widgets
Class SWTBotGefFigureCanvas

java.lang.Object
  extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<T>
      extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl<Canvas>
          extended by org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefFigureCanvas

public class SWTBotGefFigureCanvas
extends AbstractSWTBotControl<Canvas>

A bot which wraps the swt canvas control.

Author:
mchauvin

Field Summary
protected  org.eclipse.draw2d.EventDispatcher eventDispatcher
           
 
Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
description, display, log, widget
 
Constructor Summary
SWTBotGefFigureCanvas(Canvas canvas, org.eclipse.draw2d.LightweightSystem lightweightSystem)
          Constructs a new instance from a Canvas and a LightweightSystem.
SWTBotGefFigureCanvas(org.eclipse.draw2d.FigureCanvas canvas)
          Constructs a new instance from a FigureCanvas.
 
Method Summary
 void mouseDrag(int fromXPosition, int fromYPosition, int toXPosition, int toYPosition)
          this method emits mouse events that handle drags within the canvas
 void mouseEnterLeftClickAndExit(int xPosition, int yPosition)
           
 void mouseMoveDoubleClick(int xPosition, int yPosition)
          this method emits mouse events that handle a mouse move and double click to the specified position within the canvas.
 void mouseMoveLeftClick(int xPosition, int yPosition)
           
 void typeText(Text textControl, String text)
           
 
Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl
absoluteLocation, click, moveMouseToWidget, rightClick
 
Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
assertEnabled, asyncExec, backgroundColor, click, click, clickXY, contextMenu, contextMenu, createEvent, createMouseEvent, createSelectionEvent, doubleClickXY, foregroundColor, getId, getText, getToolTipText, hasStyle, isActive, isEnabled, isEnabledInternal, isVisible, keyboard, notify, notify, notify, pressShortcut, pressShortcut, pressShortcut, rightClick, rightClick, setFocus, sleep, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, toString, traverse, waitForEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eventDispatcher

protected org.eclipse.draw2d.EventDispatcher eventDispatcher
Constructor Detail

SWTBotGefFigureCanvas

public SWTBotGefFigureCanvas(org.eclipse.draw2d.FigureCanvas canvas)
                      throws WidgetNotFoundException
Constructs a new instance from a FigureCanvas.

Parameters:
canvas - the canvas to wrap
Throws:
WidgetNotFoundException - if the widget is null or widget has been disposed.

SWTBotGefFigureCanvas

public SWTBotGefFigureCanvas(Canvas canvas,
                             org.eclipse.draw2d.LightweightSystem lightweightSystem)
                      throws WidgetNotFoundException
Constructs a new instance from a Canvas and a LightweightSystem. If the canvas is an instance of FigureCanvas, use SWTBotGefFigureCanvas(FigureCanvas) instead.

Parameters:
canvas - the canvas to wrap
lightweightSystem - the lightweight system to use
Throws:
WidgetNotFoundException - if the widget is null or widget has been disposed.
Method Detail

mouseMoveDoubleClick

public void mouseMoveDoubleClick(int xPosition,
                                 int yPosition)
this method emits mouse events that handle a mouse move and double click to the specified position within the canvas.

Parameters:
xPosition - the relative x position
yPosition - the relative y position

mouseDrag

public void mouseDrag(int fromXPosition,
                      int fromYPosition,
                      int toXPosition,
                      int toYPosition)
this method emits mouse events that handle drags within the canvas

Parameters:
fromXPosition - the relative x position within the canvas to drag from
fromYPosition - the relative y position within the canvas to drag from
toXPosition - the relative x position within the canvas to drag to
toYPosition - the relative y position within the canvas to drag to

mouseMoveLeftClick

public void mouseMoveLeftClick(int xPosition,
                               int yPosition)

mouseEnterLeftClickAndExit

public void mouseEnterLeftClickAndExit(int xPosition,
                                       int yPosition)

typeText

public void typeText(Text textControl,
                     String text)