Package org.netbeans.jemmy.operators
Class JFrameOperator
-
- All Implemented Interfaces:
Outputable
,Timeoutable
public class JFrameOperator extends FrameOperator
Timeouts used:
FrameWaiter.WaitFrameTimeout - time to wait frame displayed
FrameWaiter.AfterFrameTimeout - time to sleep after frame has been dispayed
.- Author:
- Alexandre Iline (alexandre.iline@sun.com)
- See Also:
Timeouts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JFrameOperator.JFrameFinder
Checks component type.-
Nested classes/interfaces inherited from class org.netbeans.jemmy.operators.FrameOperator
FrameOperator.FrameByTitleFinder, FrameOperator.FrameFinder
-
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 inherited from class org.netbeans.jemmy.operators.FrameOperator
IS_RESIZABLE_DPROP, STATE_DPROP, STATE_ICONIFIED_DPROP_VALUE, STATE_NORMAL_DPROP_VALUE, TITLE_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 JFrameOperator()
Constructor.JFrameOperator(int index)
Constructor.JFrameOperator(String title)
Constructor.JFrameOperator(String title, int index)
Constructor.JFrameOperator(String title, int index, Operator env)
Constructor.JFrameOperator(JFrame w)
Constructor.JFrameOperator(ComponentChooser chooser)
Constructs a JFrameOperator object.JFrameOperator(ComponentChooser chooser, int index)
Constructs a JFrameOperator object.JFrameOperator(ComponentChooser chooser, int index, Operator env)
Constructs a JFrameOperator object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JFrame
findJFrame(String title, boolean ce, boolean cc)
Searches a frame by title.static JFrame
findJFrame(String title, boolean ce, boolean cc, int index)
Searches an index'th frame by title.static JFrame
findJFrame(ComponentChooser chooser)
Searches a frame.static JFrame
findJFrame(ComponentChooser chooser, int index)
Searches an index'th frame.AccessibleContext
getAccessibleContext()
MapsJFrame.getAccessibleContext()
through queueContainer
getContentPane()
MapsJFrame.getContentPane()
through queueint
getDefaultCloseOperation()
MapsJFrame.getDefaultCloseOperation()
through queueComponent
getGlassPane()
MapsJFrame.getGlassPane()
through queueJMenuBar
getJMenuBar()
MapsJFrame.getJMenuBar()
through queueJLayeredPane
getLayeredPane()
MapsJFrame.getLayeredPane()
through queueJRootPane
getRootPane()
MapsJFrame.getRootPane()
through queuevoid
setContentPane(Container container)
MapsJFrame.setContentPane(Container)
through queuevoid
setDefaultCloseOperation(int i)
MapsJFrame.setDefaultCloseOperation(int)
through queuevoid
setGlassPane(Component component)
MapsJFrame.setGlassPane(Component)
through queuevoid
setJMenuBar(JMenuBar jMenuBar)
MapsJFrame.setJMenuBar(JMenuBar)
through queuevoid
setLayeredPane(JLayeredPane jLayeredPane)
MapsJFrame.setLayeredPane(JLayeredPane)
through queuestatic JFrame
waitJFrame(String title, boolean ce, boolean cc)
Waits a frame by title.static JFrame
waitJFrame(String title, boolean ce, boolean cc, int index)
Waits an index'th frame by title.static JFrame
waitJFrame(ComponentChooser chooser)
Waits a frame.static JFrame
waitJFrame(ComponentChooser chooser, int index)
Waits an index'th frame.-
Methods inherited from class org.netbeans.jemmy.operators.FrameOperator
copyEnvironment, deiconify, demaximize, getDump, getIconImage, getMenuBar, getOutput, getState, getTitle, iconify, isResizable, maximize, setIconImage, setMenuBar, setOutput, setResizable, setState, setTitle, waitFrame, waitState, waitTitle
-
Methods inherited from class org.netbeans.jemmy.operators.WindowOperator
activate, addWindowListener, applyResourceBundle, applyResourceBundle, close, dispose, findSubWindow, findSubWindow, findWindow, findWindow, findWindow, findWindow, getFocusOwner, getOwnedWindows, getOwner, getWarningString, isActive, isFocused, move, pack, removeWindowListener, requestClose, requestCloseAndThenHide, resize, toBack, toFront, waitClosed, waitSubWindow, waitSubWindow, waitWindow, waitWindow, waitWindow, waitWindow, waitWindow, waitWindow, waitWindow
-
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, getTimeouts, isAncestorOf, paintComponents, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, setTimeouts, 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, 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, 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
-
-
-
-
Constructor Detail
-
JFrameOperator
public JFrameOperator(JFrame w)
Constructor.- Parameters:
w
- window
-
JFrameOperator
public JFrameOperator(ComponentChooser chooser, int index, Operator env)
Constructs a JFrameOperator object.- Parameters:
chooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.env
- an operator to copy environment from.
-
JFrameOperator
public JFrameOperator(ComponentChooser chooser, int index)
Constructs a JFrameOperator object.- Parameters:
chooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.
-
JFrameOperator
public JFrameOperator(ComponentChooser chooser)
Constructs a JFrameOperator object.- Parameters:
chooser
- a component chooser specifying searching criteria.
-
JFrameOperator
public JFrameOperator(String title, int index, Operator env)
Constructor. Waits for the frame with "title" subtitle. Constructor can be used in complicated cases when output or timeouts should differ from default.- Parameters:
title
- a window titleindex
- Ordinal component index.env
- an operator to copy environment from.- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
-
JFrameOperator
public JFrameOperator(String title, int index)
Constructor. Waits for the frame with "title" subtitle. Uses current timeouts and output values.- Parameters:
title
- a window titleindex
- Ordinal component index.- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
,JemmyProperties.getCurrentTimeouts()
,JemmyProperties.getCurrentOutput()
-
JFrameOperator
public JFrameOperator(String title)
Constructor. Waits for the frame with "title" subtitle. Uses current timeouts and output values.- Parameters:
title
- a window title- See Also:
Operator.isCaptionEqual(String, String, boolean, boolean)
,JemmyProperties.getCurrentTimeouts()
,JemmyProperties.getCurrentOutput()
-
JFrameOperator
public JFrameOperator(int index)
Constructor. Waits for the index'th frame. Uses current timeout and output for waiting and to init operator.- Parameters:
index
- Ordinal component index.
-
JFrameOperator
public JFrameOperator()
Constructor. Waits for the first frame. Uses current timeout and output for waiting and to init operator.
-
-
Method Detail
-
findJFrame
public static JFrame findJFrame(ComponentChooser chooser, int index)
Searches an index'th frame.- Parameters:
chooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.- Returns:
- JFrame instance or null if component was not found.
-
findJFrame
public static JFrame findJFrame(ComponentChooser chooser)
Searches a frame.- Parameters:
chooser
- a component chooser specifying searching criteria.- Returns:
- JFrame instance or null if component was not found.
-
findJFrame
public static JFrame findJFrame(String title, boolean ce, boolean cc, int index)
Searches an index'th frame by title.- Parameters:
title
- Frame titlece
- Compare exactly. If true, text can be a substring of caption.cc
- Compare case sensitively. If true, both text and caption areindex
- an index between appropriate ones.- Returns:
- JFrame instance or null if component was not found.
-
findJFrame
public static JFrame findJFrame(String title, boolean ce, boolean cc)
Searches a frame by title.- Parameters:
title
- Frame titlece
- Compare exactly. If true, text can be a substring of caption.cc
- Compare case sensitively. If true, both text and caption are- Returns:
- JFrame instance or null if component was not found.
-
waitJFrame
public static JFrame waitJFrame(ComponentChooser chooser, int index)
Waits an index'th frame.- Parameters:
chooser
- a component chooser specifying searching criteria.index
- an index between appropriate ones.- Returns:
- JFrame instance or null if component was not found.
-
waitJFrame
public static JFrame waitJFrame(ComponentChooser chooser)
Waits a frame.- Parameters:
chooser
- a component chooser specifying searching criteria.- Returns:
- JFrame instance or null if component was not found.
-
waitJFrame
public static JFrame waitJFrame(String title, boolean ce, boolean cc, int index)
Waits an index'th frame by title.- Parameters:
title
- Frame titlece
- Compare exactly. If true, text can be a substring of caption.cc
- Compare case sensitively. If true, both text and caption areindex
- an index between appropriate ones.- Returns:
- JFrame instance or null if component was not found.
-
waitJFrame
public static JFrame waitJFrame(String title, boolean ce, boolean cc)
Waits a frame by title.- Parameters:
title
- Frame titlece
- Compare exactly. If true, text can be a substring of caption.cc
- Compare case sensitively. If true, both text and caption are- Returns:
- JFrame instance or null if component was not found.
-
getAccessibleContext
public AccessibleContext getAccessibleContext()
MapsJFrame.getAccessibleContext()
through queue
-
getContentPane
public Container getContentPane()
MapsJFrame.getContentPane()
through queue
-
getDefaultCloseOperation
public int getDefaultCloseOperation()
MapsJFrame.getDefaultCloseOperation()
through queue
-
getGlassPane
public Component getGlassPane()
MapsJFrame.getGlassPane()
through queue
-
getJMenuBar
public JMenuBar getJMenuBar()
MapsJFrame.getJMenuBar()
through queue
-
getLayeredPane
public JLayeredPane getLayeredPane()
MapsJFrame.getLayeredPane()
through queue
-
getRootPane
public JRootPane getRootPane()
MapsJFrame.getRootPane()
through queue
-
setContentPane
public void setContentPane(Container container)
MapsJFrame.setContentPane(Container)
through queue
-
setDefaultCloseOperation
public void setDefaultCloseOperation(int i)
MapsJFrame.setDefaultCloseOperation(int)
through queue
-
setGlassPane
public void setGlassPane(Component component)
MapsJFrame.setGlassPane(Component)
through queue
-
setJMenuBar
public void setJMenuBar(JMenuBar jMenuBar)
MapsJFrame.setJMenuBar(JMenuBar)
through queue
-
setLayeredPane
public void setLayeredPane(JLayeredPane jLayeredPane)
MapsJFrame.setLayeredPane(JLayeredPane)
through queue
-
-