@Override public void columnMarginChanged(ChangeEvent e) { reload(); }
/** * Sets <p>Determines if vertical lines in the table should be * painted.</p><p>This is off by default.</p> * * @param b <p>Determines if vertical lines in the table should be */ public void setShowVerticalLines(boolean b) { boolean oldShowVerticalLines = showVerticalLines; showVerticalLines = b; if (showVerticalLines != oldShowVerticalLines) { reload(); } propertyChangeSupport.firePropertyChange("showVerticalLines", oldShowVerticalLines, this.showVerticalLines); }
/** * Sets <p>Determines if horizontal lines in the table should be * painted.</p><p>This is off by default.</p> * * @param b <p>Determines if horizontal lines in the table should be */ public void setShowHorizontalLines(boolean b) { boolean oldShowHorizontalLines = showHorizontalLines; showHorizontalLines = b; if (showHorizontalLines != oldShowHorizontalLines) { reload(); } propertyChangeSupport.firePropertyChange("showHorizontalLines", oldShowHorizontalLines, this.showHorizontalLines); }
/** * Sets <p>Determines whether the header is visible or not.</p><p>By * default the header is visible.</p> <p><em>CAVEAT:</em>The * header is not (yet) implemented like in Swing. But maybe * someday. So you can disable it if you like.</p> * * @param hv <p>Determines whether the header is visible or not.</p><p>By */ public void setHeaderVisible(boolean hv) { boolean oldHeaderVisible = headerVisible; headerVisible = hv; if (oldHeaderVisible != headerVisible) { reload(); } propertyChangeSupport.firePropertyChange("headerVisible", oldHeaderVisible, this.headerVisible); }
@Override public void columnMoved(STableColumnModelEvent e) { removeEditor(); reload(); }
public void setIntercellSpacing(SDimension d) { SDimension oldIntercellSpacing = intercellSpacing; intercellSpacing = d; if ((intercellSpacing == null && oldIntercellSpacing != null) || intercellSpacing != null && !intercellSpacing.equals(oldIntercellSpacing)) reload(); propertyChangeSupport.firePropertyChange("intercellSpacing", oldIntercellSpacing, this.intercellSpacing); }
public void setIntercellPadding(SDimension d) { SDimension oldIntercellPadding = intercellPadding; intercellPadding = d; if ((intercellPadding == null && oldIntercellPadding != null) || intercellPadding != null && !intercellPadding.equals(oldIntercellPadding)) reload(); propertyChangeSupport.firePropertyChange("intercellPadding", oldIntercellPadding, this.intercellPadding); }
@Override public void columnAdded(STableColumnModelEvent e) { removeEditor(); fireViewportChanged(true); reload(); }
@Override public void columnHidden(ChangeEvent e) { removeEditor(); fireViewportChanged(true); reload(); }
@Override public void columnShown(ChangeEvent e) { removeEditor(); fireViewportChanged(true); reload(); } }
@Override public void columnRemoved(STableColumnModelEvent e) { removeEditor(); fireViewportChanged(true); reload(); }
/** * Deselects all selected columns and rows. */ public void clearSelection() { if (!selectionModel.isSelectionEmpty()) { selectionModel.clearSelection(); reload(); } }
/** * Sets the model holding information about the columns for this table. * * @param newColumnModel the new data source for this table * @see #getColumnModel */ public void setColumnModel(STableColumnModel newColumnModel) { if (newColumnModel == null) throw new IllegalArgumentException("Column model must not be null"); STableColumnModel oldVal = this.columnModel; if (columnModel != newColumnModel) { if (tableColumnModelListener == null) tableColumnModelListener = createTableColumnModelListener(); if (columnModel != null) columnModel.removeColumnModelListener(tableColumnModelListener); columnModel = newColumnModel; columnModel.addColumnModelListener(tableColumnModelListener); reload(); propertyChangeSupport.firePropertyChange("columnModel", oldVal, this.columnModel); } }
@Override public void valueChanged(ListSelectionEvent e) { if (isUpdatePossible() && STable.class.isAssignableFrom(STable.this.getClass())) { deselectedIndices = new ArrayList<>(); selectedIndices = new ArrayList<>(); if (getSelectionMode() == SINGLE_SELECTION) { addIndex(e.getFirstIndex()); addIndex(e.getLastIndex()); } else { for (int index = e.getFirstIndex(); index <= e.getLastIndex(); ++index) { addIndex(index); } } update(((TableCG) getCG()).getSelectionUpdate(STable.this, deselectedIndices, selectedIndices)); } else { reload(); } }