org.eclipse.swtbot.swt.finder
Annotation Type SWTBotWidget


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface SWTBotWidget

Marks a SWTBot widget so tools recognise them. This anotation is primarily used to describe the convinience API that should be generated for a class annotated with the specified widget.

Usage:

 @SWTBotWidget(clasz = Button.class, style = @Style(name = "SWT.PUSH", value = SWT.PUSH), preferredName = "button", referenceBy = { ReferenceBy.LABEL, ReferenceBy.MNEMONIC, ReferenceBy.TOOLTIP })
 public class SWTBotButton ...{
   // the implement 
 }
 
The above represents: This annotation will generate the following convinience API to find buttons:

Since:
2.0
Version:
$Id$
Author:
Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>

Required Element Summary
 Class<? extends Widget> clasz
          Widget is of the specified class
 String preferredName
          The preferred name for the widget
 
Optional Element Summary
 ReferenceBy[] defaultReferenceBy
          Default reference by
 ReferenceBy[] referenceBy
          Widget can be found using the following methods
 Class<?> returnType
           
 Style style
          If a the specified widget can have different styles, specify one of the styles in SWT
 

Element Detail

clasz

public abstract Class<? extends Widget> clasz
Widget is of the specified class


preferredName

public abstract String preferredName
The preferred name for the widget

referenceBy

public abstract ReferenceBy[] referenceBy
Widget can be found using the following methods

Default:
{org.eclipse.swtbot.swt.finder.ReferenceBy.ID_KEY_VALUE, org.eclipse.swtbot.swt.finder.ReferenceBy.ID_VALUE, org.eclipse.swtbot.swt.finder.ReferenceBy.IN_GROUP, org.eclipse.swtbot.swt.finder.ReferenceBy.LABEL, org.eclipse.swtbot.swt.finder.ReferenceBy.MNEMONIC, org.eclipse.swtbot.swt.finder.ReferenceBy.NONE, org.eclipse.swtbot.swt.finder.ReferenceBy.TEXT, org.eclipse.swtbot.swt.finder.ReferenceBy.TOOLTIP}

style

public abstract Style style
If a the specified widget can have different styles, specify one of the styles in SWT

Default:
@org.eclipse.swtbot.swt.finder.Style

defaultReferenceBy

public abstract ReferenceBy[] defaultReferenceBy
Default reference by

Default:
{org.eclipse.swtbot.swt.finder.ReferenceBy.ID_KEY_VALUE, org.eclipse.swtbot.swt.finder.ReferenceBy.ID_VALUE, org.eclipse.swtbot.swt.finder.ReferenceBy.IN_GROUP, org.eclipse.swtbot.swt.finder.ReferenceBy.NONE}

returnType

public abstract Class<?> returnType
Default:
java.lang.Object.class