org.assertj.swing.driver
Class BasicCellRendererReader
java.lang.Object
org.assertj.swing.driver.BasicCellRendererReader
- All Implemented Interfaces:
- CellRendererReader
public class BasicCellRendererReader
- extends Object
- implements CellRendererReader
Default implementation of CellRendererReader
.
- Author:
- Alex Ruiz
Method Summary |
String |
valueFrom(Component c)
Reads the value in the given cell renderer Component , or returns null if the renderer belongs to an
unknown type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicCellRendererReader
public BasicCellRendererReader()
valueFrom
@RunsInCurrentThread
@Nullable
public String valueFrom(@Nullable
Component c)
Reads the value in the given cell renderer Component
, or returns null
if the renderer belongs to an
unknown type. Internally, this method will call getText()
if the given renderer is an instance of
JLabel
.
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.
- Specified by:
valueFrom
in interface CellRendererReader
- Parameters:
c
- the given cell renderer component.
- Returns:
- the value of the given
Component
, or null
if the renderer belongs to an unknown component
type.
Copyright © 2014–2015 AssertJ. All rights reserved.