Search in sources :

Example 16 with SortKey

use of javax.swing.RowSorter.SortKey in project jmeter by apache.

the class ObjectTableSorterTest method setSortKeys_single.

@Test
public void setSortKeys_single() {
    List<SortKey> keys = singletonList(new SortKey(0, SortOrder.ASCENDING));
    sorter.setSortKeys(keys);
    assertThat(sorter.getSortKeys(), allOf(is(not(sameInstance(keys))), is(equalTo(keys))));
}
Also used : SortKey(javax.swing.RowSorter.SortKey) Test(org.junit.Test)

Aggregations

SortKey (javax.swing.RowSorter.SortKey)16 Test (org.junit.Test)10 SimpleImmutableEntry (java.util.AbstractMap.SimpleImmutableEntry)9 ArrayList (java.util.ArrayList)6 List (java.util.List)4 RowSorter (javax.swing.RowSorter)3 SortOrder (javax.swing.SortOrder)3 HashMap (java.util.HashMap)2 RowSorterEvent (javax.swing.event.RowSorterEvent)2 RowSorterListener (javax.swing.event.RowSorterListener)2 PropertyChangeEvent (java.beans.PropertyChangeEvent)1 PropertyChangeListener (java.beans.PropertyChangeListener)1 String.format (java.lang.String.format)1 AbstractMap (java.util.AbstractMap)1 Arrays (java.util.Arrays)1 Arrays.asList (java.util.Arrays.asList)1 Collections (java.util.Collections)1 Collections.emptyList (java.util.Collections.emptyList)1 Collections.singletonList (java.util.Collections.singletonList)1 Comparator (java.util.Comparator)1