private void setupDualView(@Nonnull DefaultActionGroup group) { myDualView.setShowGrid(true); PopupHandler.installPopupHandler(myDualView.getTreeView(), group, ActionPlaces.UPDATE_POPUP, ActionManager.getInstance()); PopupHandler.installPopupHandler(myDualView.getFlatView(), group, ActionPlaces.UPDATE_POPUP, ActionManager.getInstance()); IdeFocusManager.getGlobalInstance().doForceFocusWhenFocusSettlesDown(myDualView); myDualView.addListSelectionListener(e -> updateMessage()); myDualView.setRootVisible(false); myDualView.expandAll(); final TreeCellRenderer defaultCellRenderer = myDualView.getTree().getCellRenderer(); final Getter<VcsHistorySession> sessionGetter = () -> myHistorySession; myDualView.setTreeCellRenderer(new MyTreeCellRenderer(defaultCellRenderer, sessionGetter)); myDualView.setCellWrapper(new MyCellWrapper(sessionGetter)); myDualView.installDoubleClickHandler(new MyDiffAction()); final TableView flatView = myDualView.getFlatView(); TableViewModel sortableModel = flatView.getTableViewModel(); sortableModel.setSortable(true); final RowSorter<? extends TableModel> rowSorter = flatView.getRowSorter(); if (rowSorter != null) { rowSorter.setSortKeys(Collections.singletonList(new RowSorter.SortKey(0, SortOrder.DESCENDING))); } }
public TableViewModel<Item> getTableViewModel() { return getListTableModel(); }
public TableViewModel getTableViewModel() { return getListTableModel(); }