Class DefaultTableColumnModel
java.lang.Object
vaadinx.swing.table.DefaultTableColumnModel
- All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener, ListSelectionListener, TableColumnModel
public class DefaultTableColumnModel
extends Object
implements TableColumnModel, PropertyChangeListener, ListSelectionListener, Serializable
Port of
DefaultTableColumnModel. Body ported
faithfully (R_swing_is_truth) — Vector storage, EventListenerList fan-out, lazy-cached
total-width recompute, the implicit listener loop where the column model
subscribes to its own selection model and re-fires on
columnSelectionChanged, and the JDK identity-comparison oddity in
propertyChange (uses == on interned property names) — all
preserved verbatim.
References the ported TableColumn (cell-renderer field type)
and ported TableColumnModelEvent /
TableColumnModelListener (forced ports per
D_event_port_policy — see those classes' javadoc). Selection model + ChangeEvent +
ListSelectionEvent stay JDK types per D_whitelist_porting/D_event_port_policy.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChangeEventprotected intprotected booleanprotected EventListenerListprotected ListSelectionModelprotected Vector<TableColumn> protected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(TableColumn aColumn) voidprotected ListSelectionModelprotected voidprotected voidprotected voidprotected voidprotected voidgetColumn(int columnIndex) intintgetColumnIndex(Object identifier) intgetColumnIndexAtX(int x) intboolean<T extends EventListener>
T[]getListeners(Class<T> listenerType) intint[]intvoidmoveColumn(int columnIndex, int newIndex) voidprotected voidvoidremoveColumn(TableColumn column) voidvoidsetColumnMargin(int newMargin) voidsetColumnSelectionAllowed(boolean flag) voidsetSelectionModel(ListSelectionModel newModel) void
-
Field Details
-
tableColumns
-
selectionModel
-
columnMargin
protected int columnMargin -
listenerList
-
changeEvent
-
columnSelectionAllowed
protected boolean columnSelectionAllowed -
totalColumnWidth
protected int totalColumnWidth
-
-
Constructor Details
-
DefaultTableColumnModel
public DefaultTableColumnModel()
-
-
Method Details
-
addColumn
- Specified by:
addColumnin interfaceTableColumnModel
-
removeColumn
- Specified by:
removeColumnin interfaceTableColumnModel
-
moveColumn
public void moveColumn(int columnIndex, int newIndex) - Specified by:
moveColumnin interfaceTableColumnModel
-
setColumnMargin
public void setColumnMargin(int newMargin) - Specified by:
setColumnMarginin interfaceTableColumnModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceTableColumnModel
-
getColumns
- Specified by:
getColumnsin interfaceTableColumnModel
-
getColumnIndex
- Specified by:
getColumnIndexin interfaceTableColumnModel
-
getColumn
- Specified by:
getColumnin interfaceTableColumnModel
-
getColumnMargin
public int getColumnMargin()- Specified by:
getColumnMarginin interfaceTableColumnModel
-
getColumnIndexAtX
public int getColumnIndexAtX(int x) - Specified by:
getColumnIndexAtXin interfaceTableColumnModel
-
getTotalColumnWidth
public int getTotalColumnWidth()- Specified by:
getTotalColumnWidthin interfaceTableColumnModel
-
setSelectionModel
- Specified by:
setSelectionModelin interfaceTableColumnModel
-
getSelectionModel
- Specified by:
getSelectionModelin interfaceTableColumnModel
-
setColumnSelectionAllowed
public void setColumnSelectionAllowed(boolean flag) - Specified by:
setColumnSelectionAllowedin interfaceTableColumnModel
-
getColumnSelectionAllowed
public boolean getColumnSelectionAllowed()- Specified by:
getColumnSelectionAllowedin interfaceTableColumnModel
-
getSelectedColumns
public int[] getSelectedColumns()- Specified by:
getSelectedColumnsin interfaceTableColumnModel
-
getSelectedColumnCount
public int getSelectedColumnCount()- Specified by:
getSelectedColumnCountin interfaceTableColumnModel
-
addColumnModelListener
- Specified by:
addColumnModelListenerin interfaceTableColumnModel
-
removeColumnModelListener
- Specified by:
removeColumnModelListenerin interfaceTableColumnModel
-
getColumnModelListeners
-
fireColumnAdded
-
fireColumnRemoved
-
fireColumnMoved
-
fireColumnSelectionChanged
-
fireColumnMarginChanged
protected void fireColumnMarginChanged() -
getListeners
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
valueChanged
- Specified by:
valueChangedin interfaceListSelectionListener
-
createSelectionModel
-
recalcWidthCache
protected void recalcWidthCache()
-