Java Code Examples for com.intellij.ui.treeStructure.treetable.TreeTableTree#scrollPathToVisible()

The following examples show how to use com.intellij.ui.treeStructure.treetable.TreeTableTree#scrollPathToVisible() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlutterLogTree.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
void update() {
  columns.update();

  reload(getRoot());
  treeTable.updateUI();

  final TreeTableTree tree = treeTable.getTree();

  // Restore/preserve selection state.
  tree.setSelectionRows(treeTable.getSelectedRows());

  // Select and reveal a selection path (e.g., on error) if specified.
  if (pathToSelectAndReveal != null) {
    // TODO(pq): if there are timing issues, consider a delayed uiExec
    // TODO(pq): consider scrolling bounding rectangle to top of scrollpane
    tree.setSelectionPath(pathToSelectAndReveal);
    tree.scrollPathToVisible(pathToSelectAndReveal);
    pathToSelectAndReveal = null;
  }

  if (updateCallback != null) {
    updateCallback.updated();
  }

  if (autoScrollToEnd) {
    uiExec(this::scrollToEnd, 100);
  }
}
 
Example 2
Source File: FlutterLogTree.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
void update() {
  columns.update();

  reload(getRoot());
  treeTable.updateUI();

  final TreeTableTree tree = treeTable.getTree();

  // Restore/preserve selection state.
  tree.setSelectionRows(treeTable.getSelectedRows());

  // Select and reveal a selection path (e.g., on error) if specified.
  if (pathToSelectAndReveal != null) {
    // TODO(pq): if there are timing issues, consider a delayed uiExec
    // TODO(pq): consider scrolling bounding rectangle to top of scrollpane
    tree.setSelectionPath(pathToSelectAndReveal);
    tree.scrollPathToVisible(pathToSelectAndReveal);
    pathToSelectAndReveal = null;
  }

  if (updateCallback != null) {
    updateCallback.updated();
  }

  if (autoScrollToEnd) {
    uiExec(this::scrollToEnd, 100);
  }
}