/**
   * This method implements the TableModelListener
   *
   * @param e The event to listen for.
   */
  @Override
  public void tableChanged(TableModelEvent e) {
    if (!isColumnDataIncluded) {
      return;
    }

    //  A cell has been updated

    if (e.getType() == TableModelEvent.UPDATE) {
      int column = table.convertColumnIndexToView(e.getColumn());

      //  Only need to worry about an increase in width for this cell

      if (isOnlyAdjustLarger) {
        int row = e.getFirstRow();
        TableColumn tableColumn = table.getColumnModel().getColumn(column);

        if (tableColumn.getResizable()) {
          int width = getCellDataWidth(row, column);
          updateTableColumn(column, width);
        }
      } //	Could be an increase of decrease so check all rows
      else {
        adjustColumn(column);
      }
    } //  The update affected more than one column so adjust all columns
    else {
      adjustColumns();
    }
  }
Beispiel #2
0
 public void tableChanged(TableModelEvent e) {
   if (e.getSource() == this.encryptionConfigurationTableModel) {
     loadStates();
   }
 }