コード例 #1
0
  /**
   * 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();
    }
  }
コード例 #2
0
ファイル: SecurityPanel.java プロジェクト: richardwhiuk/jitsi
 public void tableChanged(TableModelEvent e) {
   if (e.getSource() == this.encryptionConfigurationTableModel) {
     loadStates();
   }
 }