Module org.autogui
Package org.autogui.swing.table
Class GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase
java.lang.Object
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase
- Direct Known Subclasses:
GuiSwingTableColumnCollection.TableSelectionSourceDynamic
,GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
- Enclosing class:
GuiSwingTableColumnCollection
the base class for dynamic table-selection-sources
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GuiSwingTableColumnSet.TableColumnHost
protected GuiReprCollectionTable.TableTargetCell
-
Constructor Summary
ConstructorsConstructorDescriptionTableSelectionSourceDynamicBase
(GuiSwingTableColumnSet.TableColumnHost model, GuiReprCollectionTable.TableTargetCell selection) -
Method Summary
Modifier and TypeMethodDescriptionvoid
select
(ObjectTableModelColumns.DynamicColumnFactory factory, String targetName, Set<GuiSwingTableColumnCollection.TargetAndSpecifierMap> occurrences, Consumer<GuiSwingTableColumnCollection.TargetAndSpecifierMap> resultGen) The method first obtainsObjectTableColumn
of selected {row,column}.void
selectionActionFinished
(boolean autoSelection, GuiSwingTableColumnSet.TableSelectionChange change) void
selectSpecifierMapForCollectionWrapper
(GuiSwingTableColumnCollection.ObjectTableColumnCollectionWrapper column, int[] cell, List<GuiSwingTableColumn.SpecifierManagerIndex> indexSpecifiers) selectSpecifierMapForStaticColumn
(ObjectTableColumn column, int[] cell, List<GuiSwingTableColumn.SpecifierManagerIndex> indexSpecifiers) void
-
Field Details
-
model
-
selection
-
tableSource
-
-
Constructor Details
-
TableSelectionSourceDynamicBase
public TableSelectionSourceDynamicBase(GuiSwingTableColumnSet.TableColumnHost model, GuiReprCollectionTable.TableTargetCell selection)
-
-
Method Details
-
select
public void select(ObjectTableModelColumns.DynamicColumnFactory factory, String targetName, Set<GuiSwingTableColumnCollection.TargetAndSpecifierMap> occurrences, Consumer<GuiSwingTableColumnCollection.TargetAndSpecifierMap> resultGen) The method first obtainsObjectTableColumn
of selected {row,column}.If the column is a
GuiSwingTableColumnCollection.ObjectTableColumnCollectionWrapper
, then it was created as a dynamic column. The column has indexSpecifiers for obtaining the column value: {rowSpecifier,columnSpecifier,index1,index2, ...}. The action's target or arguments only requires the former part of the specs. e.g.class Tbl { List<List<E>> table; void act(List<List<E>> s) {...} } class E { List<Float> fs;}
then the specifier of the column "fs[n]" is {rowSpec,colSpec,indexSpecOfFs}, but the action "act" requires only {rowSpec}. //not {rowSpec,ColSpec}. currently, it is recognized as justact(List<X>)
If the column is another
ObjectTableColumn
type, then it was created as a static column. The column's specifier becomes {rowSpecifier}.- Parameters:
factory
- source of required specifiers :- For List<E> and action(List<E>), {rowSpecifier} become the required specifiers.
- For List<List<E>> and class E{ action() }, {rowSpecifier,columnSpecifier} become the required specs.
targetName
- name of the target field. for List<V> f1; List<V> f2; and action(List<V>,String targetName), the name is "f1" or "f2"occurrences
- a set for ignoring duplicated entriesresultGen
- action for each occurrence
-
selectSpecifierMapForCollectionWrapper
public Map<GuiSwingTableColumn.SpecifierManagerIndex,Integer> selectSpecifierMapForCollectionWrapper(GuiSwingTableColumnCollection.ObjectTableColumnCollectionWrapper column, int[] cell, List<GuiSwingTableColumn.SpecifierManagerIndex> indexSpecifiers) -
selectSpecifierMapForStaticColumn
public Map<GuiSwingTableColumn.SpecifierManagerIndex,Integer> selectSpecifierMapForStaticColumn(ObjectTableColumn column, int[] cell, List<GuiSwingTableColumn.SpecifierManagerIndex> indexSpecifiers) -
selectionActionFinished
public void selectionActionFinished(boolean autoSelection, GuiSwingTableColumnSet.TableSelectionChange change) -
setTableSource
-
selectionActionPrepare
public void selectionActionPrepare()- Since:
- 1.2
-