Package org.netbeans.jemmy.operators
Class JPasswordFieldOperator
-
- All Implemented Interfaces:
Outputable
,Timeoutable
public class JPasswordFieldOperator extends JTextFieldOperator
Timeouts used:
JTextComponentOperator.PushKeyTimeout - time between key pressing and releasing during text typing
JTextComponentOperator.BetweenKeysTimeout - time to sleep between two chars typing
JTextComponentOperator.ChangeCaretPositionTimeout - maximum time to chenge caret position
JTextComponentOperator.TypeTextTimeout - maximum time to type text
ComponentOperator.WaitComponentTimeout - time to wait component displayed
ComponentOperator.WaitFocusTimeout - time to wait component focus
JScrollBarOperator.OneScrollClickTimeout - time for one scroll click
JScrollBarOperator.WholeScrollTimeout - time for the whole scrolling
.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JPasswordFieldOperator.JPasswordFieldFinder
Checks component type.-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JTextFieldOperator
JTextFieldOperator.JTextFieldFinder
-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JTextComponentOperator
JTextComponentOperator.JTextComponentByTextFinder, JTextComponentOperator.JTextComponentFinder, JTextComponentOperator.NoSuchTextException, JTextComponentOperator.TextChooser
-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.JComponentOperator
JComponentOperator.JComponentByTipFinder, JComponentOperator.JComponentFinder
-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.ContainerOperator
ContainerOperator.ContainerFinder
-
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
ECHO_CHAR_DPROP
Identifier for a "echo char" property.-
Fields inherited from class org.netbeans.jemmy.operators.JTextComponentOperator
IS_EDITABLE_DPROP, modifiersPressed, SELECTED_TEXT_DPROP, TEXT_DPROP
-
Fields inherited from class org.netbeans.jemmy.operators.JComponentOperator
A11Y_DATA, A11Y_DESCRIPTION_DPROP, A11Y_NAME_DPROP, TOOLTIP_TEXT_DPROP
-
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 JPasswordFieldOperator(JPasswordField b)
Constructor.JPasswordFieldOperator(ContainerOperator cont)
Constructor.JPasswordFieldOperator(ContainerOperator cont, int index)
Constructor.JPasswordFieldOperator(ContainerOperator cont, String text)
Constructor.JPasswordFieldOperator(ContainerOperator cont, String text, int index)
Constructor.JPasswordFieldOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a JPasswordFieldOperator object.JPasswordFieldOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a JPasswordFieldOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
echoCharIsSet()
MapsJPasswordField.echoCharIsSet()
through queuestatic JPasswordField
findJPasswordField(Container cont, String text, boolean ce, boolean ccs)
Searches JPasswordField by text.static JPasswordField
findJPasswordField(Container cont, String text, boolean ce, boolean ccs, int index)
Searches JPasswordField by text.static JPasswordField
findJPasswordField(Container cont, ComponentChooser chooser)
Searches JPasswordField in container.static JPasswordField
findJPasswordField(Container cont, ComponentChooser chooser, int index)
Searches JPasswordField in container.Hashtable
getDump()
Returns information about component.char
getEchoChar()
MapsJPasswordField.getEchoChar()
through queuechar[]
getPassword()
MapsJPasswordField.getPassword()
through queuevoid
setEchoChar(char c)
MapsJPasswordField.setEchoChar(char)
through queuestatic JPasswordField
waitJPasswordField(Container cont, String text, boolean ce, boolean ccs)
Waits JPasswordField by text.static JPasswordField
waitJPasswordField(Container cont, String text, boolean ce, boolean ccs, int index)
Waits JPasswordField by text.static JPasswordField
waitJPasswordField(Container cont, ComponentChooser chooser)
Waits JPasswordField in container.static JPasswordField
waitJPasswordField(Container cont, ComponentChooser chooser, int index)
Waits JPasswordField in container.-
Methods inherited from class org.netbeans.jemmy.operators.JTextFieldOperator
addActionListener, findJTextField, findJTextField, findJTextField, findJTextField, getColumns, getHorizontalAlignment, getHorizontalVisibility, getScrollOffset, postActionEvent, removeActionListener, setActionCommand, setColumns, setHorizontalAlignment, setScrollOffset, waitJTextField, waitJTextField, waitJTextField, waitJTextField, waitText, waitText
-
Methods inherited from class org.netbeans.jemmy.operators.JTextComponentOperator
addCaretListener, changeCaretPosition, changeCaretPosition, changeCaretPosition, clearText, copy, copyEnvironment, cut, enterText, findJTextComponent, findJTextComponent, findJTextComponent, findJTextComponent, getActions, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDisplayedText, getDocument, getFocusAccelerator, getHighlighter, getKeymap, getMargin, getOutput, getPositionByText, getPositionByText, getPositionByText, getPositionByText, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getTimeouts, getUI, isEditable, modelToView, moveCaretPosition, paste, read, removeCaretListener, replaceSelection, scrollToPosition, select, selectAll, selectText, selectText, selectText, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setDocument, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setOutput, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setTimeouts, setUI, typeText, typeText, viewToModel, waitCaretPosition, waitJTextComponent, waitJTextComponent, waitJTextComponent, waitJTextComponent, write
-
Methods inherited from class org.netbeans.jemmy.operators.JComponentOperator
addAncestorListener, addVetoableChangeListener, computeVisibleRect, createToolTip, findJComponent, findJComponent, findJComponent, findJComponent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getAutoscrolls, getBorder, getCenterXForClick, getCenterYForClick, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getInsets, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWindowContainerOperator, grabFocus, isFocusCycleRoot, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, showToolTip, unregisterKeyboardAction, updateUI, waitJComponent, waitJComponent, waitJComponent, waitJComponent, waitToolTip
-
Methods inherited from class org.netbeans.jemmy.operators.ContainerOperator
add, add, add, add, add, addContainerListener, createSubOperator, createSubOperator, findComponentAt, findComponentAt, findContainer, findContainer, findContainer, findContainer, findContainerUnder, findContainerUnder, findSubComponent, findSubComponent, getComponent, getComponentCount, getComponents, getInsets, getLayout, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, waitContainer, waitContainer, waitContainer, waitContainer, waitSubComponent, waitSubComponent
-
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, createImage, createImage, dispatchEvent, doLayout, dragMouse, dragMouse, dragMouse, dragNDrop, dragNDrop, dragNDrop, enableInputMethods, enterMouse, exitMouse, findComponent, findComponent, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getCenterX, getCenterY, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getContainer, getContainers, getCursor, getDropTarget, getEventDispatcher, getFocus, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getSize, getSource, 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, setSize, setSize, 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
-
ECHO_CHAR_DPROP
public static final String ECHO_CHAR_DPROP
Identifier for a "echo char" property.- See Also:
getDump()
, Constant Field Values
-
-
Constructor Detail
-
JPasswordFieldOperator
public JPasswordFieldOperator(JPasswordField b)
Constructor.- Parameters:
b
- a component
-
JPasswordFieldOperator
public JPasswordFieldOperator(ContainerOperator cont, ComponentChooser chooser, int index)
Constructs a JPasswordFieldOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
JPasswordFieldOperator
public JPasswordFieldOperator(ContainerOperator cont, ComponentChooser chooser)
Constructs a JPasswordFieldOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.
-
JPasswordFieldOperator
public JPasswordFieldOperator(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)
-
JPasswordFieldOperator
public JPasswordFieldOperator(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)
-
JPasswordFieldOperator
public JPasswordFieldOperator(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
-
JPasswordFieldOperator
public JPasswordFieldOperator(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
-
findJPasswordField
public static JPasswordField findJPasswordField(Container cont, ComponentChooser chooser, int index)
Searches JPasswordField in container.- Parameters:
cont
- Container to search component in.chooser
- a component chooser specifying searching criteria.index
- Ordinal component index.- Returns:
- JPasswordField instance or null if component was not found.
-
findJPasswordField
public static JPasswordField findJPasswordField(Container cont, ComponentChooser chooser)
Searches JPasswordField in container.- Parameters:
cont
- Container to search component in.chooser
- a component chooser specifying searching criteria.- Returns:
- JPasswordField instance or null if component was not found.
-
findJPasswordField
public static JPasswordField findJPasswordField(Container cont, String text, boolean ce, boolean ccs, int index)
Searches JPasswordField 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:
- JPasswordField instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
findJPasswordField
public static JPasswordField findJPasswordField(Container cont, String text, boolean ce, boolean ccs)
Searches JPasswordField by text.- Parameters:
cont
- Container to search component in.text
- Component text.ce
- Compare text exactly.ccs
- Compare text case sensitively.- Returns:
- JPasswordField instance or null if component was not found.
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitJPasswordField
public static JPasswordField waitJPasswordField(Container cont, ComponentChooser chooser, int index)
Waits JPasswordField in container.- Parameters:
cont
- Container to search component in.chooser
- a component chooser specifying searching criteria.index
- Ordinal component index.- Returns:
- JPasswordField instance.
- Throws:
TimeoutExpiredException
-
waitJPasswordField
public static JPasswordField waitJPasswordField(Container cont, ComponentChooser chooser)
Waits JPasswordField in container.- Parameters:
cont
- Container to search component in.chooser
- a component chooser specifying searching criteria.- Returns:
- JPasswordField instance.
- Throws:
TimeoutExpiredException
-
waitJPasswordField
public static JPasswordField waitJPasswordField(Container cont, String text, boolean ce, boolean ccs, int index)
Waits JPasswordField 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:
- JPasswordField instance.
- Throws:
TimeoutExpiredException
- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
waitJPasswordField
public static JPasswordField waitJPasswordField(Container cont, String text, boolean ce, boolean ccs)
Waits JPasswordField by text.- Parameters:
cont
- Container to search component in.text
- Component text.ce
- Compare text exactly.ccs
- Compare text case sensitively.- Returns:
- JPasswordField 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 classJTextComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
echoCharIsSet
public boolean echoCharIsSet()
MapsJPasswordField.echoCharIsSet()
through queue
-
getEchoChar
public char getEchoChar()
MapsJPasswordField.getEchoChar()
through queue
-
getPassword
public char[] getPassword()
MapsJPasswordField.getPassword()
through queue
-
setEchoChar
public void setEchoChar(char c)
MapsJPasswordField.setEchoChar(char)
through queue
-
-