org.uispec4j
Class ListBox
java.lang.Object
org.uispec4j.AbstractUIComponent
org.uispec4j.AbstractSwingUIComponent
org.uispec4j.ListBox
- All Implemented Interfaces:
- TooltipComponent, UIComponent
public class ListBox
- extends AbstractSwingUIComponent
Wrapper for JList components.
This class provides means for checking the contents and selection of the list,
changing the selection, etc. For all these methods, when using String values,
the means of retrieving a String representation of the displayed values can be customized
using the setCellValueConverter(ListBoxCellValueConverter) method and providing
a new ListBoxCellValueConverter implementation.
A DefaultListBoxCellValueConverter is set up by default.
|
Constructor Summary |
ListBox(javax.swing.JList list)
|
| Methods inherited from class org.uispec4j.AbstractUIComponent |
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKey |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_NAME
public static final java.lang.String TYPE_NAME
- See Also:
- Constant Field Values
SWING_CLASSES
public static final java.lang.Class[] SWING_CLASSES
ListBox
public ListBox(javax.swing.JList list)
getDescriptionTypeName
public java.lang.String getDescriptionTypeName()
- Description copied from interface:
UIComponent
- Returns the name of the component as it will appear in the XML representation
returned by
UIComponent.getDescription().
getAwtComponent
public javax.swing.JList getAwtComponent()
- Description copied from interface:
UIComponent
- Returns the Java GUI component represented by this object.
- Specified by:
getAwtComponent in interface UIComponent- Specified by:
getAwtComponent in class AbstractSwingUIComponent
setCellValueConverter
public void setCellValueConverter(ListBoxCellValueConverter cellValueConverter)
isEmpty
public Assertion isEmpty()
contentEquals
public Assertion contentEquals(java.lang.String... displayedValues)
contains
public Assertion contains(java.lang.String item)
contains
public Assertion contains(java.lang.String... items)
selectIndex
public void selectIndex(int index)
selectIndices
public void selectIndices(int... indices)
select
public void select(java.lang.String... values)
clearSelection
public void clearSelection()
getSize
public int getSize()
doubleClick
public void doubleClick()
click
public void click(int row)
click
public void click(int row,
Key.Modifier modifier)
rightClick
public void rightClick(int row)
doubleClick
public void doubleClick(int row)
triggerClick
public Trigger triggerClick(int row,
Key.Modifier modifier)
triggerRightClick
public Trigger triggerRightClick(int row)
triggerDoubleClick
public Trigger triggerDoubleClick(int row)
selectionIsEmpty
public Assertion selectionIsEmpty()
selectionEquals
public Assertion selectionEquals(java.lang.String... items)
foregroundEquals
public Assertion foregroundEquals(java.lang.Object[] colors)
- Checks the foreground color of the table cells using either Color or String objects
- See Also:
- Using colors
foregroundNear
public Assertion foregroundNear(int index,
java.lang.Object expected)
backgroundNear
public Assertion backgroundNear(int index,
java.lang.Object expected)
backgroundEquals
public Assertion backgroundEquals(java.lang.Object[] colors)
- Checks the background color of the List cells using either Color or String objects
- See Also:
- Using colors
getSwingRendererComponentAt
public java.awt.Component getSwingRendererComponentAt(int index)
Copyright © 2004-2010. All Rights Reserved.