abbot.tester
Class JListTester

java.lang.Object
  |
  +--abbot.tester.Robot
        |
        +--abbot.tester.ComponentTester
              |
              +--abbot.tester.ContainerTester
                    |
                    +--abbot.tester.JComponentTester
                          |
                          +--abbot.tester.JListTester

public class JListTester
extends JComponentTester

Provide actions and assertions for a JList component.


Fields inherited from class abbot.tester.Robot
BUTTON_MASK, componentDelay, defaultDelay, dragMask, EM_AWT, EM_PROG, EM_ROBOT, MENU_SHORTCUT_KEYCODE, MENU_SHORTCUT_MASK, MENU_SHORTCUT_MODIFIER, MULTI_CLICK_INTERVAL, POPUP_MASK, POPUP_MODIFIER, POPUP_ON_PRESS, popupDelay, state, TERTIARY_MASK, TERTIARY_MODIFIER
 
Constructor Summary
JListTester()
           
 
Method Summary
 void actionClickIndex(Component list, int index)
          Click the cell at the given index, using mouse button 1.
 void actionClickIndex(Component list, int index, String modifiers)
          Click the cell at the given index, using the given button modifiers.
 void actionClickIndex(Component c, int index, String modifiers, int count)
          Click the cell at the given index, using the given button modifiers and click count.
 void actionClickValue(Component list, String item)
          Click on the given value using mouse button 1.
 void actionClickValue(Component list, String item, String modifiers)
          Click on the given value, using the given button modifiers.
 void actionClickValue(Component list, String item, String modifiers, int count)
          Click on the given value, using the given button modifiers and click count.
 void actionScrollCellToVisible(Component list, int index)
          Make sure the entire element at the given index is visible.
 void actionSelectIndex(Component c, int index)
          Select the given index.
 void actionSelectPopupMenuItemAtIndex(Component list, int index, String menuItem)
          Select an item from a popup menu on the given list at the given index.
 void actionSelectPopupMenuItemAtValue(Component list, String item, String menuItem)
          Select an item from a popup menu on the given list at the given value.
 void actionSelectValue(Component list, String item)
          Select the first instance of the given value in the JList.
 void actionShowPopupMenuAtIndex(Component list, int index)
          Activate a popup menu on the given list at the given index.
 void actionShowPopupMenuAtValue(Component list, String item)
          Activate a popup menu on the given list at the given value.
 String[] getContents(JList list)
          Return an array of strings that represents the list's contents.
 Object getElementAt(JList list, int index)
          JList doesn't provide direct access to its contents, so make up for that oversight.
 int getSize(JList list)
          Return the size of the given list.
protected  Point indexToPoint(Component c, int index)
          Convert the given list index into an x, y coordinate.
protected  int valueToIndex(Component c, String value)
          Find the first string match in the list and return its index.
 
Methods inherited from class abbot.tester.JComponentTester
actionActionMap, actionScrollToVisible, actionScrollToVisible, deriveTag, mousePress, scrollToVisible, scrollToVisible
 
Methods inherited from class abbot.tester.ComponentTester
actionClick, actionClick, actionClick, actionClick, actionDelay, actionDrag, actionDrag, actionDrop, actionFocus, actionKeyPress, actionKeyRelease, actionKeyString, actionKeyStroke, actionKeyStroke, actionSelectAWTMenuItemByLabel, actionSelectAWTPopupMenuItemByLabel, actionSelectMenuItem, actionSelectPopupMenuItem, actionSelectPopupMenuItem, actionShowPopupMenu, actionShowPopupMenu, actionWaitForIdle, assertComponentShowing, assertFrameShowing, assertImage, deriveAccessibleTag, getActions, getAssertMethods, getComponentActions, getComponentAssertMethods, getFinder, getPropertyMethods, getTag, getTestedClass, getTester, getTester, isExtension, setTester, stripHTML, waitAction, waitForComponentShowing, waitForFrameShowing
 
