Пример #1
0
  private void removeAllRowsInGrids() {

    int rowCount = propertyGrid.getRowCount();
    // Loop from i=1 because we don't remove the grid label
    for (int i = rowCount - 1; i > 0; i--) {
      propertyGrid.removeRow(i);
    }

    rowCount = resourceGrid.getRowCount();
    // Loop from i=1 because we don't remove the grid label
    for (int i = rowCount - 1; i > 0; i--) {
      resourceGrid.removeRow(i);
    }
  }
Пример #2
0
    private void addToChildrenResourceGrid(ExplorerGrid grid, Item item) {

      Object[] cols = new Object[2];
      cols[0] = item.getName();
      cols[1] = item.getType();

      grid.addRow(grid.getRowCount(), cols);
    }
Пример #3
0
    private void addToPropertyGrid(ExplorerGrid grid, Item item) {
      Object[] cols = new Object[4];
      cols[0] = item.getName();
      cols[1] = item.getType();
      cols[2] = item.getValue();
      cols[3] = item.isMutli().toString();

      grid.addRow(grid.getRowCount(), cols);
    }