org.eclipse.swtbot.swt.finder.widgets
Class SWTBotLabel

java.lang.Object
  extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<T>
      extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl<Label>
          extended by org.eclipse.swtbot.swt.finder.widgets.SWTBotLabel

public class SWTBotLabel
extends AbstractSWTBotControl<Label>

This represents a Label widget.

Since:
1.2
Version:
$Id$
Author:
Stephen Paulin <paulin [at] developerskingdom [dot] com>

Field Summary
 
Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
description, display, log, widget
 
Constructor Summary
SWTBotLabel(Label widget)
          Constructs an instance of this using the given finder and text to search for.
SWTBotLabel(Label widget, SelfDescribing description)
          Constructs an instance of this using the given finder and text to search for.
 
Method Summary
 int alignment()
          Returns the alignment.
 Image image()
          Return the Label's image or null.
 
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
 

Constructor Detail

SWTBotLabel

public SWTBotLabel(Label widget)
            throws WidgetNotFoundException
Constructs an instance of this using the given finder and text to search for.

Parameters:
widget - the widget
Throws:
WidgetNotFoundException - if the widget is null or disposed.

SWTBotLabel

public SWTBotLabel(Label widget,
                   SelfDescribing description)
            throws WidgetNotFoundException
Constructs an instance of this using the given finder and text to search for.

Parameters:
widget - the widget
description - the description of the widget, this will be reported by AbstractSWTBot.toString()
Throws:
WidgetNotFoundException - if the widget is null or disposed.
Method Detail

image

public Image image()
Return the Label's image or null.

Returns:
the image of the label or null.

alignment

public int alignment()
Returns the alignment. The alignment style (LEFT, CENTER or RIGHT) is returned.

Returns:
SWT.LEFT, SWT.RIGHT or SWT.CENTER