/** * Sets the visible property. This property controls whether or not * this view column is currently visible in the table. * * @param visible boolean indicating whether or not this view column is * visible in the table * @see #setVisible */ public void setVisible(boolean visible) { boolean oldVisible = isVisible(); this.visible = visible; firePropertyChange("visible", oldVisible, isVisible()); }
/** * Sets the visible property. This property controls whether or not * this view column is currently visible in the table. * * @param visible boolean indicating whether or not this view column is * visible in the table * @see #setVisible */ public void setVisible(boolean visible) { boolean oldVisible = isVisible(); this.visible = visible; firePropertyChange("visible", oldVisible, isVisible()); }
/** * Sets the visible property. This property controls whether or not * this view column is currently visible in the table. * * @param visible boolean indicating whether or not this view column is * visible in the table * @see #setVisible */ public void setVisible(boolean visible) { boolean oldVisible = isVisible(); this.visible = visible; firePropertyChange("visible", oldVisible, isVisible()); }
/** * Sets the visible property. This property controls whether or not * this view column is currently visible in the table. * * @param visible boolean indicating whether or not this view column is * visible in the table * @see #setVisible */ public void setVisible(boolean visible) { boolean oldVisible = isVisible(); this.visible = visible; firePropertyChange("visible", oldVisible, isVisible()); }
public void propertyChange(PropertyChangeEvent evt) { if ("visible".equals(evt.getPropertyName())) { TableColumnExt columnExt = (TableColumnExt)evt.getSource(); if (columnExt.isVisible()) { moveToVisible(columnExt); fireColumnPropertyChange(evt); } else { moveToInvisible(columnExt); } } else if (!((TableColumnExt) evt.getSource()).isVisible()) { fireColumnPropertyChange(evt); } } }
@Override public void propertyChange(PropertyChangeEvent evt) { if ("visible".equals(evt.getPropertyName())) { TableColumnExt columnExt = (TableColumnExt)evt.getSource(); if (columnExt.isVisible()) { moveToVisible(columnExt); fireColumnPropertyChange(evt); } else { moveToInvisible(columnExt); } } else if (!((TableColumnExt) evt.getSource()).isVisible()) { fireColumnPropertyChange(evt); } } }
@Override public void propertyChange(PropertyChangeEvent evt) { if ("visible".equals(evt.getPropertyName())) { TableColumnExt columnExt = (TableColumnExt)evt.getSource(); if (columnExt.isVisible()) { moveToVisible(columnExt); fireColumnPropertyChange(evt); } else { moveToInvisible(columnExt); } } else if (!((TableColumnExt) evt.getSource()).isVisible()) { fireColumnPropertyChange(evt); } } }
@Override public void propertyChange(PropertyChangeEvent evt) { if ("visible".equals(evt.getPropertyName())) { TableColumnExt columnExt = (TableColumnExt)evt.getSource(); if (columnExt.isVisible()) { moveToVisible(columnExt); fireColumnPropertyChange(evt); } else { moveToInvisible(columnExt); } } else if (!((TableColumnExt) evt.getSource()).isVisible()) { fireColumnPropertyChange(evt); } } }
@Override public void propertyChange(PropertyChangeEvent evt) { if ("visible".equals(evt.getPropertyName())) { TableColumnExt columnExt = (TableColumnExt)evt.getSource(); if (columnExt.isVisible()) { moveToVisible(columnExt); fireColumnPropertyChange(evt); } else { moveToInvisible(columnExt); } } else if (!((TableColumnExt) evt.getSource()).isVisible()) { fireColumnPropertyChange(evt); } } }
/** * Sets the hideable property. This property controls whether the column can * be hidden. This is a bound property. If the column's visibilty is affected, * listeners are notified about that change as well.. * <p> * * The default value is true. * * @param hideable */ public void setHideable(boolean hideable) { boolean old = isHideable(); boolean oldVisible = isVisible(); this.hideable = hideable; firePropertyChange("visible", oldVisible, isVisible()); firePropertyChange("hideable", old, isHideable()); }
/** * Sets the hideable property. This property controls whether the column can * be hidden. This is a bound property. If the column's visibilty is affected, * listeners are notified about that change as well.. * <p> * * The default value is true. * * @param hideable */ public void setHideable(boolean hideable) { boolean old = isHideable(); boolean oldVisible = isVisible(); this.hideable = hideable; firePropertyChange("visible", oldVisible, isVisible()); firePropertyChange("hideable", old, isHideable()); }
/** * Sets the hideable property. This property controls whether the column can * be hidden. This is a bound property. If the column's visibilty is affected, * listeners are notified about that change as well.. * <p> * * The default value is true. * * @param hideable */ public void setHideable(boolean hideable) { boolean old = isHideable(); boolean oldVisible = isVisible(); this.hideable = hideable; firePropertyChange("visible", oldVisible, isVisible()); firePropertyChange("hideable", old, isHideable()); }
/** * Sets the hideable property. This property controls whether the column can * be hidden. This is a bound property. If the column's visibilty is affected, * listeners are notified about that change as well.. * <p> * * The default value is true. * * @param hideable */ public void setHideable(boolean hideable) { boolean old = isHideable(); boolean oldVisible = isVisible(); this.hideable = hideable; firePropertyChange("visible", oldVisible, isVisible()); firePropertyChange("hideable", old, isHideable()); }
/** * {@inheritDoc} <p> * * Overridden to update internals related to column visibility. */ @Override public void removeColumn(TableColumn column) { boolean oldVisible = true; //remove the visibility listener if appropriate if (column instanceof TableColumnExt) { oldVisible = ((TableColumnExt) column).isVisible(); ((TableColumnExt) column).setVisible(true); ((TableColumnExt)column).removePropertyChangeListener(visibilityListener); } currentColumns.remove(column); initialColumns.remove(column); //let the superclass handle notification etc super.removeColumn(column); if (column instanceof TableColumnExt) { ((TableColumnExt) column).setVisible(oldVisible); } }
private void installColumn(TableColumn column) { this.column = column; column.addPropertyChangeListener(getColumnListener()); updateFromColumnHeader(column.getHeaderValue()); // #429-swing: actionCommand must be string if (column.getIdentifier() != null) { setActionCommand(column.getIdentifier().toString()); } boolean visible = (column instanceof TableColumnExt) ? ((TableColumnExt) column).isVisible() : true; updateFromColumnVisible(visible); }
private void installColumn(TableColumn column) { this.column = column; column.addPropertyChangeListener(getColumnListener()); updateFromColumnHeader(column.getHeaderValue()); // #429-swing: actionCommand must be string if (column.getIdentifier() != null) { setActionCommand(column.getIdentifier().toString()); } boolean visible = (column instanceof TableColumnExt) ? ((TableColumnExt) column).isVisible() : true; updateFromColumnVisible(visible); }
private void installColumn(TableColumn column) { this.column = column; column.addPropertyChangeListener(getColumnListener()); updateFromColumnHeader(column.getHeaderValue()); // #429-swing: actionCommand must be string if (column.getIdentifier() != null) { setActionCommand(column.getIdentifier().toString()); } boolean visible = (column instanceof TableColumnExt) ? ((TableColumnExt) column).isVisible() : true; updateFromColumnVisible(visible); }
private void installColumn(TableColumn column) { this.column = column; column.addPropertyChangeListener(getColumnListener()); updateFromColumnHeader(column.getHeaderValue()); // #429-swing: actionCommand must be string if (column.getIdentifier() != null) { setActionCommand(column.getIdentifier().toString()); } boolean visible = (column instanceof TableColumnExt) ? ((TableColumnExt) column).isVisible() : true; updateFromColumnVisible(visible); }
private void installColumn(TableColumn column) { this.column = column; column.addPropertyChangeListener(getColumnListener()); updateFromColumnHeader(column.getHeaderValue()); // #429-swing: actionCommand must be string if (column.getIdentifier() != null) { setActionCommand(column.getIdentifier().toString()); } boolean visible = (column instanceof TableColumnExt) ? ((TableColumnExt) column).isVisible() : true; updateFromColumnVisible(visible); }
@Override public State getState(Object o) { JXTable table = checkComponent(o); JXTableSwingSessionState result = new JXTableSwingSessionState(); JTableState state = (JTableState) super.getState(o); if (state != null) { result.setColumnWidths(state.getColumnWidths()); result.setSortKeys(state.getSortKeys()); } DefaultTableColumnModelExt columnModel = (DefaultTableColumnModelExt) table.getColumnModel(); List<TableColumn> columns = columnModel.getColumns(true); boolean[] hiddenColumns = new boolean[columns.size()]; for (int i = 0; i < hiddenColumns.length; i++) { TableColumnExt tc = (TableColumnExt) columns.get(i); hiddenColumns[i] = !tc.isVisible(); } result.setHiddenColumns(hiddenColumns); return result; }