public class CellTableView extends JTable implements MonitorView, AgentChannelsFilter
ImageView.
The implementation provided by this class is optimized for handling small tables
(typically 1-4 cells) displayed on top of graphical representation of equipment
by ImageView. If this class is ever used for large tables, it will have to
be subclassed and at least the update(...) method will have to be overridden.
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintModeJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyAUTO_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, tableHeaderlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTCATEGORYCATEGORYABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
CellTableView(int rows,
int columns,
DefaultMonitorCell... content) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
void |
configure(AgentStatusEvent event)
Called when the source agent reaches OPERATIONAL state and its all static information
(including channels dictionary) becomes available.
|
void |
connect(AgentStatusEvent event)
Called when a new agent connects to the buses.
|
void |
disconnect(AgentStatusEvent event)
Called when an agent disconnects from the buses or goes into OFFLINE state.
|
List<String> |
getDisplayChannels()
Returns a list of display paths produced by this filter.
|
List<String> |
getDisplayPaths(String originPath)
Returns a list of display channels for the specified original path.
|
List<String> |
getFields(boolean compact)
Returns a list of attributes to display for each channel.
|
AgentChannelsFilter |
getFilter()
Returns the filter associated with this view, or
null if there is none. |
Dimension |
getMaximumSize() |
Dimension |
getMinimumSize() |
String |
getName()
Returns the name of this view.
|
List<String> |
getOriginChannels()
Returns a list of original channel selectors that might be accepted by this filter.
|
String |
getOriginPath(String displayPath)
Returns the original path corresponding to the specified display channel.
|
JComponent |
getPanel()
Returns the graphical component maintained by this view.
|
Dimension |
getPreferredSize() |
boolean |
isEqualColumns() |
boolean |
isEqualRows() |
protected void |
resizeAndRepaint() |
void |
setBounds(int x,
int y,
int width,
int height) |
void |
setEqualColumns(boolean value) |
void |
setEqualRows(boolean value)
Sets
equalRows flag. |
void |
setFilter(AgentChannelsFilter filter)
Sets the channels filter to be used by this view.
|
void |
setFormat(MonitorFormat format) |
void |
setName(String name)
Sets the name of this view.
|
void |
setResizeListener(ChangeListener listener) |
void |
statusChanged(AgentStatusEvent event)
Called on data change.
|
void |
test(int rowIndex,
int columnIndex,
String text) |
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, 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, 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, rowAtPoint, 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, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, tableChanged, unconfigureEnclosingScrollPane, updateUI, valueChangedaddAncestorListener, 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, getNextFocusableComponent, getPopupLocation, 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, updateadd, add, add, add, add, addContainerListener, addImpl, 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, validateTreeaction, 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, getParent, getPeer, 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, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFormater, install, isEmpty, setFormatter, uninstallgetAgents, getDisplayPath, getDisplayPath, getDisplayPath, getDisplayPaths, getGroups, getOriginPaths, isSelector, matchTemplatepublic CellTableView(int rows,
int columns,
DefaultMonitorCell... content)
public void setResizeListener(ChangeListener listener)
public String getName()
MonitorViewgetName in interface AgentChannelsFiltergetName in interface MonitorViewgetName in class Componentpublic void setName(String name)
MonitorViewsetName in interface MonitorViewsetName in class Componentname - View name.public JComponent getPanel()
MonitorViewgetPanel in interface MonitorViewpublic AgentChannelsFilter getFilter()
MonitorViewnull if there is none.getFilter in interface MonitorViewpublic void setFilter(AgentChannelsFilter filter)
MonitorViewsetFilter in interface MonitorViewfilter - Filter to be associated with this view.public void connect(AgentStatusEvent event)
AgentStatusListener
The event passed to this method does not contain any information on channels
(corresponding methods return empty collections) or a reference to a status message.
The event can only be used to retrieve AgentInfo descriptor and a reference
to the AgentStatusAggregator instance.
connect in interface AgentStatusListenerevent - Event.public void configure(AgentStatusEvent event)
AgentStatusListener
The event passed to this method contains a list of added channels. Methods accessing lists
of changed and removed channels will return empty collections. Since the configuration event
is not necessarily triggered by a status message, getMessage() method returns null.
configure in interface AgentStatusListenerevent - Event.public void disconnect(AgentStatusEvent event)
AgentStatusListener
The event passed to this method does not have any added or modified channels, but all previously existing
channels are listed as removed. Since the disconnection event might or might not
be triggered by a status message, getMessage() method might return null.
disconnect in interface AgentStatusListenerevent - Event.public void statusChanged(AgentStatusEvent event)
AgentStatusListenerstatusChanged in interface AgentStatusListenerevent - event Event.public List<String> getOriginChannels()
AgentChannelsFilter
The list returned by this method may contain channel selectors of
several types (note that interpretation of some selectors depends on the
list returned by getAgents() method):
[agent]/[partial path][/]" format.
Templates that omit the agent name are expanded against all agents whose
names are in the getAgents() list (or all agents present on the
buses if that list is null). Templates that end with "/" match
all channels that start with "agent/partial path/".
[agent.name=value&][agent.type=value&][agent.key[=value]&…&agent.key[=value]&][key[=value]&…&key[=value]]"
format, where key and value are names and values of agent
properties or static channel attributes. If value is omitted, the
existence of the attribute is checked.
The default implementation returns null.
getOriginChannels in interface AgentChannelsFilternull if any
original path for which AgentChannelsFilter.getDisplayPaths(org.lsst.ccs.gconsole.services.aggregator.AgentChannel) returns a non-empty list is accepted.public List<String> getDisplayChannels()
AgentChannelsFilternull list, components downstream from
this filter will display this fixed set of channels, whether or not the data is actually available.
If this method returns null, all display paths produced by getDisplayPaths(AgentChannel channel)
for original channels accepted by getOriginChannels() should be displayed.
The default implementation returns null.
getDisplayChannels in interface AgentChannelsFilternull if the set of display
paths is not constrained by this filter.public String getOriginPath(String displayPath)
AgentChannelsFilternull.
The default implementation returns the display path provided as an argument.
getOriginPath in interface AgentChannelsFilterdisplayPath - Display channel path.null if the specified path does not correspond to any original channel.public List<String> getDisplayPaths(String originPath)
AgentChannelsFilterAgentChannel
instances (like the trending tool).
If the specified original channel is not accepted by this filter,
this method should return an empty list. null should never be returned.
The default implementation returns a singleton list that contains a string
returned by AgentChannelsFilter.getDisplayPath(String) method.
getDisplayPaths in interface AgentChannelsFilteroriginPath - Original path.public List<String> getFields(boolean compact)
AgentChannelsFilternull.getFields in interface AgentChannelsFiltercompact - If true, returns a list of columns in a compact view.null if this filter does not provides any hints on what attributes should be displayed.public void setFormat(MonitorFormat format)
public void setEqualRows(boolean value)
equalRows flag.
By default, rows of this table have the same height. That means every row is sized
to accommodate the highest content. If this flag is set to false,
each row will be sized individually. In either case, any extra height assigned to
this table by the layout manager will be split equally between all rows.value - Flag value.public void setEqualColumns(boolean value)
public boolean isEqualRows()
public boolean isEqualColumns()
public Dimension getPreferredSize()
getPreferredSize in class JComponentpublic Dimension getMinimumSize()
getMinimumSize in class JComponentpublic Dimension getMaximumSize()
getMaximumSize in class JComponentpublic void setBounds(int x,
int y,
int width,
int height)
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in class Containerpublic void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
addPropertyChangeListener in class Containerprotected void resizeAndRepaint()
resizeAndRepaint in class JTablepublic void test(int rowIndex,
int columnIndex,
String text)
Copyright © 2023 LSST. All rights reserved.