Module org.autogui
Package org.autogui.swing.table
Class GuiSwingTableColumnCollection.TableSelectionSourceDynamicForIndices
java.lang.Object
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForIndices
- All Implemented Interfaces:
GuiSwingTableColumnSet.TableSelectionSource
- Direct Known Subclasses:
GuiSwingTableColumnCollection.TableSelectionSourceDynamicForRowAndColumnIndices
- Enclosing class:
GuiSwingTableColumnCollection
public static class GuiSwingTableColumnCollection.TableSelectionSourceDynamicForIndices
extends GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
class T { List<List<E>> list; } class E { String n; List<Float> l1; List<String> l2; void act(List<Integer> selectedIndices, String targetName) {...} }the class T will be bound to a table like the following columns
# | n[0] | l1[0,0] | ... | l2[0,0] | ... | n[1] | l1[1,0] | l1[1,1] | ... | l2[1,0] | ... ----|------|----------|-----|---------|-----|------|---------|---------|-----|---------|----- 0 | | a | ... | b | ... | | c | d | ... | | ...If a user selects the columns "a", "b", "c" and "d", and runs the action "act", then the following code will be executed
T t = ...; t.list.get(0).get(0).act(asList(0), "l1"); //a t.list.get(0).get(0).act(asList(1), "l2"); //b t.list.get(0).get(1).act(asList(0,1), "l1"); //c,d
-
Field Summary
Fields inherited from class org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
argumentFactories, targetFactory
Fields inherited from class org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase
model, selection, tableSource
-
Constructor Summary
ConstructorsConstructorDescriptionTableSelectionSourceDynamicForIndices
(GuiSwingTableColumnSet.TableColumnHost model, GuiReprCollectionTable.TableTargetCell selection, ObjectTableModelColumns.DynamicColumnFactory targetFactory, List<GuiSwingTableColumnCollection.DynamicColumnFactoryList> argumentFactories) -
Method Summary
Modifier and TypeMethodDescriptiongetIndexValue
(GuiSwingTableColumnCollection.DynamicColumnFactoryList argumentFactory, GuiSwingTableColumnCollection.TargetAndSpecifierMap t, List<GuiSwingTableColumn.SpecifierManagerIndex> cellSpecs) toCellIndexSpecs
(List<GuiSwingTableColumn.SpecifierManagerIndex> targetSpecs, List<GuiSwingTableColumn.SpecifierManagerIndex> argSpecs) Methods inherited from class org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
getSelectedItems, getSelectionFactory, getTargetName, isSelectionEmpty
Methods inherited from class org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase
select, selectionActionFinished, selectionActionPrepare, selectSpecifierMapForCollectionWrapper, selectSpecifierMapForStaticColumn, setTableSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.autogui.swing.table.GuiSwingTableColumnSet.TableSelectionSource
selectionActionFinished, selectionActionPrepare
-
Constructor Details
-
TableSelectionSourceDynamicForIndices
public TableSelectionSourceDynamicForIndices(GuiSwingTableColumnSet.TableColumnHost model, GuiReprCollectionTable.TableTargetCell selection, ObjectTableModelColumns.DynamicColumnFactory targetFactory, List<GuiSwingTableColumnCollection.DynamicColumnFactoryList> argumentFactories)
-
-
Method Details
-
toCellIndexSpecs
public List<GuiSwingTableColumn.SpecifierManagerIndex> toCellIndexSpecs(List<GuiSwingTableColumn.SpecifierManagerIndex> targetSpecs, List<GuiSwingTableColumn.SpecifierManagerIndex> argSpecs) - Overrides:
toCellIndexSpecs
in classGuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
-
getIndexValue
public Object getIndexValue(GuiSwingTableColumnCollection.DynamicColumnFactoryList argumentFactory, GuiSwingTableColumnCollection.TargetAndSpecifierMap t, List<GuiSwingTableColumn.SpecifierManagerIndex> cellSpecs) - Overrides:
getIndexValue
in classGuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
-