예제 #1
0
  /**
   * Set the current selection to this row.
   *
   * @param rowno index into rowList
   */
  public void setSelectedRow(int rowno) {
    if ((rowno < 0) || (rowno >= model.getRowCount())) return;
    if (debugSetPath) System.out.println("TreeTableSorted setSelected " + rowno);

    selectedRow = model.getRow(rowno);
    TreePath path = model.getPath(selectedRow);
    if (path != null) table.setSelectionPath(path);

    // for mysterious reasons, gotta do it again later
    invokeSetPath();
    ensureRowIsVisible(rowno);
  }
예제 #2
0
 /**
  * Get the currently selected row.
  *
  * @return selected TableRow
  */
 public TableRow getSelectedRow() {
   return model.getRow(table.getSelectionPath());
 }
예제 #3
0
 public TableRow getRow(int row) {
   return model.getRow(table.getPathForRow(row));
 }