Class InputOverlayTable
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
com.illumon.iris.gui.table.GuiTable
com.illumon.iris.console.utils.input.InputOverlayTable
- All Implemented Interfaces:
BidirectionalLink,Linkable,LinkSource,LinkTarget,Workspace,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,CellEditorListener,ListSelectionListener,RowSorterListener,TableColumnModelListener,TableModelListener,Scrollable
public class InputOverlayTable extends GuiTable implements BidirectionalLink
A
GuiTable implementation that provides an overlay of locally edited values on top of a server side
MutableInputTable- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.gui.table.GuiTable
GuiTable.AlertStyleNested 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.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields Modifier and Type Field Description static StringDELETE_COL_NAMEFields 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
Constructors Constructor Description InputOverlayTable(com.fishlib.io.logger.Logger log, InputOverlayTableModel inputOverlayTableModel, MutableInputTable inputTable, IrisWidgetSupport irisWidgetSupport, boolean keysEditable, IrisView view) -
Method Summary
Modifier and Type Method Description voidaddTarget(LinkTarget target)Add the specified target to this Source's list of links.booleaneditCellAt(int row, int column, EventObject e)Collection<Condition>getAllowedConditions(String column)protected Set<String>getBackColumns()booleangetClearFiltersBeforeUpdate()Indicates if a Link Target will clear its filters before an update.JComponentgetComponent()Get's the UI component for this Linkable.StringgetFriendlyName()StringgetId()List<String>getLinkableColumns()Map<LinkSource,Collection<LinkDescriptor>>getLinks()Collection<LinkDescriptor>getLinks(LinkSource source)Set<String>getSourceLinkColumns()Collection<LinkTarget>getTargets()protected voidhandleUnmentionedColumns(HiddenColumnModel columnModel, Set<TableColumn> unmentionedColumns, Collection<String> initialHiddenColumns)Handle any columns that have not been visited by the current column ordering.booleanisLinked()voidmakeLink(LinkSource from, String sourceColumn, String targetColumn, Condition condition)Create a link from sourceColumn on aLinkSourceto the targetColumn of thisLinkTargetusing the specifiedConditionas a filter conditionvoidprocessDoubleClick(int row, int col, MouseEvent e)Process a double click.protected voidprocessHeaderClick(int col, MouseEvent e)Process a header single or double click.protected voidprocessSingleClick(int row, int col, MouseEvent e)Process a single click.booleanreadyForLinks()voidremoveAllLinks()Remove all target links from this source.voidremoveAllLinks(LinkSource from)Remove all column filter links between this object and the specified source.voidremoveLink(LinkSource from, String srcColumn, String targetColumn, Condition condition)Remove a link between the specified columns and condition between this target and it's source.voidremoveTarget(LinkTarget target)Remove the specified Target from this source's notification list.voidsetClearFiltersBeforeUpdate(boolean shouldClear)Sets if a Link Target should clear its filters before an update.voidtableChanged(TableModelEvent e)voidupdate(LinkEvent event)Notify this LinkTarget of an event from a source.voidupdateColumns()Called when the table changes in order to properly process updates to columns.Methods inherited from class com.illumon.iris.gui.table.GuiTable
areSavedLayoutsAllowed, changeSelection, convertTableColumns, createDefaultColumnModel, createDefaultTableHeader, createFilterMenu, createTableColumn, createTransferHandler, generateToolTip, getAlertsPropagate, getAlertStyle, getAutoFilterColumns, getColumnSet, getFreezeColumns, getFreezeColumnsManager, getFrontColumns, getGridColor, getHeaderToolTipText, getHiddenColumns, getOriginalRenderer, getOriginalTableModel, getRowHeight, getSelectedRow, getSelectedRows, getViewableCells, getWorkspaceInfo, isAlertsOn, isFollowingTable, isOneClickOn, maybeAddSelectionModel, resetColumns, rowAtPoint, scrollToCenter, scrollToRow, setAlertsOn, setAlertsPropagate, setAlertsStyle, setColumnFormatter, setDefaultAlert, setFollowTable, setFreezeColumnsManager, setModel, setModel, setOneClickOn, setTableDescription, setTableHeader, setWorkspaceInfo, shouldSelectAlert, workspaceHasFreezeColumnsMethods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createScrollPaneForTable, doLayout, 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, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRowCount, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, 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, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, 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, paintComponent, 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 com.illumon.iris.gui.filterlink.LinkTarget
applyDefaultFilters, applyFilters, applyFilters, getCurrentFilters, getTrueTarget
-
Field Details
-
DELETE_COL_NAME
- See Also:
- Constant Field Values
-
-
Constructor Details
-
InputOverlayTable
public InputOverlayTable(@NotNull com.fishlib.io.logger.Logger log, @NotNull InputOverlayTableModel inputOverlayTableModel, @NotNull MutableInputTable inputTable, @NotNull IrisWidgetSupport irisWidgetSupport, boolean keysEditable, @NotNull IrisView view)
-
-
Method Details
-
updateColumns
public void updateColumns()Description copied from class:GuiTableCalled when the table changes in order to properly process updates to columns.
Handles the following column updates:
- preserve current order
- keep hidden columns hidden
- add new columns to the end
- replace columns that are the "same"
- remove missing columns
- fix renderers of the wrong column typeSubclasses may override this method to add additional updates to columns. It is recommended to call super.updateColumns() before operating on columns.
- Overrides:
updateColumnsin classGuiTable
-
editCellAt
- Overrides:
editCellAtin classJTable
-
processSingleClick
Description copied from class:GuiTableProcess a single click. The base method does nothing and may be overridden.- Overrides:
processSingleClickin classGuiTable- Parameters:
row- The row clicked.col- The column clicked.e- The details of the click event.
-
processHeaderClick
Description copied from class:GuiTableProcess a header single or double click. The base method creates aTableHeaderPopupbut may be overridden.- Overrides:
processHeaderClickin classGuiTable- Parameters:
col- The column clicked.e- The details of the click event.
-
processDoubleClick
Description copied from class:GuiTableProcess a double click. The base method does nothing and may be overridden.- Overrides:
processDoubleClickin classGuiTable- Parameters:
row- The row clicked.col- The column clicked.e- The details of the click event.
-
tableChanged
- Specified by:
tableChangedin interfaceTableModelListener- Overrides:
tableChangedin classGuiTable
-
getBackColumns
- Overrides:
getBackColumnsin classGuiTable
-
handleUnmentionedColumns
protected void handleUnmentionedColumns(HiddenColumnModel columnModel, Set<TableColumn> unmentionedColumns, Collection<String> initialHiddenColumns)Description copied from class:GuiTableHandle any columns that have not been visited by the current column ordering. When this method is invoked all layout hints including atFront() and atBack() have been evaluated. The default implementation simply places them at the end of the current order.- Overrides:
handleUnmentionedColumnsin classGuiTable- Parameters:
columnModel- The modelunmentionedColumns- The columns that have not yet been inserted into the orderinitialHiddenColumns- The columns which were explicitly hidden
-
addTarget
Description copied from interface:LinkSourceAdd the specified target to this Source's list of links.- Specified by:
addTargetin interfaceLinkSource- Parameters:
target- The target to add.
-
removeTarget
Description copied from interface:LinkSourceRemove the specified Target from this source's notification list.- Specified by:
removeTargetin interfaceLinkSource- Parameters:
target- The target to remove.
-
getTargets
- Specified by:
getTargetsin interfaceLinkSource- Returns:
- A collection of all the targets this source affects.
-
getSourceLinkColumns
- Specified by:
getSourceLinkColumnsin interfaceLinkSource- Returns:
- A set of all the columns for which this source is linked.
-
makeLink
public void makeLink(LinkSource from, String sourceColumn, String targetColumn, Condition condition)Description copied from interface:LinkTargetCreate a link from sourceColumn on aLinkSourceto the targetColumn of thisLinkTargetusing the specifiedConditionas a filter condition- Specified by:
makeLinkin interfaceLinkTarget- Parameters:
from- The source of the filter link.sourceColumn- The source column of the filter linktargetColumn- The column to compare to the sourceColumncondition- The condition to apply to the matching
-
removeLink
public void removeLink(LinkSource from, String srcColumn, String targetColumn, Condition condition)Description copied from interface:LinkTargetRemove a link between the specified columns and condition between this target and it's source. Note that for a link to be removed all of the specified parameters must match what was added viaLinkTarget.makeLink(LinkSource, String, String, Condition).- Specified by:
removeLinkin interfaceLinkTarget- Parameters:
from- The source to remove a link tosrcColumn- The column link being removedtargetColumn- The column being linked tocondition- The condition of the filter
-
removeAllLinks
Description copied from interface:LinkTargetRemove all column filter links between this object and the specified source.- Specified by:
removeAllLinksin interfaceLinkTarget- Parameters:
from- The source of the links to remove.
-
update
Description copied from interface:LinkTargetNotify this LinkTarget of an event from a source.- Specified by:
updatein interfaceLinkTarget- Parameters:
event- A LinkEvent containing the details of the event.
-
getLinks
- Specified by:
getLinksin interfaceLinkTarget- Returns:
- A collection of all links attached to this target.
-
getLinks
- Specified by:
getLinksin interfaceLinkTarget- Parameters:
source- The source to check links from.- Returns:
- A collection of all links between the specified source and this target.
-
getClearFiltersBeforeUpdate
public boolean getClearFiltersBeforeUpdate()Description copied from interface:LinkTargetIndicates if a Link Target will clear its filters before an update.- Specified by:
getClearFiltersBeforeUpdatein interfaceLinkTarget- Returns:
- true if it will clear, false otherwise
-
setClearFiltersBeforeUpdate
public void setClearFiltersBeforeUpdate(boolean shouldClear)Description copied from interface:LinkTargetSets if a Link Target should clear its filters before an update.- Specified by:
setClearFiltersBeforeUpdatein interfaceLinkTarget- Parameters:
shouldClear- true to clear, false otherwise
-
removeAllLinks
public void removeAllLinks()Description copied from interface:LinkableRemove all target links from this source.- Specified by:
removeAllLinksin interfaceLinkable
-
isLinked
public boolean isLinked() -
readyForLinks
public boolean readyForLinks()- Specified by:
readyForLinksin interfaceLinkable- Returns:
- If this linkable can accept links.
-
getLinkableColumns
- Specified by:
getLinkableColumnsin interfaceLinkable- Returns:
- A list of columns available to be linked to.
-
getAllowedConditions
- Specified by:
getAllowedConditionsin interfaceLinkable- Returns:
-
getId
-
getFriendlyName
- Specified by:
getFriendlyNamein interfaceLinkable- Returns:
- A user friendly name for UI presentation.
-
getComponent
Description copied from interface:LinkableGet's the UI component for this Linkable. If this Linkable is not a UI component, implementations may return null.- Specified by:
getComponentin interfaceLinkable- Returns:
- The component of this Linkable or null if there was none
-