Package javax.swing.table

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


  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 createDefaultColumnsFromModel(ArrayList fieldArray) {
      // Remove any current columns
      TableColumnModel cm = getColumnModel();
      while (cm.getColumnCount() > 0) {
        cm.removeColumn(cm.getColumn(0));
      }

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

        if (changed) {
            TableColumnModel tcm = table.getColumnModel();
            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

  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()
/*     */   {
/* 137 */     TableColumnModel model = getColumnModel();
/*     */
/* 139 */     for (int f = 0; f < this._numCols; f++) {
/* 140 */       model.removeColumn(this._tableColumns[f]);
/*     */     }
/*     */
/* 143 */     for (int i = 0; i < this._numCols; i++) {
/* 144 */       model.addColumn(this._tableColumns[i]);
/*     */     }
View Full Code Here

/*     */
/*     */   public void setView(List columns) {
/* 151 */     TableColumnModel model = getColumnModel();
/*     */
/* 154 */     for (int f = 0; f < this._numCols; f++) {
/* 155 */       model.removeColumn(this._tableColumns[f]);
/*     */     }
/* 157 */     Iterator selectedColumns = columns.iterator();
/* 158 */     Vector columnNameAndNumber = getColumnNameAndNumber();
/* 159 */     while (selectedColumns.hasNext())
/*     */     {
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

      columns [i].setPreferredWidth(COLUMN_WIDTHS [i]);
    }

    if (!System.getProperty("os.name").startsWith("Windows"))
    {
      columnModel.removeColumn(columns [COLUMN_FILETYPE]);
      columnModel.removeColumn(columns [COLUMN_FILEATTR]);
    }

    TableCellRenderer cellRenderer = new DetailsTableCellRenderer(chooser);
    detailsTable.setDefaultRenderer(File.class, cellRenderer);
View Full Code Here

    }

    if (!System.getProperty("os.name").startsWith("Windows"))
    {
      columnModel.removeColumn(columns [COLUMN_FILETYPE]);
      columnModel.removeColumn(columns [COLUMN_FILEATTR]);
    }

    TableCellRenderer cellRenderer = new DetailsTableCellRenderer(chooser);
    detailsTable.setDefaultRenderer(File.class, cellRenderer);
    detailsTable.setDefaultRenderer(Date.class, cellRenderer);
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.