java.lang.Object
org.autogui.swing.table.TableTargetCellForJTable
- All Implemented Interfaces:
GuiReprCollectionTable.TableTarget
,GuiReprCollectionTable.TableTargetCell
- Direct Known Subclasses:
GuiSwingViewCollectionTable.TableTargetCellForCollectionTable
,TableTargetColumnForJTable
public class TableTargetCellForJTable
extends Object
implements GuiReprCollectionTable.TableTargetCell
an implementation of
GuiReprCollectionTable.TableTargetCell
for JTable
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]
convertViewToData
(int viewRow, int viewColumn) getCellsByCellIndices
(Iterable<int[]> idx) Iterable
<int[]> Iterable
<int[]> int[]
the model of the table must beObjectTableModel
getTable()
boolean
void
setCellValues
(Iterable<int[]> pos, Function<int[], Object> posToValue) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.autogui.base.mapping.GuiReprCollectionTable.TableTarget
getSelectedCellIndicesAsList, getSelectedCellValues
Methods inherited from interface org.autogui.base.mapping.GuiReprCollectionTable.TableTargetCell
getSelectedRowAllCellIndicesAsList
-
Field Details
-
table
-
-
Constructor Details
-
TableTargetCellForJTable
-
-
Method Details
-
isSelectionEmpty
public boolean isSelectionEmpty()- Specified by:
isSelectionEmpty
in interfaceGuiReprCollectionTable.TableTarget
-
getSelectedRows
public int[] getSelectedRows()- Specified by:
getSelectedRows
in interfaceGuiReprCollectionTable.TableTarget
-
getSelectedRowsView
-
setCellValues
- Specified by:
setCellValues
in interfaceGuiReprCollectionTable.TableTarget
-
setCellValues
- Specified by:
setCellValues
in interfaceGuiReprCollectionTable.TableTarget
- Parameters:
pos
- the specified cell: {row, column}posToValue
- pos: {row, column} to a cell value, if it returns null, then it skips the updating
-
getSelectedCellIndices
- Specified by:
getSelectedCellIndices
in interfaceGuiReprCollectionTable.TableTarget
- Returns:
- a sequence of {row, column}. those indices are from the view model, which might be different from the context's ones. The view-model has additional columns other than the context, e.g. the row-index column.
-
getSelectedRowAllCellIndices
- Specified by:
getSelectedRowAllCellIndices
in interfaceGuiReprCollectionTable.TableTargetCell
-
convertViewToData
public int[] convertViewToData(int viewRow, int viewColumn) -
getSelectedCells
- Specified by:
getSelectedCells
in interfaceGuiReprCollectionTable.TableTarget
-
getSelectedRowAllCells
- Specified by:
getSelectedRowAllCells
in interfaceGuiReprCollectionTable.TableTargetCell
-
getCellsByCellIndices
-
getSelectedRowValues
the model of the table must beObjectTableModel
- Specified by:
getSelectedRowValues
in interfaceGuiReprCollectionTable.TableTarget
-
getTable
-