Package autotest.common.table.DataSource

Examples of autotest.common.table.DataSource.SortSpec


    }

    private void restoreTableSorting() {
        for (ListIterator<SortSpec> i = tableSorts.listIterator(tableSorts.size());
             i.hasPrevious();) {
            SortSpec sortSpec = i.previous();
            table.sortOnColumn(sortSpec.getField(), sortSpec.getDirection());
        }
    }
View Full Code Here


        }

        if (tableSorts.isEmpty()) {
            // default to sorting on the first column
            HeaderField field = savedColumns().iterator().next();
            SortSpec sortSpec = new SortSpec(field.getSqlName(), SortDirection.ASCENDING);
            tableSorts = new ArrayList<SortSpec>();
            tableSorts.add(sortSpec);
        }
    }
View Full Code Here

    private void updateSortIndicators() {
        if (!clientSortable) {
            return;
        }

        SortSpec firstSpec = getFirstSortSpec();
        for (SortIndicator indicator : sortIndicators) {
            if (columns[indicator.column][COL_NAME].equals(firstSpec.getField())) {
                indicator.sortOn(firstSpec.getDirection());
            } else {
                indicator.sortOff();
            }
        }
    }
View Full Code Here

                i.remove();
                break;
            }
        }

        sortColumns.add(0, new SortSpec(columnField, sortDirection));
        updateSortIndicators();
    }
View Full Code Here

                // ignore sorting on widget columns
                return;
            }
            String columnName = columns[cell][COL_NAME];
            SortDirection newSortDirection = SortDirection.ASCENDING;
            SortSpec firstSortSpec = getFirstSortSpec();
            // when clicking on the last sorted field, invert the sort
            if (firstSortSpec != null && columnName.equals(firstSortSpec.getField())) {
                newSortDirection = invertSortDirection(firstSortSpec.getDirection());
            }

            sortOnColumn(columnName, newSortDirection);
            refresh();
            return;
View Full Code Here

TOP

Related Classes of autotest.common.table.DataSource.SortSpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.