Module org.autogui
Package org.autogui.swing.table
Class GuiSwingTableColumnCollection.ObjectTableColumnCollectionWrapper
java.lang.Object
org.autogui.swing.table.ObjectTableColumn
org.autogui.swing.table.GuiSwingTableColumnCollection.ObjectTableColumnCollectionWrapper
- All Implemented Interfaces:
GuiSwingView.SettingsWindowClient
,GuiSwingPrefsSupports.PreferencesUpdateSupport
,GuiSwingTableColumn.ObjectTableColumnWithContext
- Enclosing class:
GuiSwingTableColumnCollection
public static class GuiSwingTableColumnCollection.ObjectTableColumnCollectionWrapper
extends ObjectTableColumn
implements GuiSwingTableColumn.ObjectTableColumnWithContext
a dynamic version of column
-
Nested Class Summary
Nested classes/interfaces inherited from class org.autogui.swing.table.ObjectTableColumn
ObjectTableColumn.NumberRenderer, ObjectTableColumn.ObjectTableColumnLabel<ObjType,
PropType>, ObjectTableColumn.ObjectTableColumnRowIndex, ObjectTableColumn.PopupMenuBuilderSource, ObjectTableColumn.TableMenuComposite, ObjectTableColumn.TableMenuCompositeShared, ObjectTableColumn.TableTargetColumnForObjectColumn -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ObjectTableColumn
protected Map
<GuiSwingTableColumn.SpecifierManagerIndex, Integer> protected int[]
suppose {(parentIndices, ...,) elementIndex, propertyIndex}Fields inherited from class org.autogui.swing.table.ObjectTableColumn
comparator, rowHeight, tableColumn, valueType
-
Constructor Summary
ConstructorsConstructorDescriptionObjectTableColumnCollectionWrapper
(String headerName, GuiSwingTableColumn.ObjectTableColumnWithContext column, Map<GuiSwingTableColumn.SpecifierManagerIndex, Integer> indexInjection, GuiSwingTableColumn.SpecifierManagerIndex rowSpecifier, int[] indices) -
Method Summary
Modifier and TypeMethodDescriptionint[]
columnIndexToValueIndex
(int columnIndex) boolean
containsIndexInjections
(List<GuiSwingTableColumn.SpecifierManagerIndex> requiredSpecs) getCellValue
(Object rowObject, int rowIndex, int columnIndex, GuiReprValue.ObjectSpecifier specifier) getCellValueFromContext
(int rowIndex, int columnIndex, GuiReprValue.ObjectSpecifier specifier) Comparator
<?> getIndexInjection
(int rowIndex, List<GuiSwingTableColumn.SpecifierManagerIndex> requiredSpecs) getIndexInjectionForRowAndColumnIndices
(int rowIndex, List<GuiSwingTableColumn.SpecifierManagerIndex> requiredSpecs) int
getSpecifier
(int rowIndex, int columnIndex) void
loadSwingPreferences
(GuiPreferences prefs, GuiSwingPrefsApplyOptions options) void
Future
<?> setCellValue
(Object rowObject, int rowIndex, int columnIndex, Object newColumnValue, GuiReprValue.ObjectSpecifier specifier) Future
<?> setCellValueFromContext
(int rowIndex, int columnIndex, Object newColumnValue, GuiReprValue.ObjectSpecifier specifier) void
setColumnViewUpdater
(Consumer<ObjectTableColumn> updater) void
setComparator
(Comparator<?> comparator) void
void
setRowHeight
(int rowHeight) void
setSettingsWindow
(SettingsWindow settingWindow) at initialization of the root-pane, the method will be called for existing sub-panes.void
setTableColumn
(TableColumn tableColumn) void
shutdown()
void
viewUpdateAsDynamic
(ObjectTableColumn source) Methods inherited from class org.autogui.swing.table.ObjectTableColumn
createLabel, createLabel, fromActionValue, getMenuBuilderSource, getValueType, isTaskRunnerUsedFor, setCellBorder, setValueType, toActionValue, withCellEditor, withCellRenderer, withComparator, withHeaderRenderer, withHeaderValue, withIdentifier, withMaxWidth, withMinWidth, withPreferredWidth, withResizable, withRowHeight, withTableColumn, withValueType
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.GuiSwingTableColumn.ObjectTableColumnWithContext
asColumn, loadSwingPreferences
-
Field Details
-
column
-
rowSpecifier
-
indexInjection
-
indices
protected int[] indicessuppose {(parentIndices, ...,) elementIndex, propertyIndex}
-
-
Constructor Details
-
ObjectTableColumnCollectionWrapper
public ObjectTableColumnCollectionWrapper(String headerName, GuiSwingTableColumn.ObjectTableColumnWithContext column, Map<GuiSwingTableColumn.SpecifierManagerIndex, Integer> indexInjection, GuiSwingTableColumn.SpecifierManagerIndex rowSpecifier, int[] indices)
-
-
Method Details
-
getContext
- Specified by:
getContext
in interfaceGuiSwingTableColumn.ObjectTableColumnWithContext
-
getSpecifierManager
- Specified by:
getSpecifierManager
in interfaceGuiSwingTableColumn.ObjectTableColumnWithContext
-
setColumnViewUpdater
- Overrides:
setColumnViewUpdater
in classObjectTableColumn
-
setSettingsWindow
Description copied from interface:GuiSwingView.SettingsWindowClient
at initialization of the root-pane, the method will be called for existing sub-panes. a dynamically created view needs to be manually set by those panes.- Specified by:
setSettingsWindow
in interfaceGuiSwingView.SettingsWindowClient
- Parameters:
settingWindow
- a settings-window from the root-pane, which will be disposed at closing of the main window
-
getSettingsWindow
- Specified by:
getSettingsWindow
in interfaceGuiSwingView.SettingsWindowClient
-
setPreferencesUpdater
- Specified by:
setPreferencesUpdater
in interfaceGuiSwingPrefsSupports.PreferencesUpdateSupport
-
saveSwingPreferences
- Specified by:
saveSwingPreferences
in interfaceGuiSwingTableColumn.ObjectTableColumnWithContext
-
loadSwingPreferences
- Specified by:
loadSwingPreferences
in interfaceGuiSwingTableColumn.ObjectTableColumnWithContext
- Parameters:
prefs
- the source preferencesoptions
- processor
-
getSpecifier
- Overrides:
getSpecifier
in classObjectTableColumn
- Parameters:
rowIndex
- the row indexcolumnIndex
- the column index. ignored- Returns:
- a created specifier with setting the row index and indexInjection. the row index can be variable, and the column index (sub-indices except for the row index) is fixed as a dynamically created column.
-
getCellValue
public Object getCellValue(Object rowObject, int rowIndex, int columnIndex, GuiReprValue.ObjectSpecifier specifier) - Overrides:
getCellValue
in classObjectTableColumn
- Parameters:
rowObject
- the row object at rowIndexrowIndex
- the row indexcolumnIndex
- the column indexspecifier
- specifier fromObjectTableColumn.getSpecifier(int, int)
- Returns:
- the value at columnIndex of rowObject.
it might be
Future
, and then the value will be specially treated as getting the value of the future as the cell value.
-
setCellValue
public Future<?> setCellValue(Object rowObject, int rowIndex, int columnIndex, Object newColumnValue, GuiReprValue.ObjectSpecifier specifier) - Overrides:
setCellValue
in classObjectTableColumn
- Parameters:
rowObject
- the row object at rowIndexrowIndex
- the row indexcolumnIndex
- the column indexnewColumnValue
- the new value to be setspecifier
- specifier fromObjectTableColumn.getSpecifier(int, int)
- Returns:
- a future object for checking completion of the updating or null
-
getCellValueFromContext
public Object getCellValueFromContext(int rowIndex, int columnIndex, GuiReprValue.ObjectSpecifier specifier) - Overrides:
getCellValueFromContext
in classObjectTableColumn
-
setCellValueFromContext
public Future<?> setCellValueFromContext(int rowIndex, int columnIndex, Object newColumnValue, GuiReprValue.ObjectSpecifier specifier) - Overrides:
setCellValueFromContext
in classObjectTableColumn
-
columnIndexToValueIndex
public int[] columnIndexToValueIndex(int columnIndex) - Overrides:
columnIndexToValueIndex
in classObjectTableColumn
-
setTableColumn
- Overrides:
setTableColumn
in classObjectTableColumn
-
getRowHeight
public int getRowHeight()- Overrides:
getRowHeight
in classObjectTableColumn
-
setRowHeight
public void setRowHeight(int rowHeight) - Overrides:
setRowHeight
in classObjectTableColumn
-
getComparator
- Overrides:
getComparator
in classObjectTableColumn
-
setComparator
- Overrides:
setComparator
in classObjectTableColumn
-
shutdown
public void shutdown()- Overrides:
shutdown
in classObjectTableColumn
-
getTableColumn
- Overrides:
getTableColumn
in classObjectTableColumn
-
getCompositesForRows
- Overrides:
getCompositesForRows
in classObjectTableColumn
-
getCompositesForCells
- Overrides:
getCompositesForCells
in classObjectTableColumn
-
viewUpdateAsDynamic
- Overrides:
viewUpdateAsDynamic
in classObjectTableColumn
-
containsIndexInjections
public boolean containsIndexInjections(List<GuiSwingTableColumn.SpecifierManagerIndex> requiredSpecs) -
getIndexInjection
public Map<GuiSwingTableColumn.SpecifierManagerIndex,Integer> getIndexInjection(int rowIndex, List<GuiSwingTableColumn.SpecifierManagerIndex> requiredSpecs) -
getIndexInjectionForRowAndColumnIndices
public Map<GuiSwingTableColumn.SpecifierManagerIndex,Integer> getIndexInjectionForRowAndColumnIndices(int rowIndex, List<GuiSwingTableColumn.SpecifierManagerIndex> requiredSpecs)
-