Package org.jdesktop.swingx.decorator

Examples of org.jdesktop.swingx.decorator.SortOrder


        /** {@inheritDoc} */
        public void toggleSortOrder(int columnIndex, Comparator comparator) {
            List<SortKey> newSortKeys = new ArrayList<SortKey>(getSortKeys());

            // see if we're already sorting with this column
            SortOrder columnSortOrder = SortOrder.ASCENDING;
            for(Iterator<? extends SortKey> s = newSortKeys.iterator(); s.hasNext(); ) {
                SortKey sortKey = s.next();
                if(sortKey.getSortOrder() == SortOrder.UNSORTED) continue;
                if(sortKey.getColumn() == columnIndex) {
                    columnSortOrder = (sortKey.getSortOrder() == SortOrder.ASCENDING) ? SortOrder.DESCENDING : SortOrder.ASCENDING;
View Full Code Here


  public static void copySortOrder(JXTable fromTable, JXTable toTable) {
    int columnCount = fromTable.getColumnCount();

    for (int i = 0; i < columnCount; i++) {
      SortOrder sortOrder = fromTable.getSortOrder(i);
      if (sortOrder.isSorted()) {
        toTable.setSortOrder(i, fromTable.getSortOrder(i));
        break;
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.decorator.SortOrder

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.