public class TAlarmTable extends TTable implements TView
TDataBox
as the alarm data source. Once a databox
connect to the alarm table, all alarms contained in databox
will be displayed on this table automatically. In this way,
developers only need to manage alarms in databox and do not
need to pay much attention on the table.
Alarm table also provides features for you to control and customize
the table more easier, such as AlarmVisibleFilter
and so on.
TDataBox box =new TDataBox(); TAlarmTable alarmTable = new TAlarmTable(box);In most OSS applications, developers can use TAlarmTable to display and manage alarms, such as active alarm table, history alarm table etc. These tables can work with TElementTable, TNetwork, TTree and TDataBox to provide a comprehensive graphical view for end users.
javax.swing.JTable.AccessibleJTable, javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode
javax.swing.JComponent.AccessibleJComponent
CHECK_COLUMN, OID_COLUMN, tableModel, TREE_COLUMN
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
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
TAlarmTable(TDataBox box)
Create an alarm table with specified databox.
|
TAlarmTable(TDataBox box,
java.lang.String tableName)
Construct alarm table with given databox and table name.
|
TAlarmTable(TDataBox box,
TTableColumn[] columns)
Create alarm table with given databox and columns.
|
Modifier and Type | Method and Description |
---|---|
void |
addAlarmClickedActionListener(java.awt.event.ActionListener l)
Add an alarm clicked action listener on this table.
|
void |
addAlarmDoubleClickedActionListener(java.awt.event.ActionListener l)
Add an alarm double clicked action listener on this table.
|
void |
addVisibleFilter(AlarmVisibleFilter alarmFilter)
Add alarm visible filter on this table.
|
Alarm |
getAlarmByOID(java.lang.Object oid)
Get alarm object by table row OID.
|
Alarm |
getAlarmByRowData(java.util.Vector rowData)
Get alarm object by table row data.
|
Alarm |
getAlarmByRowIndex(int rowIndex)
Gets alarm by table row index.
|
java.util.List |
getAlarmClickedActionListeners()
Gets all alarm clicked action listeners.
|
java.util.List |
getAlarmDoubleClickedActionListeners()
Gets all alarm double clicked action listeners.
|
java.util.List |
getAllCheckedAlarms()
Gets all checked alarm objects.
|
java.util.List |
getAllSelectedAlarms()
Gets all selected alarm objects.
|
Alarm |
getCurrentEditingAlarm() |
java.util.List |
getCurrentPageAlarms()
Gets all alarms of the current page.
|
TDataBox |
getDataBox()
Get the connected databox for this alarm table.
|
java.util.List |
getPublishedAlarms()
Gets all published alarms.
|
java.util.Vector |
getRowDataByAlarmID(java.lang.Object alarmID)
Get table row data via specified alarm id.
|
java.util.Collection |
getRowDatasByAlarms(java.util.Collection alarms)
Gets row data collection by alarm collection.
|
boolean |
isConverseIncreaseOrder()
Return true if row data is inserted at the head,
else row data is appended to the tail when alarm is added.
|
boolean |
isPublishable() |
void |
removeAlarmClickedActionListener(java.awt.event.ActionListener l)
Remove an alarm clicked action listener from this table.
|
void |
removeAlarmDoubleClickedActionListener(java.awt.event.ActionListener l)
Remove an alarm double clicked action listener from this table.
|
void |
removeVisibleFilter(AlarmVisibleFilter alarmFilter)
Remove alarm visible filter from this table.
|
void |
selectAlarmsByElement(Element element)
Select alarm rows by the specified element.
|
void |
setConverseIncreaseOrder(boolean converseIncreaseOrder)
Determines whether or not to insert new alarm data at the head.
|
void |
setDataBox(TDataBox box)
Sets a new data box for this table.
|
void |
setDataBox(TDataBox box,
TTableColumn[] columns)
Sets a new data box for this table.
|
void |
setEditingRow(int aRow) |
void |
updateTViewUI()
Calls this to reset this table.
|
addColumns, addRowFilter, addTableListener, cleanDirtyState, createDefaultColumnModel, createTTableModel, ensureVisible, ensureVisibleAtCurrentPage, filterBottomRows, filterTopRows, getCellEditor, getCellEditorManager, getCellRenderer, getCellRendererManager, getCheckColumn, getColumnByIndex, getColumnByName, getColumnVisibleFilter, getCurrentMouseEvent, getOIDColumn, getRowDataByRowIndex, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getSortColumnList, getTableBodyPopupMenuFactory, getTableHeaderPopupMenuFactory, getTableHeadHorizontalAlignment, getTableModel, initInputHandler, isClearSelectionOnMarginClicked, isDistinctSortableHeader, isEditable, isEnableRightClickEvent, isEnableTristateSorting, isLazyPublishMode, isLocalSortable, isMultiColumnSortable, isPredefinedColumn, isSelectableOnRightClick, isShowPredefinedColumnsInPopupMenu, isShowTableHeaderIcon, isSortable, isVisible, packColumn, paint, prepareTableHeaderRenderer, removeColumn, removeColumnByName, removeRowFilter, removeTableListener, selectRowDatas, setClearSelectionOnMarginClicked, setColumnVisibleFilter, setCurrentMouseEvent, setDistinctSortableHeader, setEnableRightClickEvent, setEnableTristateSorting, setLazyPublishMode, setLocalSortable, setMultiColumnSortable, setSelectableOnRightClick, setShowPredefinedColumnsInPopupMenu, setShowTableHeaderIcon, setSortable, setTableBodyPopupMenuFactory, setTableHeaderPopupMenuFactory, setTableHeadHorizontalAlignment, sortNoneColumn, updateUI
changeSelection, editCellAt, getResizingColumn, isColumnAutoResizable, isColumnResizable, isHeadAutoResizable, isRowResizable, packAllColumns, packAllColumns, packAllRows, packColumn, packColumn, setColumnAutoResizable, setColumnResizable, setHeadAutoResizable, setRowResizable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellRect, 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, 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, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, 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, valueChanged
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, 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, update
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
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, 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, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TAlarmTable(TDataBox box)
box
- TDataBox connected databoxpublic TAlarmTable(TDataBox box, java.lang.String tableName)
box
- TDataBox the databox to be connected with this alarm table.tableName
- String the table name defined in TWaver.xml filepublic TAlarmTable(TDataBox box, TTableColumn[] columns)
box
- TDataBox the databox to be connectedcolumns
- TTableColumn[] table columns the alarm
table should usepublic void setEditingRow(int aRow)
setEditingRow
in class javax.swing.JTable
public Alarm getCurrentEditingAlarm()
public boolean isPublishable()
isPublishable
in class TTable
public void setDataBox(TDataBox box)
setDataBox
in interface TView
box
- TDataBox the databox of this viewTView.getDataBox()
public void setDataBox(TDataBox box, TTableColumn[] columns)
box
- the new data box for this table.columns
- the columns for this table.public TDataBox getDataBox()
getDataBox
in interface TView
setDataBox(twaver.TDataBox)
public void addVisibleFilter(AlarmVisibleFilter alarmFilter)
AlarmVisibleFilter
for more information.alarmFilter
- AlarmVisibleFilter the alarm visible
filter to be addedremoveVisibleFilter(twaver.AlarmVisibleFilter)
public void removeVisibleFilter(AlarmVisibleFilter alarmFilter)
AlarmVisibleFilter
for more information.alarmFilter
- AlarmVisibleFilter the alarm visible
filter to be removedaddVisibleFilter(twaver.AlarmVisibleFilter)
public java.util.List getAlarmDoubleClickedActionListeners()
public java.util.List getAlarmClickedActionListeners()
public void addAlarmDoubleClickedActionListener(java.awt.event.ActionListener l)
l
- ActionListener the action listener to be added.removeAlarmDoubleClickedActionListener(java.awt.event.ActionListener)
,
addAlarmClickedActionListener(java.awt.event.ActionListener)
public void removeAlarmDoubleClickedActionListener(java.awt.event.ActionListener l)
l
- ActionListener the action listener to be removed from this tableaddAlarmDoubleClickedActionListener(java.awt.event.ActionListener)
,
removeAlarmClickedActionListener(java.awt.event.ActionListener)
public void addAlarmClickedActionListener(java.awt.event.ActionListener l)
l
- ActionListener the action listener to be addedremoveAlarmClickedActionListener(java.awt.event.ActionListener)
,
addAlarmDoubleClickedActionListener(java.awt.event.ActionListener)
public void removeAlarmClickedActionListener(java.awt.event.ActionListener l)
l
- ActionListener the action listener to be removedaddAlarmClickedActionListener(java.awt.event.ActionListener)
,
removeAlarmDoubleClickedActionListener(java.awt.event.ActionListener)
public boolean isConverseIncreaseOrder()
setConverseIncreaseOrder(boolean)
public void setConverseIncreaseOrder(boolean converseIncreaseOrder)
converseIncreaseOrder
- boolean true if
row data is inserted at the head, else row data
is appended to the tail when alarm is added.isConverseIncreaseOrder()
public java.util.Vector getRowDataByAlarmID(java.lang.Object alarmID)
alarmID
- Object alarm IDgetAlarmByOID(java.lang.Object)
public java.util.Collection getRowDatasByAlarms(java.util.Collection alarms)
public Alarm getAlarmByOID(java.lang.Object oid)
oid
- Object table row OIDgetRowDataByAlarmID(java.lang.Object)
public Alarm getAlarmByRowData(java.util.Vector rowData)
rowData
- Vector the table row data contains table row cell values.getAlarmByOID(java.lang.Object)
public java.util.List getAllCheckedAlarms()
public java.util.List getAllSelectedAlarms()
public java.util.List getCurrentPageAlarms()
public java.util.List getPublishedAlarms()
#addVisibleFilter(VisibleFilter)
public Alarm getAlarmByRowIndex(int rowIndex)
rowIndex
- the table row indexgetAlarmByRowData(java.util.Vector)
public void selectAlarmsByElement(Element element)
public void updateTViewUI()
updateTViewUI
in interface TView
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.