Package org.wikipediacleaner.api.data

Examples of org.wikipediacleaner.api.data.NamedComparator


    Object selectedSort = listSort.getSelectedValue();
    Object selectedItem = listSortItem.getSelectedValue();
    if ((selectedSort instanceof CompositeComparator) &&
        (selectedItem instanceof NamedComparator)) {
      CompositeComparator comparators = (CompositeComparator) selectedSort;
      NamedComparator comparator = (NamedComparator) selectedItem;
      comparators.moveComparator(comparator.getName(), up);
      int selected = listSortItem.getSelectedIndex();
      selected += up ? -1 : 1;
      modelSortItem.clear();
      for (int i = 0; i < comparators.getComparatorsCount(); i++) {
        NamedComparator item = comparators.getComparator(i);
        modelSortItem.addElement(item);
      }
      listSortItem.setSelectedIndex(Math.min(Math.max(0, selected), modelSortItem.size() - 1));
    }
  }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.api.data.NamedComparator

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.