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 thesetCellValueConverter(ListBoxCellValueConverter)
method and providing
a new ListBoxCellValueConverter
implementation.
A DefaultListBoxCellValueConverter
is set up by default.Modifier and Type | Field and Description |
---|---|
static Class[] |
SWING_CLASSES |
static String |
TYPE_NAME |
Modifier and Type | Method and Description |
---|---|
Assertion |
backgroundEquals(Object[] colors)
Checks the background color of the List cells using either Color or String objects
|
Assertion |
backgroundNear(int index,
Object expected) |
void |
clearSelection() |
void |
click(int row) |
void |
click(int row,
Key.Modifier modifier) |
Assertion |
contains(String... items) |
Assertion |
contains(String item) |
Assertion |
contentEquals(String... displayedValues) |
void |
doubleClick() |
void |
doubleClick(int row) |
Assertion |
foregroundEquals(Object[] colors)
Checks the foreground color of the table cells using either Color or String objects
|
Assertion |
foregroundNear(int index,
Object expected) |
JList |
getAwtComponent()
Returns the Java GUI component represented by this object.
|
String |
getDescriptionTypeName()
Returns the name of the component as it will appear in the XML representation
returned by
UIComponent.getDescription() . |
int |
getSize() |
Component |
getSwingRendererComponentAt(int index) |
Assertion |
isEmpty() |
void |
rightClick(int row) |
void |
select(String... values) |
void |
selectIndex(int index) |
void |
selectIndices(int... indices) |
Assertion |
selectionEquals(String... items) |
Assertion |
selectionIsEmpty() |
void |
setCellValueConverter(ListBoxCellValueConverter cellValueConverter) |
Trigger |
triggerClick(int row,
Key.Modifier modifier) |
Trigger |
triggerDoubleClick(int row) |
Trigger |
triggerRightClick(int row) |
tooltipContains, tooltipEquals
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKey
public static final String TYPE_NAME
public static final Class[] SWING_CLASSES
public ListBox(JList list)
public String getDescriptionTypeName()
UIComponent
UIComponent.getDescription()
.public JList getAwtComponent()
UIComponent
getAwtComponent
in interface UIComponent
getAwtComponent
in class AbstractSwingUIComponent
public void setCellValueConverter(ListBoxCellValueConverter cellValueConverter)
public Assertion isEmpty()
public void selectIndex(int index)
public void selectIndices(int... indices)
public void select(String... values)
public void clearSelection()
public int getSize()
public void doubleClick()
public void click(int row)
public void click(int row, Key.Modifier modifier)
public void rightClick(int row)
public void doubleClick(int row)
public Trigger triggerClick(int row, Key.Modifier modifier)
public Trigger triggerRightClick(int row)
public Trigger triggerDoubleClick(int row)
public Assertion selectionIsEmpty()
public Assertion foregroundEquals(Object[] colors)
public Assertion backgroundEquals(Object[] colors)
public Component getSwingRendererComponentAt(int index)
Copyright © 2004–2016. All rights reserved.