org.eclipse.swtbot.eclipse.gef.finder.widgets
Class SWTBotGefFigureCanvas
java.lang.Object
org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<T>
org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl<Canvas>
org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefFigureCanvas
public class SWTBotGefFigureCanvas
- extends AbstractSWTBotControl<Canvas>
A bot which wraps the swt canvas control.
- Author:
- mchauvin
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.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 |
eventDispatcher
protected org.eclipse.draw2d.EventDispatcher eventDispatcher
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 wraplightweightSystem
- the lightweight system to use
- Throws:
WidgetNotFoundException
- if the widget is null
or widget has been disposed.
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 positionyPosition
- 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 fromfromYPosition
- the relative y position within the canvas to drag fromtoXPosition
- the relative x position within the canvas to drag totoYPosition
- 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)