コード例 #1
0
  /**
   * Sets the value of the specified profile data item.
   *
   * @param Value – The value to set for the data item.
   * @param rowIndex – The row index of the data item.
   * @param columnIndex - The column index of the data item.
   */
  @Override
  public void setValueAt(Object value, int rowIndex, int columnIndex) {
    // data[rowIndex][columnIndex] = value;
    // fireTableCellUpdated(rowIndex, columnIndex);
    super.setValueAt(value, rowIndex, columnIndex);

    if (columnIndex == PROFILE_DATA_COLUMN) {
      String s = value.toString();
      ConfigurationData cd = getValueAt(rowIndex);

      cd.setProfileData(s);
      fireTableCellUpdated(rowIndex, PROFILE_DATA_COLUMN);
    }
  }
コード例 #2
0
  /**
   * Sets the value of the specified data item.
   *
   * @param aValue The value to set for the data item.
   * @param rowIndex The row index of the data item.
   * @param columnIndex The column index of the data item.
   * @see javax.swing.table.AbstractTableModel#setValueAt(java.lang.Object, int, int)
   */
  @Override
  public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
    super.setValueAt(aValue, rowIndex, columnIndex);

    AppIPAddressSelection obj = getValueAt(rowIndex);
    switch (columnIndex) {
      case SELECT_COL:
        if (aValue instanceof Boolean) {
          obj.ipSelection.setSelected(((Boolean) aValue).booleanValue());
        }
        break;
      case COLOR_COL:
        if (aValue instanceof Color) {
          obj.ipSelection.setColor(((Color) aValue));
        }
    }
    fireTableCellUpdated(rowIndex, columnIndex);
  }