Package org.netbeans.jemmy.operators
Class JProgressBarOperator
java.lang.Object
org.netbeans.jemmy.operators.Operator
org.netbeans.jemmy.operators.ComponentOperator
org.netbeans.jemmy.operators.ContainerOperator
org.netbeans.jemmy.operators.JComponentOperator
org.netbeans.jemmy.operators.JProgressBarOperator
- All Implemented Interfaces:
Outputable
,Timeoutable
Operator is supposed to be used to operate with an instance of
javax.swing.JProgressBar class.
Timeouts used:
JProgressBarOperator.WaitValueTimeout - used from waitValue() method
.
Timeouts used:
JProgressBarOperator.WaitValueTimeout - used from waitValue() method
.
- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Checks component type.static interface
Deprecated.Use waitState(ComponentChooser) instead.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
FieldsModifier and TypeFieldDescriptionstatic final String
Identifier for a "maximum" property.static final String
Identifier for a "minimum" property.static final String
Identifier for a "value" property.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
ConstructorsConstructorDescriptionConstructor.Constructor.JProgressBarOperator
(ContainerOperator cont, int index) Constructor.JProgressBarOperator
(ContainerOperator cont, ComponentChooser chooser) Constructs a JProgressBarOperator object.JProgressBarOperator
(ContainerOperator cont, ComponentChooser chooser, int index) Constructs a JProgressBarOperator object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(ChangeListener changeListener) MapsJProgressBar.addChangeListener(ChangeListener)
through queuestatic JProgressBar
findJProgressBar
(Container cont) Searches 0'th JProgressBar in container.static JProgressBar
findJProgressBar
(Container cont, int index) Searches JProgressBar in container.static JProgressBar
findJProgressBar
(Container cont, ComponentChooser chooser) Searches 0'th JProgressBar in container.static JProgressBar
findJProgressBar
(Container cont, ComponentChooser chooser, int index) Searches JProgressBar in container.getDump()
Returns information about component.int
MapsJProgressBar.getMaximum()
through queueint
MapsJProgressBar.getMinimum()
through queuegetModel()
MapsJProgressBar.getModel()
through queueint
MapsJProgressBar.getOrientation()
through queueReturns print output streams or writers.double
MapsJProgressBar.getPercentComplete()
through queueMapsJProgressBar.getString()
through queueReturn current timeouts.getUI()
MapsJProgressBar.getUI()
through queueint
getValue()
MapsJProgressBar.getValue()
through queueboolean
MapsJProgressBar.isBorderPainted()
through queueboolean
MapsJProgressBar.isStringPainted()
through queuevoid
removeChangeListener
(ChangeListener changeListener) MapsJProgressBar.removeChangeListener(ChangeListener)
through queuevoid
setBorderPainted
(boolean b) MapsJProgressBar.setBorderPainted(boolean)
through queuevoid
setMaximum
(int i) MapsJProgressBar.setMaximum(int)
through queuevoid
setMinimum
(int i) MapsJProgressBar.setMinimum(int)
through queuevoid
setModel
(BoundedRangeModel boundedRangeModel) MapsJProgressBar.setModel(BoundedRangeModel)
through queuevoid
setOrientation
(int i) MapsJProgressBar.setOrientation(int)
through queuevoid
Defines print output streams or writers.void
MapsJProgressBar.setString(String)
through queuevoid
setStringPainted
(boolean b) MapsJProgressBar.setStringPainted(boolean)
through queuevoid
setTimeouts
(Timeouts timeouts) Defines current timeouts.void
setUI
(ProgressBarUI progressBarUI) MapsJProgressBar.setUI(ProgressBarUI)
through queuevoid
setValue
(int i) MapsJProgressBar.setValue(int)
through queuestatic JProgressBar
waitJProgressBar
(Container cont) Waits 0'th JProgressBar in container.static JProgressBar
waitJProgressBar
(Container cont, int index) Waits JProgressBar in container.static JProgressBar
waitJProgressBar
(Container cont, ComponentChooser chooser) Waits 0'th JProgressBar in container.static JProgressBar
waitJProgressBar
(Container cont, ComponentChooser chooser, int index) Waits JProgressBar in container.void
waitValue
(int value) Waits progress bar value to be less or equal tovalue
parameter.void
Waits progress bar string to matchvalue
parameter.void
Deprecated.Use waitState(ComponentChooser) instead.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, copyEnvironment, 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 Details
-
MINIMUM_DPROP
Identifier for a "minimum" property.- See Also:
-
MAXIMUM_DPROP
Identifier for a "maximum" property.- See Also:
-
VALUE_DPROP
Identifier for a "value" property.- See Also:
-
-
Constructor Details
-
JProgressBarOperator
Constructor.- Parameters:
b
- JProgressBar component.
-
JProgressBarOperator
Constructs a JProgressBarOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
JProgressBarOperator
Constructs a JProgressBarOperator object.- Parameters:
cont
- a containerchooser
- a component chooser specifying searching criteria.
-
JProgressBarOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- Operator pointing a container to search component in.index
- Ordinal component index.- Throws:
TimeoutExpiredException
-
JProgressBarOperator
Constructor. Waits component in container first. Uses cont's timeout and output for waiting and to init operator.- Parameters:
cont
- Operator pointing a container to search component in.- Throws:
TimeoutExpiredException
-
-
Method Details
-
findJProgressBar
Searches JProgressBar in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- JProgressBar instance or null if component was not found.
-
findJProgressBar
Searches 0'th JProgressBar in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JProgressBar instance or null if component was not found.
-
findJProgressBar
Searches JProgressBar in container.- Parameters:
cont
- Container to search component in.index
- Ordinal component index.- Returns:
- JProgressBar instance or null if component was not found.
-
findJProgressBar
Searches 0'th JProgressBar in container.- Parameters:
cont
- Container to search component in.- Returns:
- JProgressBar instance or null if component was not found.
-
waitJProgressBar
Waits JProgressBar in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.index
- Ordinal component index.- Returns:
- JProgressBar instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJProgressBar
Waits 0'th JProgressBar in container.- Parameters:
cont
- Container to search component in.chooser
- org.netbeans.jemmy.ComponentChooser implementation.- Returns:
- JProgressBar instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJProgressBar
Waits JProgressBar in container.- Parameters:
cont
- Container to search component in.index
- Ordinal component index.- Returns:
- JProgressBar instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
waitJProgressBar
Waits 0'th JProgressBar in container.- Parameters:
cont
- Container to search component in.- Returns:
- JProgressBar instance or null if component was not displayed.
- Throws:
TimeoutExpiredException
-
setTimeouts
Description copied from interface:Timeoutable
Defines current timeouts.- Specified by:
setTimeouts
in interfaceTimeoutable
- Overrides:
setTimeouts
in classJComponentOperator
- Parameters:
timeouts
- A collection of timeout assignments.- See Also:
-
getTimeouts
Description copied from interface:Timeoutable
Return current timeouts.- Specified by:
getTimeouts
in interfaceTimeoutable
- Overrides:
getTimeouts
in classJComponentOperator
- Returns:
- the collection of current timeout assignments.
- See Also:
-
setOutput
Description copied from interface:Outputable
Defines print output streams or writers.- Specified by:
setOutput
in interfaceOutputable
- Overrides:
setOutput
in classJComponentOperator
- Parameters:
out
- Identify the streams or writers used for print output.- See Also:
-
getOutput
Description copied from interface:Outputable
Returns print output streams or writers.- Specified by:
getOutput
in interfaceOutputable
- Overrides:
getOutput
in classJComponentOperator
- Returns:
- an object that contains references to objects for printing to output and err streams.
- See Also:
-
waitValue
Deprecated.Use waitState(ComponentChooser) instead.Waits for criteria defined bychooser
to be reached.- Parameters:
chooser
- an object specifying waiting criteria.- See Also:
-
waitValue
public void waitValue(int value) Waits progress bar value to be less or equal tovalue
parameter. Can be used for typical progress bar (when value is increasing).- Parameters:
value
- a value to reach.
-
waitValue
Waits progress bar string to matchvalue
parameter.- Parameters:
value
- a string value.
-
getDump
Description copied from class:ComponentOperator
Returns information about component.- Overrides:
getDump
in classJComponentOperator
- Returns:
- a Hashtable containing name-value pairs.
-
addChangeListener
MapsJProgressBar.addChangeListener(ChangeListener)
through queue -
getMaximum
public int getMaximum()MapsJProgressBar.getMaximum()
through queue -
getMinimum
public int getMinimum()MapsJProgressBar.getMinimum()
through queue -
getModel
MapsJProgressBar.getModel()
through queue -
getOrientation
public int getOrientation()MapsJProgressBar.getOrientation()
through queue -
getPercentComplete
public double getPercentComplete()MapsJProgressBar.getPercentComplete()
through queue -
getString
MapsJProgressBar.getString()
through queue -
getUI
MapsJProgressBar.getUI()
through queue -
getValue
public int getValue()MapsJProgressBar.getValue()
through queue -
isBorderPainted
public boolean isBorderPainted()MapsJProgressBar.isBorderPainted()
through queue -
isStringPainted
public boolean isStringPainted()MapsJProgressBar.isStringPainted()
through queue -
removeChangeListener
MapsJProgressBar.removeChangeListener(ChangeListener)
through queue -
setBorderPainted
public void setBorderPainted(boolean b) MapsJProgressBar.setBorderPainted(boolean)
through queue -
setMaximum
public void setMaximum(int i) MapsJProgressBar.setMaximum(int)
through queue -
setMinimum
public void setMinimum(int i) MapsJProgressBar.setMinimum(int)
through queue -
setModel
MapsJProgressBar.setModel(BoundedRangeModel)
through queue -
setOrientation
public void setOrientation(int i) MapsJProgressBar.setOrientation(int)
through queue -
setString
MapsJProgressBar.setString(String)
through queue -
setStringPainted
public void setStringPainted(boolean b) MapsJProgressBar.setStringPainted(boolean)
through queue -
setUI
MapsJProgressBar.setUI(ProgressBarUI)
through queue -
setValue
public void setValue(int i) MapsJProgressBar.setValue(int)
through queue
-