public class BasicJComboBoxCellReader extends Object implements JComboBoxCellReader
JComboBoxCellReader
.Constructor and Description |
---|
BasicJComboBoxCellReader()
Creates a new
BasicJComboBoxCellReader that uses a BasicCellRendererReader to read the value from
the cell renderer Component in a JComboBox . |
BasicJComboBoxCellReader(CellRendererReader rendererReader)
Creates a new
BasicJComboBoxCellReader . |
Modifier and Type | Method and Description |
---|---|
String |
valueAt(JComboBox<?> comboBox,
int index)
Returns the internal value of a cell in a
JComboBox as expected in a test. |
public BasicJComboBoxCellReader()
BasicJComboBoxCellReader
that uses a BasicCellRendererReader
to read the value from
the cell renderer Component
in a JComboBox
.public BasicJComboBoxCellReader(@Nonnull CellRendererReader rendererReader)
BasicJComboBoxCellReader
.rendererReader
- knows how to read values from the cell renderer Component
in a JComboBox
.NullPointerException
- if the given CellRendererReader
is null
.@RunsInCurrentThread @Nullable public String valueAt(@Nonnull JComboBox<?> comboBox, int index)
Returns the internal value of a cell in a JComboBox
as expected in a test.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT). Client code must call this method from the EDT.
valueAt
in interface JComboBoxCellReader
comboBox
- the given JComboBox
.index
- the index of the cell.JComboBox
as expected in a test.CellRendererReader.valueFrom(Component)
Copyright © 2014–2019 AssertJ. All rights reserved.