org.assertj.swing.query
Class JTableColumnByIdentifierQuery

java.lang.Object
  extended by org.assertj.swing.query.JTableColumnByIdentifierQuery

public final class JTableColumnByIdentifierQuery
extends Object

An action that returns the index of a column in a JTable whose identifier matches the given one.

Author:
Alex Ruiz
See Also:
JTable.getColumn(Object), TableColumn.getModelIndex()

Method Summary
static int columnIndexByIdentifier(JTable table, Object identifier)
           Returns the index of a column in a JTable whose identifier matches the given one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

columnIndexByIdentifier

@RunsInCurrentThread
public static int columnIndexByIdentifier(@Nonnull
                                                              JTable table,
                                                              @Nonnull
                                                              Object identifier)

Returns the index of a column in a JTable whose identifier matches the given one.

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.

Parameters:
table - the given JTable.
identifier - the column identifier.
Returns:
the index of a column with a matching identifier. Otherwise it returns -1.


Copyright © 2014–2015 AssertJ. All rights reserved.