Examples of TableViewModel


Examples of com.intellij.util.ui.TableViewModel

    super(true);
    myProject = project;
    myName.setName(elementsTitle);
    myTable = new TableView(new ListTableModel(new ColumnInfo[]{myIsSelected, myName}));

    final TableViewModel model = myTable.getTableViewModel();
    final ArrayList<PsiElement> arrayList = new ArrayList<PsiElement>(elements);
    Collections.sort(arrayList, new Comparator<PsiElement>() {
      public int compare(final PsiElement o1, final PsiElement o2) {
        final int filesResult = Comparing.compare(o1.getContainingFile().getName(), o2.getContainingFile().getName());
        if (filesResult != 0) return filesResult;
        return getPresentableText(o1).compareTo(getPresentableText(o2));
      }
    });
    model.setItems(arrayList);
    model.setSortable(false);

    setTitle(title);
    init();
    onSelectionChanged();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.