|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefViewer
public class SWTBotGefViewer
represent a graphical viewer that uses the GEF framework.
Field Summary | |
---|---|
protected SWTBotGefFigureCanvas |
canvas
|
protected org.eclipse.gef.EditDomain |
editDomain
|
protected org.eclipse.gef.GraphicalViewer |
graphicalViewer
|
Constructor Summary | |
---|---|
SWTBotGefViewer(org.eclipse.gef.GraphicalViewer graphicalViewer)
Create a new bot GEF graphical viewer instance. |
Method Summary | |
---|---|
void |
activateDefaultTool()
Activate the default tool. |
SWTBotGefViewer |
activateTool(String label)
Activate the tool with the specified label. |
SWTBotGefViewer |
activateTool(String label,
int index)
Activate the tool with the specified label and the specified index. |
SWTBot |
bot()
|
void |
clear()
clear the cache of edit parts |
void |
click(int xPosition,
int yPosition)
Click on the editor at the specified location. |
void |
click(String label)
Click on the edit part which owns the specified label at the top left hand corner of its bounds. |
void |
click(SWTBotGefEditPart editPart)
Click on the specified edit part at the top left hand corner of its bounds. |
SWTBotGefViewer |
clickContextMenu(String text)
|
protected SWTBotGefConnectionEditPart |
createEditPart(org.eclipse.gef.ConnectionEditPart part)
lazily creates a SWTBotGefConnectionEditPart if this edit part does not exist yet. |
protected SWTBotGefEditPart |
createEditPart(org.eclipse.gef.EditPart part)
lazily creates a SWTBotGefEditPart if this edit part does not exist yet. |
void |
directEditType(String text)
type the given text into the graphical editor, presuming that it is already in 'direct edit' mode. |
void |
doubleClick(int xPosition,
int yPosition)
Double click on the editor at the specified location. |
void |
doubleClick(String label)
Double click on the edit part which owns the specified label at the top left hand corner (with an offset) of its bounds. |
void |
doubleClick(SWTBotGefEditPart editPart)
Double click on the edit part which owns the specified label at the top left hand corner (with an offset) of its bounds. |
void |
drag(int fromXPosition,
int fromYPosition,
int toXPosition,
int toYPosition)
Drag and drop from the specified to the specified location. |
void |
drag(String label,
int toXPosition,
int toYPosition)
Drag and drop the edit part which owns the specified label to the specified location |
void |
drag(SWTBotGefEditPart editPart,
int toXPosition,
int toYPosition)
Drag and drop the specified edit part to the specified location. |
List<SWTBotGefEditPart> |
editParts(Matcher<? extends org.eclipse.gef.EditPart> matcher)
|
org.eclipse.gef.palette.ToolEntry |
getActiveTool()
Get active tool. |
protected SWTBotGefFigureCanvas |
getCanvas()
Get the canvas to do low-level operations. |
protected Control |
getControl()
|
SWTBotGefEditPart |
getEditPart(String label)
get this edit part with the label as a single selection. |
SWTBotGefEditPart |
getEditpart(String label,
List<SWTBotGefEditPart> allEditParts)
Deprecated. |
protected void |
init()
|
SWTBotGefEditPart |
mainEditPart()
|
SWTBotGefEditPart |
rootEditPart()
retrieve the root edit part. |
SWTBotGefViewer |
select(Collection<SWTBotGefEditPart> parts)
select this edit part as a single selection |
SWTBotGefViewer |
select(String label)
select the edit part with the label as a single selection. |
SWTBotGefViewer |
select(SWTBotGefEditPart... parts)
select this edit part as a single selection |
List<SWTBotGefEditPart> |
selectedEditParts()
Get the selected edit parts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.gef.GraphicalViewer graphicalViewer
protected org.eclipse.gef.EditDomain editDomain
protected SWTBotGefFigureCanvas canvas
Constructor Detail |
---|
public SWTBotGefViewer(org.eclipse.gef.GraphicalViewer graphicalViewer) throws WidgetNotFoundException
graphicalViewer
- the graphical viewer to wrap
WidgetNotFoundException
- if graphical viewer is nullMethod Detail |
---|
public SWTBot bot()
public void clear()
protected void init() throws WidgetNotFoundException
WidgetNotFoundException
public SWTBotGefEditPart mainEditPart() throws WidgetNotFoundException
WidgetNotFoundException
public SWTBotGefEditPart rootEditPart() throws WidgetNotFoundException
WidgetNotFoundException
- if root edit part could not be foundGraphicalViewer#getRootEditPart()}
public List<SWTBotGefEditPart> selectedEditParts()
protected SWTBotGefEditPart createEditPart(org.eclipse.gef.EditPart part)
SWTBotGefEditPart
if this edit part does not exist yet. If an instance encapsulating the
specified edit part has been created before, that instance is returned.
part
- the edit part to create a SWTBotGefEditPart
for
SWTBotGefEditPart
protected SWTBotGefConnectionEditPart createEditPart(org.eclipse.gef.ConnectionEditPart part)
SWTBotGefConnectionEditPart
if this edit part does not exist yet. If an instance
encapsulating the specified edit part has been created before, that instance is returned.
part
- a connection edit part connecting graphical nodes
SWTBotGefConnectionEditPart
encapsulating the connection edit partpublic void activateDefaultTool()
public SWTBotGefViewer activateTool(String label) throws WidgetNotFoundException
activateTool(String, int)
label
- the label of the tool to activate
WidgetNotFoundException
- if the tool with label specified could not be foundpublic SWTBotGefViewer activateTool(String label, int index) throws WidgetNotFoundException
activateTool(String)
label
- the label of the tool to activateindex
- the index to use in order to make the selection.
WidgetNotFoundException
- if the tool with label specified could not be foundpublic void directEditType(String text) throws WidgetNotFoundException
text
- the text to type.
WidgetNotFoundException
public List<SWTBotGefEditPart> editParts(Matcher<? extends org.eclipse.gef.EditPart> matcher) throws WidgetNotFoundException
matcher
- the matcher that matches on EditPart
SWTBotGefEditPart
WidgetNotFoundException
protected SWTBotGefFigureCanvas getCanvas()
protected Control getControl()
public org.eclipse.gef.palette.ToolEntry getActiveTool()
public SWTBotGefViewer select(SWTBotGefEditPart... parts)
public SWTBotGefViewer select(Collection<SWTBotGefEditPart> parts)
public SWTBotGefViewer clickContextMenu(String text) throws WidgetNotFoundException
WidgetNotFoundException
public void click(int xPosition, int yPosition)
xPosition
- the x relative positionyPosition
- the y relative positionpublic void click(SWTBotGefEditPart editPart)
editPart
- the edit part to click onpublic void click(String label)
label
- the label to retrieve edit part to click onpublic void doubleClick(int xPosition, int yPosition)
xPosition
- the x relative positionyPosition
- the y relative positionpublic void doubleClick(SWTBotGefEditPart editPart)
editPart
- the edit part to double click onpublic void doubleClick(String label)
label
- the label to retrieve edit part to double click onpublic void drag(int fromXPosition, int fromYPosition, int toXPosition, int toYPosition)
toXPosition
- the x relative locationtoYPosition
- the y relative locationpublic void drag(SWTBotGefEditPart editPart, int toXPosition, int toYPosition)
editPart
- the edit part to drag and droptoXPosition
- the x relative locationtoYPosition
- the y relative locationpublic void drag(String label, int toXPosition, int toYPosition)
label
- the label to retrieve the edit part to drag and droptoXPosition
- the x relative positiontoYPosition
- the y relative positionpublic SWTBotGefViewer select(String label)
public SWTBotGefEditPart getEditPart(String label)
@Deprecated public SWTBotGefEditPart getEditpart(String label, List<SWTBotGefEditPart> allEditParts)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |