Module org.autogui
Package org.autogui.swing.table
Class GuiSwingTableColumnCollection.TableSelectionSourceDynamicForRowAndColumnIndices
java.lang.Object
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForIndices
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForRowAndColumnIndices
- All Implemented Interfaces:
GuiSwingTableColumnSet.TableSelectionSource
- Enclosing class:
GuiSwingTableColumnCollection
public static class GuiSwingTableColumnCollection.TableSelectionSourceDynamicForRowAndColumnIndices
extends GuiSwingTableColumnCollection.TableSelectionSourceDynamicForIndices
class T { List<List<E>> list; } class E { String n; List<Float> l1; List<String> l2; void act(List<int[]> 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 | ... | | ... 1 | | | ... | e | ... | | | f | ... | g | ...If a user selects the columns "a"..."g", 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({0}), "l2"); //b t.list.get(0).get(1).act(asList({0},{1}),"l1"); //c,d t.list.get(1).get(0).act(asList({0}), "l2"); //e t.list.get(1).get(1).act(asList({1}), "l1"); //f t.list.get(1).get(1).act(asList({0}), "l2"); //gBoth "l1" and "l2" has indexSpecs "[i][j][k]" (e.g. list.get(i).get(j).l1.get(k)), but "i" and "j" will be ignored for the action "act" in "E" and each element of the argument becomes {k}. This is intended to keep the int[] having {row,column,...} observed by the target of the action (here "E"). The user can distinguish "i" and "j" by the target instance of "E".
-
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
ConstructorsConstructorDescriptionTableSelectionSourceDynamicForRowAndColumnIndices
(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> cellSpecsExcluded) selectSpecifierMapForCollectionWrapper
(GuiSwingTableColumnCollection.ObjectTableColumnCollectionWrapper column, int[] cell, List<GuiSwingTableColumn.SpecifierManagerIndex> indexSpecifiers) toCellIndexSpecs
(List<GuiSwingTableColumn.SpecifierManagerIndex> targetSpecs, List<GuiSwingTableColumn.SpecifierManagerIndex> argSpecs) Methods inherited from class org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
getSelectedItems, getTargetName, isSelectionEmpty
Methods inherited from class org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase
select, selectionActionFinished, selectionActionPrepare, 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
-
TableSelectionSourceDynamicForRowAndColumnIndices
public TableSelectionSourceDynamicForRowAndColumnIndices(GuiSwingTableColumnSet.TableColumnHost model, GuiReprCollectionTable.TableTargetCell selection, ObjectTableModelColumns.DynamicColumnFactory targetFactory, List<GuiSwingTableColumnCollection.DynamicColumnFactoryList> argumentFactories)
-
-
Method Details
-
getSelectionFactory
public ObjectTableModelColumns.DynamicColumnFactory getSelectionFactory(GuiSwingTableColumnCollection.DynamicColumnFactoryList argumentFactory) - Overrides:
getSelectionFactory
in classGuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
-
selectSpecifierMapForCollectionWrapper
public Map<GuiSwingTableColumn.SpecifierManagerIndex,Integer> selectSpecifierMapForCollectionWrapper(GuiSwingTableColumnCollection.ObjectTableColumnCollectionWrapper column, int[] cell, List<GuiSwingTableColumn.SpecifierManagerIndex> indexSpecifiers) -
toCellIndexSpecs
public List<GuiSwingTableColumn.SpecifierManagerIndex> toCellIndexSpecs(List<GuiSwingTableColumn.SpecifierManagerIndex> targetSpecs, List<GuiSwingTableColumn.SpecifierManagerIndex> argSpecs) - Overrides:
toCellIndexSpecs
in classGuiSwingTableColumnCollection.TableSelectionSourceDynamicForIndices
-
getIndexValue
public Object getIndexValue(GuiSwingTableColumnCollection.DynamicColumnFactoryList argumentFactory, GuiSwingTableColumnCollection.TargetAndSpecifierMap t, List<GuiSwingTableColumn.SpecifierManagerIndex> cellSpecsExcluded) - Overrides:
getIndexValue
in classGuiSwingTableColumnCollection.TableSelectionSourceDynamicForIndices
-