Example #1
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);
    }
Example #2
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);
    }
Example #3
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);
    }
  }
Example #4
0
  public ResourceGrids() {
    super();
    // Add the Header to the property grid
    Object[] cols = new Object[4];

    // TODO : Change the hardcoded labels
    cols[0] = "Name";
    cols[1] = "Type";
    cols[2] = "Value";
    cols[3] = "Multi";

    propertyGrid.AddHeader(cols);

    //  Add the Header to the Subnode grid
    // TODO : Change the hardcoded labels
    cols = new Object[2];
    cols[0] = "Name";
    cols[1] = "Type";
    resourceGrid.AddHeader(cols);
  }