Methods inherited from class abbot.tester.Robot
, activate, bugCheck, canMoveWindows, canResizeWindows, capture, capture, capture, click, click, click, click, click, close, deiconify, delay, drag, drag, dragOver, drop, findFocusOwner, focus, focus, getAutoDelay, getBorderIntersection, getCanonicalClass, getCloseLocation, getEventID, getEventID, getEventMode, getEventPostDelay, getIconifyLocation, getKeyCode, getKeyCode, getKeyModifiers, getMaximizeLocation, getModifiers, getModifiers, getMouseModifiers, getMoveLocation, getPreferredRobotAutoDelay, getResizeLocation, hasHierarchyEventGenerationBug, hasKeyStrokeGenerationBug, hasMultiClickFrameBug, hasRobotMotionBug, iconify, invokeAction, invokeAndWait, isModifier, isOnPopup, isReadyForInput, isTertiaryButton, jitter, jitter, key, key, keyCodeToMask, keyPress, keyRelease, keyString, keyStroke, maskToKeyCode, maximize, mouseMove, mouseMove, mousePress, mousePress, mousePress, mousePress, mouseRelease, mouseRelease, move, moveBy, normalize, postEvent, resetPointer, resize, resizeBy, sample, selectAWTMenuItem, selectAWTMenuItemByLabel, selectAWTPopupMenuItem, selectAWTPopupMenuItemByLabel, selectMenuItem, sendEvent, setAutoDelay, setEventMode, setEventPostDelay, setModifiers, showPopupMenu, showPopupMenu, simpleClassName, sleep, toString, toString, toString, userMovable, userResizable, useScreenMenuBar, wait, wait, wait, waitForIdle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JListTester

public JListTester()
Method Detail

indexToPoint

protected Point indexToPoint(Component c,
                             int index)
Convert the given list index into an x, y coordinate.
Throws:
ActionFailedException - if the index is out of range.

getElementAt

public Object getElementAt(JList list,
                           int index)
JList doesn't provide direct access to its contents, so make up for that oversight.

getSize

public int getSize(JList list)
Return the size of the given list.

getContents

public String[] getContents(JList list)
Return an array of strings that represents the list's contents.

actionScrollCellToVisible

public void actionScrollCellToVisible(Component list,
                                      int index)
Make sure the entire element at the given index is visible.

actionSelectIndex

public void actionSelectIndex(Component c,
                              int index)
Select the given index. Does nothing if the index is already selected.
Throws:
ActionFailedException - if the index is out of range.

actionClickIndex

public void actionClickIndex(Component list,
                             int index)
Click the cell at the given index, using mouse button 1.
Throws:
ActionFailedException - if the index is out of range.

actionClickIndex

public void actionClickIndex(Component list,
                             int index,
                             String modifiers)
Click the cell at the given index, using the given button modifiers.
Throws:
ActionFailedException - if the index is out of range.

actionClickIndex

public void actionClickIndex(Component c,
                             int index,
                             String modifiers,
                             int count)
Click the cell at the given index, using the given button modifiers and click count.
Throws:
ActionFailedException - if the index is out of range.

valueToIndex

protected int valueToIndex(Component c,
                           String value)
Find the first string match in the list and return its index.
Throws:
ActionFailedException - if the value is not matched.

actionSelectValue

public void actionSelectValue(Component list,
                              String item)
Select the first instance of the given value in the JList. Does nothing if that value is already selected.
Throws:
ActionFailedException - if the value does not exist.

actionClickValue

public void actionClickValue(Component list,
                             String item)
Click on the given value using mouse button 1.
Throws:
ActionFailedException - if the value does not exist.

actionClickValue

public void actionClickValue(Component list,
                             String item,
                             String modifiers)
Click on the given value, using the given button modifiers.
Throws:
ActionFailedException - if the value does not exist.

actionClickValue

public void actionClickValue(Component list,
                             String item,
                             String modifiers,
                             int count)
Click on the given value, using the given button modifiers and click count.
Throws:
ActionFailedException - if the value does not exist.

actionSelectPopupMenuItemAtIndex

public void actionSelectPopupMenuItemAtIndex(Component list,
                                             int index,
                                             String menuItem)
Select an item from a popup menu on the given list at the given index.
Throws:
ActionFailedException - if the index is out of range.

actionSelectPopupMenuItemAtValue

public void actionSelectPopupMenuItemAtValue(Component list,
                                             String item,
                                             String menuItem)
Select an item from a popup menu on the given list at the given value.
Throws:
ActionFailedException - if the value does not exist.

actionShowPopupMenuAtIndex

public void actionShowPopupMenuAtIndex(Component list,
                                       int index)
Activate a popup menu on the given list at the given index.
Throws:
ActionFailedException - if the index is out of range.

actionShowPopupMenuAtValue

public void actionShowPopupMenuAtValue(Component list,
                                       String item)
Activate a popup menu on the given list at the given value.
Throws:
ActionFailedException - if the value does not exist.


Copyright © 2002-2003 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge