public class ComboBox extends AbstractSwingUIComponent
setCellValueConverter(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 |
---|---|
void |
click()
Selects the first item in the list, if not empty
|
Assertion |
contains(String... items) |
Assertion |
contains(String item) |
Assertion |
contentEquals(String... expected) |
JComboBox |
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() . |
protected void |
getSubDescription(Container container,
XmlWriter.Tag tag) |
Assertion |
isEditable() |
Assertion |
isEmpty(String displayedValue)
Checks that the combo box displays the given value and that it shows no elements when expanded.
|
void |
select(String value) |
Assertion |
selectionEquals(String selection) |
void |
setCellValueConverter(ListBoxCellValueConverter cellValueConverter) |
void |
setText(String text)
Changes the displayed text, in case of an editable combo box.
|
tooltipContains, tooltipEquals
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, isEnabled, isVisible, pressKey, releaseKey, typeKey
public static final String TYPE_NAME
public static final Class[] SWING_CLASSES
public ComboBox(JComboBox combo)
public JComboBox getAwtComponent()
UIComponent
getAwtComponent
in interface UIComponent
getAwtComponent
in class AbstractSwingUIComponent
public String getDescriptionTypeName()
UIComponent
UIComponent.getDescription()
.public void setCellValueConverter(ListBoxCellValueConverter cellValueConverter)
protected void getSubDescription(Container container, XmlWriter.Tag tag)
getSubDescription
in class AbstractUIComponent
public void click()
public void select(String value)
public void setText(String text)
Changes the displayed text, in case of an editable combo box.
This method will throw an exception if the component is not editable.
public Assertion isEmpty(String displayedValue)
public Assertion isEditable()
Copyright © 2004–2016. All rights reserved.