java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
org.autogui.swing.GuiSwingViewCollectionTable.CollectionTable
- 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
- Direct Known Subclasses:
LambdaProperty.LambdaCollectionTable
- Enclosing class:
GuiSwingViewCollectionTable
public static class GuiSwingViewCollectionTable.CollectionTable
extends JTable
implements GuiMappingContext.SourceUpdateListener, GuiSwingView.ValuePane<List<?>>, GuiSwingTableColumnSet.TableSelectionSource, GuiSwingPrefsSupports.PreferencesUpdateSupport, GuiSwingView.SettingsWindowClient
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTable
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintModeNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JToolBarprotected intprotected List<PopupCategorized.CategorizedMenuItem> protected GuiMappingContextprotected booleanprotected booleanprotected booleansome row-height is customized bysetRowHeight(int, int).protected MenuBuilder.MenuLabelprotected List<PopupCategorized.CategorizedMenuItem> protected intprotected EditingRunnerprotected SettingsWindowprotected List<?> protected GuiSwingView.SpecifierManagerprotected GuiTaskClockFields 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, tableHeaderFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionCollectionTable(GuiMappingContext context, GuiSwingView.SpecifierManager specifierManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeSelection(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChange change) voidchangeSelectionIndices(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChangeIndices change) voidchangeSelectionIndicesRowAndColumns(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChangeIndicesRowAndColumn change) voidchangeSelectionNothing(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChange change) voidchangeSelectionValues(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChangeValues change) intconvertColumnIndexToView(int modelColumnIndex) protected JTableHeaderprotected GuiInitsgetInits()getPopup()intobtains an object for row-height customizingList<?> List<?> a typical implementation if there are no dynamic items becomes like the following code:a typical implementation becomes like the following code:List<?> getToolTipText(MouseEvent event) booleanvoidinit()voidinitAction(JToolBar actionToolBar, Action action) initActionToolBar(List<Action> actions) voidvoidvoidvoidvoidvoidinitGrid()voidvoidinitName()voidvoidvoidprotected voidset initial row-height settings fromGuiInits; reusing setting methods ofGuiSwingViewCollectionTable.PreferencesForTablevoidvoidvoidvoidinitTableScrollPane(JScrollPane scrollPane) voidprotected booleanbooleanvoidloadSwingPreferences(GuiPreferences prefs, GuiSwingPrefsApplyOptions options) a sub-class which wraps another value-pane should overrides the method in order to omit needless value setting.protected voidprotected voidvoidfor each component, the method is called before refreshing in order to clear the view-clock.voidvoidvoidonly save the component itself, not including children.voidselectionActionFinished(boolean autoSelection, GuiSwingTableColumnSet.TableSelectionChange change) the finisher for the action: the table implements the method in order to refresh selected rows.voidthe preparation for the action: the table stops editingvoidsetCellEditor(TableCellEditor anEditor) voidsetKeyStrokeString(String keyStrokeString) set the key-stroke info.voidvoidsetRowHeight(int rowHeight) voidsetRowHeight(int row, int rowHeight) voidsetRowHeightByUser(int rowHeight) setting the custom row-heightvoidsetSettingsWindow(SettingsWindow settingsWindow) at initialization of the root-pane, the method will be called for existing sub-panes.voidsetSwingViewValue(List<?> value) update GUI display, and it does NOT update the target model value.voidsetSwingViewValue(List<?> value, GuiTaskClock clock) update if the clock is newer than the current view-clock of the pane.voidsetSwingViewValueWithUpdate(List<?> value) update the GUI display and the model.voidsetSwingViewValueWithUpdate(List<?> value, GuiTaskClock clock) update the GUI display and the model if the clock is newer than the current view-clock of the pane.voidsetup related components for the table and actionssetupAfterAddingColumns(List<Action> actions) voidfor each component, at the end of the process, this method will be calledvoidoverrides for preserving custom-row-heights if e is a total refreshing: IfTableModelEvent.getLastRow()isInteger.MAX_VALUE, it indicates updating of all rows.voidupdate(GuiMappingContext cause, Object newValue, GuiTaskClock contextClock) voidupdateFromGui(Object v, GuiTaskClock viewClock) voidupdate by context and refresh byObjectTableModel.refreshData()voidupdate by context and refresh byObjectTableModel.refreshData()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, valueChangedMethods 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, updateMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, wrapSwingPane, wrapSwingProperty, wrapSwingScrollPane
-
Field Details
-
context
-
specifierManager
-
source
-
popup
-
actions
-
autoSelectionActions
-
autoSelectionDepth
protected int autoSelectionDepth -
selectionRunner
-
preferencesUpdater
-
lastSelectionActionIndices
-
selectionSourceForRowIndices
-
selectionSourceForRowAndColumnIndices
protected GuiSwingViewCollectionTable.TableSelectionSourceForIndices selectionSourceForRowAndColumnIndices -
popupColumnHeader
-
columnHeaderMenuItems
-
infoLabel
-
actionToolBar
-
viewClock
-
settingsWindow
-
customHighlighting
protected boolean customHighlighting -
customRowHeightByUser
protected boolean customRowHeightByUser- Since:
- 1.3
-
rowHeightByProgram
protected int rowHeightByProgram- Since:
- 1.3
-
customRowHeightIndividual
protected boolean customRowHeightIndividualsome row-height is customized bysetRowHeight(int, int). cleared bysetRowHeight(int)- Since:
- 1.6
-
rowHeightSetAction
- Since:
- 1.6
-
-
Constructor Details
-
CollectionTable
-
-
Method Details
-
init
public void init() -
initColor
public void initColor() -
initName
public void initName() -
initModel
public void initModel() -
initContextUpdate
public void initContextUpdate() -
initPopup
public void initPopup() -
initGrid
public void initGrid() -
initSelection
public void initSelection() -
initSelectionSource
public void initSelectionSource() -
initSelectionClear
public void initSelectionClear() -
initRowHeight
public void initRowHeight() -
initRowHeightDefault
protected void initRowHeightDefault()set initial row-height settings fromGuiInits; reusing setting methods ofGuiSwingViewCollectionTable.PreferencesForTable- Since:
- 1.8
-
getInits
- Returns:
GuiInitsattached to the (parent) table property context, or default- Since:
- 1.8
-
initValue
public void initValue() -
initPreferencesUpdater
public void initPreferencesUpdater() -
initDragDrop
public void initDragDrop() -
initFocus
public void initFocus() -
initAfter
public void initAfter() -
getSwingStaticMenuItems
Description copied from interface:GuiSwingView.ValuePanea typical implementation becomes like the following code:if (menuItems == null) { menuItems =PopupCategorized.getMenuItems(actions, menus); } return menuItems;the method returns original menu items for the pane. so, if a wrapper pane has a wrapped sub-pane added as a child component, it should not include items of the wrapped sub-pane.
- Specified by:
getSwingStaticMenuItemsin interfaceGuiSwingView.ValuePane<List<?>>- Returns:
- a list of actions (or menu-components) statically determined, that should be always same instances
-
getPopup
-
setupAfterAddingColumns
-
setupAfterAddingColumns
public void setupAfterAddingColumns()setup related components for the table and actions- Since:
- 1.1
-
initTableScrollPane
-
initTableScrollPane
-
isAutoResizeOff
protected boolean isAutoResizeOff() -
initActionToolBar
-
runListSelection
-
runAutoSelectionActions
-
initAction
-
setSettingsWindow
Description copied from interface:GuiSwingView.SettingsWindowClientat 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:
setSettingsWindowin interfaceGuiSwingView.SettingsWindowClient- Parameters:
settingsWindow- a settings-window from the root-pane, which will be disposed at closing of the main window
-
getSettingsWindow
- Specified by:
getSettingsWindowin interfaceGuiSwingView.SettingsWindowClient
-
getActions
-
getSwingMenuBuilder
Description copied from interface:GuiSwingView.ValuePanea typical implementation if there are no dynamic items becomes like the following code:if (popup == null) { popup = newPopupExtension(this, newPopupCategorized(this::getSwingStaticMenuItems)); } return popup.getMenuBuilder();- Specified by:
getSwingMenuBuilderin interfaceGuiSwingView.ValuePane<List<?>>- Returns:
- a menu builder
-
getObjectTableModel
-
getSource
-
getSelectionSourceForRowAndColumnIndices
public GuiSwingViewCollectionTable.TableSelectionSourceForIndices getSelectionSourceForRowAndColumnIndices() -
getSelectionSourceForRowIndices
-
update
- Specified by:
updatein interfaceGuiMappingContext.SourceUpdateListener
-
getSwingViewValue
- Specified by:
getSwingViewValuein interfaceGuiSwingView.ValuePane<List<?>>- Returns:
- basically, the source value of the context, held by the component without touching the context.
-
setSwingViewValue
Description copied from interface:GuiSwingView.ValuePaneupdate GUI display, and it does NOT update the target model value. processed under the event thread. also increment the view-clock.- Specified by:
setSwingViewValuein interfaceGuiSwingView.ValuePane<List<?>>- Parameters:
value- the new value
-
setSwingViewValueWithUpdate
Description copied from interface:GuiSwingView.ValuePaneupdate the GUI display and the model. processed under the event thread. also increment the view-clock- Specified by:
setSwingViewValueWithUpdatein interfaceGuiSwingView.ValuePane<List<?>>- Parameters:
value- the new value
-
setSwingViewValue
Description copied from interface:GuiSwingView.ValuePaneupdate if the clock is newer than the current view-clock of the pane. the view-clock becomes the given clock. Note: instead,GuiSwingView.ValuePane.setSwingViewValue(Object)increments the current clock- Specified by:
setSwingViewValuein interfaceGuiSwingView.ValuePane<List<?>>- Parameters:
value- the new valueclock- the clock of the value: if the clock is newer than the current view-clock of the pane, it can update
-
setSwingViewValueWithUpdate
Description copied from interface:GuiSwingView.ValuePaneupdate the GUI display and the model if the clock is newer than the current view-clock of the pane. the view-clock becomes the given clock.- Specified by:
setSwingViewValueWithUpdatein interfaceGuiSwingView.ValuePane<List<?>>- Parameters:
value- the new valueclock- the clock of the value
-
updateFromGui
-
setPreferencesUpdater
- Specified by:
setPreferencesUpdaterin interfaceGuiSwingPrefsSupports.PreferencesUpdateSupport
-
shutdownSwingView
public void shutdownSwingView()Description copied from interface:GuiSwingView.ValuePanefor each component, at the end of the process, this method will be called- Specified by:
shutdownSwingViewin interfaceGuiSwingView.ValuePane<List<?>>
-
prepareForRefresh
public void prepareForRefresh()Description copied from interface:GuiSwingView.ValuePanefor each component, the method is called before refreshing in order to clear the view-clock.- Specified by:
prepareForRefreshin interfaceGuiSwingView.ValuePane<List<?>>
-
getActionToolBar
-
getTargetName
- Specified by:
getTargetNamein interfaceGuiSwingTableColumnSet.TableSelectionSource
-
isSelectionEmpty
public boolean isSelectionEmpty()- Specified by:
isSelectionEmptyin interfaceGuiSwingTableColumnSet.TableSelectionSource
-
getSelectedItems
- Specified by:
getSelectedItemsin interfaceGuiSwingTableColumnSet.TableSelectionSource
-
selectionActionFinished
public void selectionActionFinished(boolean autoSelection, GuiSwingTableColumnSet.TableSelectionChange change) Description copied from interface:GuiSwingTableColumnSet.TableSelectionSourcethe finisher for the action: the table implements the method in order to refresh selected rows. However, naive executions of the action by list selection changes will cause infinite loop. To avoid this, an impl. of the method needs to check the flag and avoid handling list selection events caused by the method.- Specified by:
selectionActionFinishedin interfaceGuiSwingTableColumnSet.TableSelectionSource- Parameters:
autoSelection- true if the action is automatically executed by selection changeschange- specification of selection changes
-
changeSelection
public void changeSelection(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChange change) -
changeSelectionNothing
public void changeSelectionNothing(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChange change) -
changeSelectionIndices
public void changeSelectionIndices(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChangeIndices change) -
changeSelectionValues
public void changeSelectionValues(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChangeValues change) -
changeSelectionIndicesRowAndColumns
public void changeSelectionIndicesRowAndColumns(int[] selectedModelRowsIndices, GuiSwingTableColumnSet.TableSelectionChangeIndicesRowAndColumn change) -
getSwingViewContext
- Specified by:
getSwingViewContextin interfaceGuiSwingView.ValuePane<List<?>>
-
loadSwingPreferences
Description copied from interface:GuiSwingView.ValuePanea sub-class which wraps another value-pane should overrides the method in order to omit needless value setting. it can useGuiSwingView.loadPreferencesDefault(JComponent, GuiPreferences)- Specified by:
loadSwingPreferencesin interfaceGuiSwingView.ValuePane<List<?>>- Parameters:
prefs- target prefs or ancestor of the target; actual target can be obtained byGuiPreferences.getDescendant(GuiMappingContext)options- options for applying
-
saveSwingPreferences
Description copied from interface:GuiSwingView.ValuePaneonly save the component itself, not including children. it can useGuiSwingView.savePreferencesDefault(JComponent, GuiPreferences)- Specified by:
saveSwingPreferencesin interfaceGuiSwingView.ValuePane<List<?>>- Parameters:
prefs- target prefs or ancestor of the target; actual target can be obtained byGuiPreferences.getDescendant(GuiMappingContext)
-
paintComponent
- Overrides:
paintComponentin classJComponent
-
paintSelectedRows
-
getSpecifier
- Specified by:
getSpecifierin interfaceGuiSwingView.ValuePane<List<?>>- Returns:
- the specifier for the context value, typically obtained from
GuiSwingView.SpecifierManager
-
getRowSpecifier
-
setKeyStrokeString
Description copied from interface:GuiSwingView.ValuePaneset the key-stroke info. to the pane as a guide- Specified by:
setKeyStrokeStringin interfaceGuiSwingView.ValuePane<List<?>>- Parameters:
keyStrokeString- the key stroke info to be set.
-
getColumnHeaderMenuItems
-
convertColumnIndexToView
public int convertColumnIndexToView(int modelColumnIndex) - Overrides:
convertColumnIndexToViewin classJTable
-
updateSwingViewSource
public void updateSwingViewSource()update by context and refresh byObjectTableModel.refreshData()- Specified by:
updateSwingViewSourcein interfaceGuiSwingView.ValuePane<List<?>>- Since:
- 1.1
-
updateSwingViewSourceFromRoot
public void updateSwingViewSourceFromRoot()update by context and refresh byObjectTableModel.refreshData()- Specified by:
updateSwingViewSourceFromRootin interfaceGuiSwingView.ValuePane<List<?>>- Since:
- 1.1
-
setCellEditor
- Overrides:
setCellEditorin classJTable
-
selectionActionPrepare
public void selectionActionPrepare()Description copied from interface:GuiSwingTableColumnSet.TableSelectionSourcethe preparation for the action: the table stops editing- Specified by:
selectionActionPreparein interfaceGuiSwingTableColumnSet.TableSelectionSource
-
setRowHeight
public void setRowHeight(int rowHeight) - Overrides:
setRowHeightin classJTable
-
setRowHeightByUser
public void setRowHeightByUser(int rowHeight) setting the custom row-height- Parameters:
rowHeight- the new row-height- Since:
- 1.3
-
setRowHeight
public void setRowHeight(int row, int rowHeight) - Overrides:
setRowHeightin classJTable
-
hasCustomRowHeightByUser
public boolean hasCustomRowHeightByUser()- Returns:
- true if it has the value set by
setRowHeightByUser(int) - Since:
- 1.3
-
getRowHeightByProgram
public int getRowHeightByProgram()- Returns:
- the last row-height set by
setRowHeight(int) - Since:
- 1.3
-
getToolTipText
- Overrides:
getToolTipTextin classJTable
-
createDefaultTableHeader
- Overrides:
createDefaultTableHeaderin classJTable
-
tableChanged
overrides for preserving custom-row-heights if e is a total refreshing: IfTableModelEvent.getLastRow()isInteger.MAX_VALUE, it indicates updating of all rows. Then, the default impl. ofJTableclears custom all-row-heights set bysetRowHeight(int, int). This causes unintended row-heights expansion by re-painting after the method. So, the overriding impl. saves before super call, and resets the saved values before re-painting.- Specified by:
tableChangedin interfaceTableModelListener- Overrides:
tableChangedin classJTable- Parameters:
e- a model-event
-
getRowHeightSetAction
obtains an object for row-height customizing- Returns:
- the action instance associated to the table
- Since:
- 1.6
-