Package org.netbeans.jemmy.operators
Class LabelOperator
- java.lang.Object
-
- org.netbeans.jemmy.operators.Operator
-
- org.netbeans.jemmy.operators.ComponentOperator
-
- org.netbeans.jemmy.operators.LabelOperator
-
- All Implemented Interfaces:
Outputable
,Timeoutable
public class LabelOperator extends ComponentOperator
Timeouts used:
ComponentOperator.WaitComponentTimeout - time to wait component displayed
.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LabelOperator.LabelByLabelFinder
Allows to find component by LabelByLabelFinder.static class
LabelOperator.LabelFinder
Checks component type.-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.Operator
Operator.ComponentVisualizer, Operator.DefaultPathParser, Operator.DefaultStringComparator, Operator.Finder, Operator.MapAction, Operator.MapBooleanAction, Operator.MapByteAction, Operator.MapCharacterAction, Operator.MapDoubleAction, Operator.MapFloatAction, Operator.MapIntegerAction, Operator.MapLongAction, Operator.MapVoidAction, Operator.NoBlockingAction, Operator.PathParser, Operator.StringComparator
-
-
Field Summary
Fields Modifier and Type Field Description static String
TEXT_DPROP
Identifier for a "text" property.-
Fields inherited from class org.netbeans.jemmy.operators.ComponentOperator
HEIGHT_DPROP, IS_SHOWING_DPROP, IS_VISIBLE_DPROP, NAME_DPROP, WIDTH_DPROP, X_DPROP, Y_DPROP
-
Fields inherited from class org.netbeans.jemmy.operators.Operator
CLASS_DPROP, TO_STRING_DPROP
-
-
Constructor Summary
Constructors Constructor Description LabelOperator(Label b)
Constructor.LabelOperator(ContainerOperator cont)
Constructor.LabelOperator(ContainerOperator cont, int index)
Constructor.LabelOperator(ContainerOperator cont, String text)
Constructor.LabelOperator(ContainerOperator cont, String text, int index)
Constructor.LabelOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a LabelOperator object.LabelOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a LabelOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Label
findLabel(Container cont, String text, boolean ce, boolean ccs)
Searches Label by text.static Label
findLabel(Container cont, String text, boolean ce, boolean ccs, int index)
Searches Label by text.static Label
findLabel(Container cont, ComponentChooser chooser)
Searches Label in container.static Label
findLabel(Container cont, ComponentChooser chooser, int index)
Searches Label in container.int
getAlignment()
MapsLabel.getAlignment()
through queueHashtable
getDump()
Returns information about component.String
getText()
MapsLabel.getText()
through queuevoid
setAlignment(int i)
MapsLabel.setAlignment(int)
through queuevoid
setText(String string)
MapsLabel.setText(String)
through queuestatic Label
waitLabel(Container cont, String text, boolean ce, boolean ccs)
Waits Label by text.static Label
waitLabel(Container cont, String text, boolean ce, boolean ccs, int index)
Waits Label by text.static Label
waitLabel(Container cont, ComponentChooser chooser)
Waits Label in container.static Label
waitLabel(Container cont, ComponentChooser chooser, int index)
Waits Label in container.-
Methods inherited from class org.netbeans.jemmy.operators.ComponentOperator
activateWindow, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, checkImage, checkImage, clickForPopup, clickForPopup, clickForPopup, clickForPopup, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, clickMouse, contains, contains, copyEnvironment, createImage, createImage, dispatchEvent, doLayout, dragMouse, dragMouse, dragMouse, dragNDrop, dragNDrop, dragNDrop, enableInputMethods, enterMouse, exitMouse, findComponent, findComponent, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getCenterX, getCenterXForClick, getCenterY, getCenterYForClick, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getContainer, getContainers, getCursor, getDropTarget, getEventDispatcher, getFocus, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getOutput, getParent, getPreferredSize, getSize, getSize, getSource, getTimeouts, getToolkit, getTreeLock, getWidth, getWindow, getX, getY, hasFocus, imageUpdate, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, list, list, list, list, list, makeComponentVisible, moveMouse, paint, paintAll, prepareImage, prepareImage, pressKey, pressKey, pressMouse, pressMouse, print, printAll, pushKey, pushKey, releaseKey, releaseKey, releaseMouse, releaseMouse, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setOutput, setSize, setSize, setTimeouts, setVisible, transferFocus, typeKey, typeKey, typeKey, update, validate, waitComponent, waitComponent, waitComponent, waitComponent, waitComponentEnabled, waitComponentShowing, waitComponentVisible, waitHasFocus, wtComponentEnabled
-
Methods inherited from class org.netbeans.jemmy.operators.Operator
addOperatorPackage, addToDump, addToDump, createOperator, getCharBindingMap, getCharKey, getCharModifiers, getCharsKeys, getCharsKeys, getCharsModifiers, getCharsModifiers, getComparator, getDefaultComponentVisualizer, getDefaultMouseButton, getDefaultPathParser, getDefaultStringComparator, getDefaultVerification, getEnvironmentOperator, getParentPath, getParentPath, getPathParser, getPopupMouseButton, getProperties, getQueueTool, getVerification, getVisualizer, isCaptionEqual, isCaptionEqual, isCaptionEqual, lockQueue, parseString, parseString, printDump, produceNoBlocking, produceNoBlocking, produceTimeRestricted, produceTimeRestricted, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, runMapping, setCharBindingMap, setComparator, setDefaultComponentVisualizer, setDefaultPathParser, setDefaultStringComparator, setDefaultVerification, setPathParser, setProperties, setVerification, setVisualizer, toStringSource, unlockAndThrow, unlockQueue, waitState
-
-
-
-
Field Detail
-
TEXT_DPROP
public static final String TEXT_DPROP
Identifier for a "text" property.- See Also:
getDump()
, Constant Field Values
-
-
Constructor Detail
-
LabelOperator
public LabelOperator(Label b)
Constructor.- Parameters:
b
- a component
-
LabelOperator
public LabelOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a LabelOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
LabelOperator
public LabelOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a LabelOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.
-
LabelOperator
public LabelOperator(ContainerOperator cont, String text, int index)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- a containertext
- Button text.index
- Ordinal component index.- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
LabelOperator
public LabelOperator(ContainerOperator cont, String text)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- a containertext
- Button text.- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
LabelOperator
public LabelOperator(ContainerOperator cont, int index)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- a containerindex
- Ordinal component index.- Throws:
TimeoutExpiredException
-
LabelOperator
public LabelOperator(ContainerOperator cont)
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- a container- Throws:
TimeoutExpiredException
-
-
Method Detail
-
findLabel
public static Label findLabel(Container cont, ComponentChooser chooser, int index)
Searches Label in container.- Parameters:
cont
- Container to search component in.chooser
- a component chooser specifying searching criteria.index
- Ordinal component index.- Returns:
- Label instance or null if component was not found.
-
findLabel
public static Label findLabel(Container cont, ComponentChooser chooser)
Searches Label in container.- Parameters:
cont
- Container to search component in.chooser
- a component chooser specifying searching criteria.- Returns:
- Label instance or null if component was not found.
-
findLabel
public static Label findLabel(Container cont, String text, boolean ce, boolean ccs, int index)
Searches Label by text.- Parameters:
cont
- Container to search component in.text
- Component text.ce
- Compare text exactly.ccs
- Compare text case sensitively.index
- Ordinal component index.- Returns:
- Label instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findLabel
public static Label findLabel(Container cont, String text, boolean ce, boolean ccs)
Searches Label by text.- Parameters:
cont
- Container to search component in.text
- Component text.ce
- Compare text exactly.ccs
- Compare text case sensitively.- Returns:
- Label instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitLabel
public static Label waitLabel(Container cont, ComponentChooser chooser, int index)
Waits Label in container.- Parameters:
cont
- Container to search component in.chooser
- a component chooser specifying searching criteria.index
- Ordinal component index.- Returns:
- Label instance.
- Throws:
TimeoutExpiredException
-
waitLabel
public static Label waitLabel(Container cont, ComponentChooser chooser)
Waits Label in container.- Parameters:
cont
- Container to search component in.chooser
- a component chooser specifying searching criteria.- Returns:
- Label instance.
- Throws:
TimeoutExpiredException
-
waitLabel
public static Label waitLabel(Container cont, String text, boolean ce, boolean ccs, int index)
Waits Label by text.- Parameters:
cont
- Container to search component in.text
- Component text.ce
- Compare text exactly.ccs
- Compare text case sensitively.index
- Ordinal component index.- Returns:
- Label instance.
- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitLabel
public static Label waitLabel(Container cont, String text, boolean ce, boolean ccs)
Waits Label by text.- Parameters:
cont
- Container to search component in.text
- Component text.ce
- Compare text exactly.ccs
- Compare text case sensitively.- Returns:
- Label instance.
- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
getDump
public Hashtable getDump()
Description copied from class:ComponentOperator
Returns information about component.- Overrides:
getDump
in classComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
getAlignment
public int getAlignment()
MapsLabel.getAlignment()
through queue
-
getText
public String getText()
MapsLabel.getText()
through queue
-
setAlignment
public void setAlignment(int i)
MapsLabel.setAlignment(int)
through queue
-
setText
public void setText(String string)
MapsLabel.setText(String)
through queue
-
-