javax.swing.JTable.columnRemoved()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中javax.swing.JTable.columnRemoved()方法的一些代码示例,展示了JTable.columnRemoved()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTable.columnRemoved()方法的具体详情如下:
包路径:javax.swing.JTable
类名称:JTable
方法名:columnRemoved

JTable.columnRemoved介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-explorer

@Override
public void columnRemoved(TableColumnModelEvent e) {
  super.columnRemoved(e);
  updateTreeColumnIndex();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

public void columnRemoved(TableColumnModelEvent e) {
  super.columnRemoved(e);
  updateTreeColumnIndex();
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@Override
public void columnRemoved(TableColumnModelEvent e) {
  if (gridContainer != null) {
    gridContainer.reindexColumns();
  }
  super.columnRemoved(e);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

public void columnRemoved(TableColumnModelEvent e) {
  super.columnRemoved(e);
  updateTreeColumnIndex();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

/**
 * overridden to remove the interactive sorter if the sorted column is no
 * longer contained in the ColumnModel.
 */
@Override
public void columnRemoved(TableColumnModelEvent e) {
  // JW - old problem: need access to removed column
  // to get hold of removed modelIndex
  // to remove interactive sorter if any
  // no way
  // int modelIndex = convertColumnIndexToModel(e.getFromIndex());
  updateSorterAfterColumnRemoved();
  super.columnRemoved(e);
}

代码示例来源:origin: de.sciss/jtreetable

public void columnRemoved(TableColumnModelEvent e) {
  super.columnRemoved(e);
  if (tree.getRowHeight() <= 0)
    treeTable.invalidateAllRows();
}

代码示例来源:origin: stackoverflow.com

final JTable table = new JTable(dftm);        
 table.getColumnModel().addColumnModelListener(new TableColumnModelListener() {
   @Override
   public void columnAdded(TableColumnModelEvent e) {
     table.columnAdded(e);
   }
   @Override
   public void columnRemoved(TableColumnModelEvent e) {
     table.columnRemoved(e);
   }
   @Override
   public void columnMoved(TableColumnModelEvent e) {
     table.columnMoved(e);
   }
   @Override
   public void columnMarginChanged(ChangeEvent e) {
     Dimension tableSize = table.getSize();
     table.getColumn("Name").setWidth(100);
     table.getColumn("Category").setWidth(150);
     table.getColumn("Color").setWidth(Math.round((tableSize.width - 250)* 0.70f));
     table.getColumn("Ranking").setWidth(Math.round((tableSize.width - 250)* 0.30f));
   }
   @Override
   public void columnSelectionChanged(ListSelectionEvent e) {
     table.columnSelectionChanged(e);
   }
 });

相关文章

JTable类方法