@Override public void actionPerformed(ActionEvent e) { // JCheckBoxMenuItem item = (JCheckBoxMenuItem) e.getSource(); TableColumnModel model = table.getColumnModel(); if (colData.isVisible() == false) { colData.setVisible(true); model.addColumn(column); // column is added at right end of model // move column to its default place int lastPos = model.getColumnCount() - 1; int pos = data.getColumnNumber(colData); if (pos >= 0 && pos < lastPos) model.moveColumn(lastPos, pos); scrollPane.setSize( scrollPane.getWidth() + column.getPreferredWidth(), scrollPane.getHeight()); // show breakPointColumn => show all lines if (isBreakPointColumn) { kernel.getConstruction().setShowOnlyBreakpoints(false); // cbShowOnlyBreakpoints.setSelected(false); } } else { colData.setVisible(false); model.removeColumn(column); // setSize(getWidth() - column.getWidth(), getHeight()); // setSize(view.getWidth(), getHeight()); } table.tableChanged(new TableModelEvent(((GAbstractTableModelD) data.getImpl()).getImpl())); // reinit view to update possible breakpoint changes ((ConstructionTableData) data).initView(); SwingUtilities.updateComponentTreeUI(view.scrollPane); }
public void initProtocol() { if (!isViewAttached) ((ConstructionTableData) data).initView(); }