java.lang.Object
org.autogui.swing.table.ObjectTableModelColumns
- All Implemented Interfaces:
EventListener,TableColumnModelListener,GuiSwingTableColumnSet.TableColumnHost
- Direct Known Subclasses:
GuiSwingTableModelCollection.GuiSwingTableModelColumns
public class ObjectTableModelColumns
extends Object
implements GuiSwingTableColumnSet.TableColumnHost, TableColumnModelListener
column managing part of
ObjectTableModel-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classa container of dynamic columns.static interfacea factory of size info.static interfacea factory with supporting root-actions: actions defined in the owner of a list.static classsize information of hierarchical composition of sub-columnsstatic classa composite of other sizesstatic interfacea listener interface for dynamic column changesstatic classa row-sorter for dynamic columns -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DefaultTableColumnModelprotected List<ObjectTableColumn> protected List<ObjectTableColumn.TableMenuComposite> protected List<ObjectTableColumn> protected int -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidadd a dynamic factory as a child to the containervoidadd a row index column as a static column: always delegate to the topvoidaddColumnStatic(ObjectTableColumn column) add a static column: always delegate to the topvoidaddMenuRowComposite(ObjectTableColumn.TableMenuComposite rowComposite) add a menu composite: always delegate to the topvoidprotected voidvoidvoidvoidvoidintconvertColumnModelToView(int modelIndex) getColumnAt(int index) obtains a column: always delegate to the topintgetColumnOrNull(int modelIndex) obtains aObjectTableColumn; a safe-version ofgetColumnAt(int)getColumnSizeForUpdate(Object list) getDynamicColumnsActions(GuiReprCollectionTable.TableTargetCell selection, GuiSwingTableColumnSet.TableSelectionSource tableSource) intintbooleanbooleanbooleanvoidmoveColumn(ObjectTableColumn column, int viewIndex) voidremoveColumnsDynamic(List<ObjectTableColumn> columns) voidshutdown()voidupdate(List<ObjectTableModelColumns.ObjectTableColumnSize> sizeListForEachColumns)
-
Field Details
-
columnModel
-
columns
-
staticColumns
-
dynamicColumns
-
modelToView
-
updater
-
viewUpdating
protected int viewUpdating
-
-
Constructor Details
-
ObjectTableModelColumns
-
-
Method Details
-
getColumnModel
-
addColumnStatic
Description copied from interface:GuiSwingTableColumnSet.TableColumnHostadd a static column: always delegate to the top- Specified by:
addColumnStaticin interfaceGuiSwingTableColumnSet.TableColumnHost- Parameters:
column- the added column
-
columnAdded
protected void columnAdded(ObjectTableColumn column, ObjectTableModelColumns.DynamicColumnContainer d) -
addColumnDynamic
Description copied from interface:GuiSwingTableColumnSet.TableColumnHostadd a dynamic factory as a child to the container- Specified by:
addColumnDynamicin interfaceGuiSwingTableColumnSet.TableColumnHost- Parameters:
column- the added factory
-
addColumnRowIndex
public void addColumnRowIndex()Description copied from interface:GuiSwingTableColumnSet.TableColumnHostadd a row index column as a static column: always delegate to the top- Specified by:
addColumnRowIndexin interfaceGuiSwingTableColumnSet.TableColumnHost
-
addMenuRowComposite
Description copied from interface:GuiSwingTableColumnSet.TableColumnHostadd a menu composite: always delegate to the top- Specified by:
addMenuRowCompositein interfaceGuiSwingTableColumnSet.TableColumnHost- Parameters:
rowComposite- the added composite
-
getMenuRowComposites
-
getColumnCount
public int getColumnCount() -
getColumnAt
Description copied from interface:GuiSwingTableColumnSet.TableColumnHostobtains a column: always delegate to the top- Specified by:
getColumnAtin interfaceGuiSwingTableColumnSet.TableColumnHost- Parameters:
index- a model index of the column (not a child index)- Returns:
- a column of the modelIndex in the table
-
getColumns
-
getStaticColumns
-
getDynamicColumns
-
isNonEmpty
public boolean isNonEmpty()- Specified by:
isNonEmptyin interfaceGuiSwingTableColumnSet.TableColumnHost
-
getRootContainer
-
getDynamicColumnsActions
public List<Action> getDynamicColumnsActions(GuiReprCollectionTable.TableTargetCell selection, GuiSwingTableColumnSet.TableSelectionSource tableSource) -
getColumnSizeForUpdate
-
update
-
isStaticColumns
public boolean isStaticColumns() -
addColumnDynamic
-
removeColumnsDynamic
-
getTotalWidth
public int getTotalWidth() -
getRowHeight
public int getRowHeight() -
columnAdded
- Specified by:
columnAddedin interfaceTableColumnModelListener
-
columnRemoved
- Specified by:
columnRemovedin interfaceTableColumnModelListener
-
columnMoved
- Specified by:
columnMovedin interfaceTableColumnModelListener
-
moveColumn
-
convertColumnModelToView
public int convertColumnModelToView(int modelIndex) -
getColumnOrNull
obtains aObjectTableColumn; a safe-version ofgetColumnAt(int)- Parameters:
modelIndex- a column-index- Returns:
- the column at modelIndex if the index is valid, or null
- Since:
- 1.8
-
columnMarginChanged
- Specified by:
columnMarginChangedin interfaceTableColumnModelListener
-
columnSelectionChanged
- Specified by:
columnSelectionChangedin interfaceTableColumnModelListener
-
shutdown
public void shutdown() -
isUnderMultidimentionalList
public boolean isUnderMultidimentionalList()- Specified by:
isUnderMultidimentionalListin interfaceGuiSwingTableColumnSet.TableColumnHost- Returns:
- true if it is under the multidimentional list e.g. true for E in List<List<E>>, and false for X in List<Y>, class Y {X e;}
-