java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
org.autogui.swing.GuiSwingViewCollectionTable.CollectionTable
org.autogui.swing.LambdaProperty.LambdaCollectionTable
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,CellEditorListener
,ListSelectionListener
,RowSorterListener
,TableColumnModelListener
,TableModelListener
,Scrollable
,GuiMappingContext.SourceUpdateListener
,GuiSwingView.SettingsWindowClient
,GuiSwingView.ValuePane<List<?>>
,GuiSwingPrefsSupports.PreferencesUpdateSupport
,GuiSwingTableColumnSet.TableSelectionSource
- Enclosing class:
LambdaProperty<T>
public static class LambdaProperty.LambdaCollectionTable
extends GuiSwingViewCollectionTable.CollectionTable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTable
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class org.autogui.swing.GuiSwingViewCollectionTable.CollectionTable
actions, actionToolBar, autoSelectionActions, autoSelectionDepth, columnHeaderMenuItems, context, customHighlighting, customRowHeightByUser, customRowHeightIndividual, infoLabel, lastSelectionActionIndices, menuItems, popup, popupColumnHeader, preferencesUpdater, rowHeightByProgram, rowHeightSetAction, selectionRunner, selectionSourceForRowAndColumnIndices, selectionSourceForRowIndices, settingsWindow, source, specifierManager, viewClock
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionLambdaCollectionTable
(Class<E> elementType, Supplier<List<E>> getter) LambdaCollectionTable
(String name, Class<E> elementType, Supplier<List<E>> getter) -
Method Summary
Modifier and TypeMethodDescriptionaddColumn
(ObjectTableColumn column) addColumnBoolean
(String name, Function<E, Boolean> getter, BiConsumer<E, Boolean> setter) <E,
T> GuiMappingContext addColumnContext
(String name, Class<?> type, Function<E, T> getter, BiConsumer<E, T> setter, GuiRepresentation representation) <E,
T extends Enum<?>>
LambdaProperty.LambdaCollectionTableaddColumnEnum
(String name, Class<T> enumType, Function<E, T> getter, BiConsumer<E, T> setter) <T extends Enum<?>>
LambdaProperty.LambdaCollectionTableaddColumnEnum
(String name, Class<T> enumType, Supplier<T> getter, Consumer<T> setter) addColumnFilePath
(String name, Function<E, Path> getter, BiConsumer<E, Path> setter) <T extends Number>
LambdaProperty.LambdaCollectionTable<E,
T extends Image>
LambdaProperty.LambdaCollectionTableaddColumnImage
(String name, Class<T> imageType, Function<E, T> getter, BiConsumer<E, T> setter) <T extends Image>
LambdaProperty.LambdaCollectionTableaddColumnImage
(String name, Class<T> imageType, Supplier<T> getter, Consumer<T> setter) addColumnLabel
(String name, Function<E, ?> getter) addColumnLabel
(String name, Supplier<?> getter) <E,
T extends Number>
LambdaProperty.LambdaCollectionTableaddColumnNumber
(String name, Class<T> numType, Function<E, T> getter, BiConsumer<E, T> setter) <T extends Number>
LambdaProperty.LambdaCollectionTableaddColumnNumber
(String name, Class<T> numType, Supplier<T> getter, Consumer<T> setter) addColumnString
(String name, Function<E, String> getter, BiConsumer<E, String> setter) after adding columns and actions, this method sets up relating components for the table by callingGuiSwingViewCollectionTable.CollectionTable.setupAfterAddingColumns()
.void
wrapPane
(boolean verticalAlways, boolean horizontalAlways) callsfinishAdding()
, if not yet.Methods inherited from class org.autogui.swing.GuiSwingViewCollectionTable.CollectionTable
changeSelection, changeSelectionIndices, changeSelectionIndicesRowAndColumns, changeSelectionNothing, changeSelectionValues, convertColumnIndexToView, createDefaultTableHeader, getActions, getActionToolBar, getColumnHeaderMenuItems, getObjectTableModel, getPopup, getRowHeightByProgram, getRowHeightSetAction, getRowSpecifier, getSelectedItems, getSelectionSourceForRowAndColumnIndices, getSelectionSourceForRowIndices, getSettingsWindow, getSource, getSpecifier, getSwingMenuBuilder, getSwingStaticMenuItems, getSwingViewContext, getSwingViewValue, getTargetName, getToolTipText, hasCustomRowHeightByUser, init, initAction, initActionToolBar, initAfter, initColor, initContextUpdate, initDragDrop, initFocus, initGrid, initModel, initName, initPopup, initPreferencesUpdater, initRowHeight, initSelection, initSelectionClear, initSelectionSource, initTableScrollPane, initTableScrollPane, initValue, isAutoResizeOff, isSelectionEmpty, loadSwingPreferences, paintComponent, paintSelectedRows, prepareForRefresh, runAutoSelectionActions, runListSelection, saveSwingPreferences, selectionActionFinished, selectionActionPrepare, setCellEditor, setKeyStrokeString, setPreferencesUpdater, setRowHeight, setRowHeight, setRowHeightByUser, setSettingsWindow, setSwingViewValue, setSwingViewValue, setSwingViewValueWithUpdate, setSwingViewValueWithUpdate, setupAfterAddingColumns, setupAfterAddingColumns, shutdownSwingView, tableChanged, update, updateFromGui, updateSwingViewSource, updateSwingViewSourceFromRoot
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, print, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, unconfigureEnclosingScrollPane, updateUI, valueChanged
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.autogui.swing.GuiSwingView.ValuePane
addSwingEditFinishHandler, asSwingViewComponent, executeContextTask, getActionByContext, getActionByName, getChildByName, getDescendantActionByContext, getDescendantByContext, getDescendantByValue, getDescendantByValueIf, getPrefsJsonSupported, getSwingFocusKeyStroke, isSwingCurrentValueSupported, isSwingEditable, loadSwingPreferences, refreshByContext, requestSwingViewFocus, setPrefsJsonSupported, setSwingViewHistoryValue, setSwingViewValueForTable, wrapSwingNamed, wrapSwingProperty, wrapSwingScrollPane
-
Constructor Details
-
LambdaCollectionTable
-
LambdaCollectionTable
- Type Parameters:
E
- the element type- Parameters:
name
- the property nameelementType
- the list ellement typegetter
- the property getter
-
-
Method Details
-
initRowIndex
public void initRowIndex() -
addColumn
-
addColumnContext
public <E,T> GuiMappingContext addColumnContext(String name, Class<?> type, Function<E, T> getter, BiConsumer<E, T> setter, GuiRepresentation representation) -
addColumnBoolean
public <E> LambdaProperty.LambdaCollectionTable addColumnBoolean(String name, Function<E, Boolean> getter, BiConsumer<E, Boolean> setter) -
addColumnBoolean
-
addColumnString
public <E> LambdaProperty.LambdaCollectionTable addColumnString(String name, Function<E, String> getter, BiConsumer<E, String> setter) -
addColumnString
-
addColumnNumber
public <E,T extends Number> LambdaProperty.LambdaCollectionTable addColumnNumber(String name, Class<T> numType, Function<E, T> getter, BiConsumer<E, T> setter) -
addColumnNumber
-
addColumnEnum
public <E,T extends Enum<?>> LambdaProperty.LambdaCollectionTable addColumnEnum(String name, Class<T> enumType, Function<E, T> getter, BiConsumer<E, T> setter) -
addColumnEnum
-
addColumnFilePath
public <E> LambdaProperty.LambdaCollectionTable addColumnFilePath(String name, Function<E, Path> getter, BiConsumer<E, Path> setter) -
addColumnFilePath
-
addColumnImage
public <E,T extends Image> LambdaProperty.LambdaCollectionTable addColumnImage(String name, Class<T> imageType, Function<E, T> getter, BiConsumer<E, T> setter) -
addColumnImage
-
addColumnLabel
-
addColumnLabel
-
addAction
-
finishAdding
after adding columns and actions, this method sets up relating components for the table by callingGuiSwingViewCollectionTable.CollectionTable.setupAfterAddingColumns()
. The method will be automatically called bywrapPane(boolean, boolean)
.- Returns:
- this
- Since:
- 1.1
-
wrapSwingPane
- Returns:
- wrapping pane for the table with scroll-bars and tool-bar. call
wrapPane(boolean, boolean)
with (true, true)
-
wrapPane
public GuiSwingViewWrapper.ValueWrappingPane<List<?>> wrapPane(boolean verticalAlways, boolean horizontalAlways) callsfinishAdding()
, if not yet. callsGuiSwingViewCollectionTable.CollectionTable.initTableScrollPane()
andGuiSwingViewCollectionTable.CollectionTable.initActionToolBar(List)
.- Parameters:
verticalAlways
- flag for always displaying vertical scroll-barhorizontalAlways
- flag for always displaying horizontal scroll-bar- Returns:
- wrapping pane with scroll-bars and tool-bar.
-