Package javax.swing.table

Examples of javax.swing.table.TableColumnModel.removeColumn()


    {
      // Remove any current columns
      final TableColumnModel cm = getColumnModel();
      while (cm.getColumnCount() > 0)
      {
        cm.removeColumn(cm.getColumn(0));
      }

      // Create new columns from the data model info
      for (int i = 0; i < m.getColumnCount(); i++)
      {
View Full Code Here


        }

        // remove all of the current columns
        for (int k = 0; k < ord.length; k++) {
            TableColumn tc = tcm.getColumn(0);
            tcm.removeColumn(tc);
        }

        // add the columns back in the desired order
        for (int k = 0; k < ord.length; k++) {
            tcm.addColumn(tmp[k]);
View Full Code Here

        if (changed) {
            final TableColumnModel tcm = table.getColumnModel();
            final int count = tcm.getColumnCount();
            if (count > _displayedColumnCount) {
                for (int i = _displayedColumnCount; --i >= count;) {
                    tcm.removeColumn(tcm.getColumn(i));
                }
            }

            int index = 0;
            for (int i = 0; i < _columnCount; i++) {
View Full Code Here

      }
      return;
    }
   
    while (columnModel.getColumnCount() > 0) {
      columnModel.removeColumn(columnModel.getColumn(0));
    }
   
    for (int i=0; i < model.getColumnCount(); ++i) {
      TableColumn column = new TableColumn(i, (columnWidths.length > i ? columnWidths[i] : DEFAULT_COLUMN_WIDTH));
      column.setHeaderValue(model.getColumnName(i));
View Full Code Here

  public void removeTableColumn(ColumnType colType) {
    TableColumnModel columnModel = table.getColumnModel();
    int colIndex = columnModel.getColumnIndex(colType.name());   
    TableColumn column = columnModel.getColumn(colIndex);
    settings.hideColumn(column, colType.name());
    columnModel.removeColumn(column);   
  }

  public void updateColumnVisibilityStates(Collection<String> columnIdentifiers) {
    for (String id : columnIdentifiers) {
      if (id.equals(ColumnType.ID.name()))
View Full Code Here

  public void setDetailedView() {
    //TODO: Defineable Views.
    TableColumnModel model = getColumnModel();
    // Remove all the columns:
    for (int f = 0; f < _numCols; f++) {
      model.removeColumn(_tableColumns[f]);
    }
    // Add them back in the correct order:
    for (int i = 0; i < _numCols; i++) {
      model.addColumn(_tableColumns[i]);
    }
View Full Code Here

  public void setView(List columns) {
    TableColumnModel model = getColumnModel();

    // Remove all the columns:
    for (int f = 0; f < _numCols; f++) {
      model.removeColumn(_tableColumns[f]);
    }
    Iterator selectedColumns = columns.iterator();
    Vector columnNameAndNumber = getColumnNameAndNumber();
    while (selectedColumns.hasNext()) {
      // add the column to the view
View Full Code Here

  public void setDetailedView() {
    //TODO: Defineable Views.
    TableColumnModel model = getColumnModel();
    // Remove all the columns:
    for (int f = 0; f < _numCols; f++) {
      model.removeColumn(_tableColumns[f]);
    }
    // Add them back in the correct order:
    for (int i = 0; i < _numCols; i++) {
      model.addColumn(_tableColumns[i]);
    }
View Full Code Here

  public void setView(List columns) {
    TableColumnModel model = getColumnModel();

    // Remove all the columns:
    for (int f = 0; f < _numCols; f++) {
      model.removeColumn(_tableColumns[f]);
    }
    Iterator selectedColumns = columns.iterator();
    Vector columnNameAndNumber = getColumnNameAndNumber();
    while (selectedColumns.hasNext()) {
      // add the column to the view
View Full Code Here

  public void setDetailedView() {
    //TODO: Defineable Views.
    TableColumnModel model = getColumnModel();
    // Remove all the columns:
    for (int f = 0; f < _numCols; f++) {
      model.removeColumn(_tableColumns[f]);
    }
    // Add them back in the correct order:
    for (int i = 0; i < _numCols; i++) {
      model.addColumn(_tableColumns[i]);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.