

Classes | |
| class | AlarmHeaderMouseAdapter |
| class | AlarmTableFilter |
| class | AlarmTableMouseAdapter |
Public Member Functions | |
| AlarmTable (AlarmTableModel model, CernSysPanel panel) | |
| Component | prepareRenderer (TableCellRenderer renderer, int rowIndex, int vColIndex) |
| void | actionPerformed (ActionEvent e) |
| void | saveAlarm (Alarm alarm) |
| void | close () |
| void | showColumns (AlarmTableColumn[] cols) |
| void | addRemoveColumn (AlarmTableColumn col, boolean add) |
| boolean | search (String string, boolean next) |
| void | changeSelection (int rowIndex, int columnIndex, boolean toggle, boolean extend) |
| void | filter (String filterString, boolean not) |
Static Public Attributes | |
| static final JLabel | reductionRenderer |
| static final JLabel | hasReducedNodesRenderer |
Private Member Functions | |
| void | initialize () |
| void | buildPopupMenu () |
| void | colorizeCell (Component c, AlarmTableEntry alarm) |
| void | showReductionChain (AlarmTableEntry alarm) |
| String | getSelectedAlarmId () |
Private Attributes | |
| final AlarmTableModel | model |
| final CernSysPanel | panel |
| TableRowSorter< AlarmTableModel > | sorter |
| DefaultListSelectionModel | selectionModel |
| TableColumn[] | columns |
| AlarmTableMouseAdapter | mouseAdapter = new AlarmTableMouseAdapter() |
| final AlarmTableFilter | filter = new AlarmTableFilter() |
| ClipboardHelper | clipboard = new ClipboardHelper() |
| JPopupMenu | popupM = new JPopupMenu("Alarm") |
| JMenuItem | ackMI = new JMenuItem("Acknowledge") |
| JMenuItem | saveMI = new JMenuItem("Save...") |
| JMenuItem | clipMI = new JMenuItem("To clipboard") |
| JMenuItem | showReducedMI = new JMenuItem("Show reduction chain") |
| JLabel | emptyLbl = new JLabel() |
| ReducedChainDlg | reducedDlg = null |
| final SearchEngine | searchEngine |
| String | selectedAlarmId = null |
The table of alarms
| alma::acsplugins::alarmsystem::gui::table::AlarmTable::AlarmTable | ( | AlarmTableModel | model, | |
| CernSysPanel | panel | |||
| ) | [inline] |
Constructor
| model | The model for this table | |
| panel | The panel showing this table |
References initialize(), and searchEngine.
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::actionPerformed | ( | ActionEvent | e | ) | [inline] |
References ackMI, alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::acknowledge(), clipboard, clipMI, model, mouseAdapter, saveAlarm(), saveMI, alma::acsplugins::alarmsystem::gui::table::AlarmTable::AlarmTableMouseAdapter::selectedAlarm, alma::acsplugins::alarmsystem::gui::table::ClipboardHelper::setClipboardContents(), showReducedMI, and showReductionChain().
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::addRemoveColumn | ( | AlarmTableColumn | col, | |
| boolean | add | |||
| ) | [inline] |
Add/remove one column from the table
| col | The column to add or remove | |
| add | If true add the column, otherwise remove the column |
References columns.
Referenced by alma::acsplugins::alarmsystem::gui::table::AlarmTable::AlarmHeaderMouseAdapter::actionPerformed(), and alma::acsplugins::alarmsystem::gui::reduced::ReducedChainDlg::initialize().
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::buildPopupMenu | ( | ) | [inline, private] |
Build the popup menu
References ackMI, clipMI, popupM, saveMI, and showReducedMI.
Referenced by initialize().
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::changeSelection | ( | int | rowIndex, | |
| int | columnIndex, | |||
| boolean | toggle, | |||
| boolean | extend | |||
| ) | [inline] |
Override JTable#changeSelection(int, int, boolean, boolean) to show the selected alarm in the detail panel.
References alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::getAlarmAt(), alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getAlarmId(), model, panel, selectedAlarmId, alma::acsplugins::alarmsystem::gui::CernSysPanel::showAlarmDetails(), and sorter.
Referenced by search().
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::close | ( | ) | [inline] |
Free all the resource
References alma::acsplugins::alarmsystem::gui::reduced::ReducedChainDlg::close(), and reducedDlg.
Referenced by alma::acsplugins::alarmsystem::gui::CernSysPanel::close().
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::colorizeCell | ( | Component | c, | |
| AlarmTableEntry | alarm | |||
| ) | [inline, private] |
Set the background and the foreground of the component depending on the priority and the state of the passed alarm
| c | The component to color | |
| priority | The alarm to set the color |
Referenced by prepareRenderer().
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::filter | ( | String | filterString, | |
| boolean | not | |||
| ) | [inline] |
Filter the table by the passed string
Filtering select all the rows containing the passed string in at least on one (visible) column.
| filterString | The string used to filter; if null or empty, the table is unfiltered | |
| not | If the filter must be applied to discard entries instead of to select |
References filter, alma::acsplugins::alarmsystem::gui::table::AlarmTable::AlarmTableFilter::setFilter(), and sorter.
| String alma::acsplugins::alarmsystem::gui::table::AlarmTable::getSelectedAlarmId | ( | ) | [inline, private] |
Return the id of the selected alarm; the id is null if no alarm is selected;
This method does not ensure that the alarm with the ID returned by this method is still in the table: it might have been removed when the panel discards alarms.
null if no alarm is selected References selectedAlarmId.
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::initialize | ( | ) | [inline, private] |
Init the GUI
References buildPopupMenu(), columns, model, mouseAdapter, selectionModel, and sorter.
Referenced by AlarmTable().
| Component alma::acsplugins::alarmsystem::gui::table::AlarmTable::prepareRenderer | ( | TableCellRenderer | renderer, | |
| int | rowIndex, | |||
| int | vColIndex | |||
| ) | [inline] |
References colorizeCell(), emptyLbl, alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::getAlarmId(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::getRowEntry(), alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::isParent(), alma::acsplugins::alarmsystem::gui::table::AlarmTableEntry::isReduced(), alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::isRowAlarmNew(), model, selectedAlarmId, and sorter.
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::saveAlarm | ( | Alarm | alarm | ) | [inline] |
Save the alarm in a file
| The | alarm to save in a plain text file |
Referenced by actionPerformed().
| boolean alma::acsplugins::alarmsystem::gui::table::AlarmTable::search | ( | String | string, | |
| boolean | next | |||
| ) | [inline] |
Search for a string in the table
| string | The string to search in the table | |
| next | If true search for the next entry |
true if an entry has been foundReferences changeSelection(), panel, alma::acsplugins::alarmsystem::gui::table::SearchEngine::search(), searchEngine, and alma::acsplugins::alarmsystem::gui::CernSysPanel::showMessage().
Referenced by alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::actionPerformed().
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::showColumns | ( | AlarmTableColumn[] | cols | ) | [inline] |
Set the visible columns in the table. The columns are displayed following their order in the array.
| cols | The visible columns in the table; it can't be null and at least one column must be in the array. |
References columns.
| void alma::acsplugins::alarmsystem::gui::table::AlarmTable::showReductionChain | ( | AlarmTableEntry | alarm | ) | [inline, private] |
Show the dialog with all the nodes reduced by the passed alarm
| alarm | The alarm whose children must be shown in a dialog |
References alma::acsplugins::alarmsystem::gui::table::AlarmTableModel::getCategoryClient(), model, panel, reducedDlg, and alma::acsplugins::alarmsystem::gui::reduced::ReducedChainDlg::setRootAlarm().
Referenced by actionPerformed().
JMenuItem alma::acsplugins::alarmsystem::gui::table::AlarmTable::ackMI = new JMenuItem("Acknowledge") [private] |
The menu item to acknowledge an alarm
Referenced by actionPerformed(), buildPopupMenu(), and alma::acsplugins::alarmsystem::gui::table::AlarmTable::AlarmTableMouseAdapter::showPopup().
ClipboardHelper alma::acsplugins::alarmsystem::gui::table::AlarmTable::clipboard = new ClipboardHelper() [private] |
The clipboard
Referenced by actionPerformed().
JMenuItem alma::acsplugins::alarmsystem::gui::table::AlarmTable::clipMI = new JMenuItem("To clipboard") [private] |
The menu item to svae the selected alarm into the clipboard
Referenced by actionPerformed(), and buildPopupMenu().
TableColumn [] alma::acsplugins::alarmsystem::gui::table::AlarmTable::columns [private] |
The cols of the table
Referenced by addRemoveColumn(), initialize(), and showColumns().
JLabel alma::acsplugins::alarmsystem::gui::table::AlarmTable::emptyLbl = new JLabel() [private] |
The label returned as renderer when no flag is shown in the first column of the table
Referenced by prepareRenderer().
final AlarmTableFilter alma::acsplugins::alarmsystem::gui::table::AlarmTable::filter = new AlarmTableFilter() [private] |
The filter of the table activate from the toolbar
This filter is added or removed from the tale filters depending if the user select or unselect the toolbar button
Referenced by alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::actionPerformed(), and filter().
final JLabel alma::acsplugins::alarmsystem::gui::table::AlarmTable::hasReducedNodesRenderer [static] |
new JLabel( new ImageIcon(AlarmGUIType.class.getResource(AlarmGUIType.iconFolder+"add.png")), JLabel.CENTER)
The renderer for a node that hides children because of a reduction rule is in place
The model of the table
Referenced by actionPerformed(), changeSelection(), alma::acsplugins::alarmsystem::gui::table::AlarmTable::AlarmTableFilter::include(), initialize(), prepareRenderer(), and showReductionChain().
AlarmTableMouseAdapter alma::acsplugins::alarmsystem::gui::table::AlarmTable::mouseAdapter = new AlarmTableMouseAdapter() [private] |
The alarm adapter that recives events from the mouse
Referenced by actionPerformed(), and initialize().
The panel showing this table
Referenced by changeSelection(), search(), and showReductionChain().
JPopupMenu alma::acsplugins::alarmsystem::gui::table::AlarmTable::popupM = new JPopupMenu("Alarm") [private] |
The popup menu shown when the user presses the right mouse button over a row
Referenced by buildPopupMenu(), and alma::acsplugins::alarmsystem::gui::table::AlarmTable::AlarmTableMouseAdapter::showPopup().
The dialog showing the table with the alarms involved in a reduction chain
Referenced by close(), and showReductionChain().
final JLabel alma::acsplugins::alarmsystem::gui::table::AlarmTable::reductionRenderer [static] |
new JLabel( new ImageIcon(AlarmGUIType.class.getResource(AlarmGUIType.iconFolder+"arrow_in.png")), JLabel.CENTER)
The renderer for the reduced alarm entries i.e. the entries normally hidden
JMenuItem alma::acsplugins::alarmsystem::gui::table::AlarmTable::saveMI = new JMenuItem("Save...") [private] |
The menu item to save
Referenced by actionPerformed(), and buildPopupMenu().
The engine to search alarm entries in the table
Referenced by AlarmTable(), and search().
String alma::acsplugins::alarmsystem::gui::table::AlarmTable::selectedAlarmId = null [private] |
The ID of the last selected alarm for painting in bold
Referenced by changeSelection(), getSelectedAlarmId(), and prepareRenderer().
DefaultListSelectionModel alma::acsplugins::alarmsystem::gui::table::AlarmTable::selectionModel [private] |
The table selection model
Referenced by initialize().
JMenuItem alma::acsplugins::alarmsystem::gui::table::AlarmTable::showReducedMI = new JMenuItem("Show reduction chain") [private] |
The menu to show the reduction chain of an alarm
Referenced by actionPerformed(), buildPopupMenu(), and alma::acsplugins::alarmsystem::gui::table::AlarmTable::AlarmTableMouseAdapter::showPopup().
TableRowSorter<AlarmTableModel> alma::acsplugins::alarmsystem::gui::table::AlarmTable::sorter [private] |
The sorter for sorting the rows of the table
Referenced by changeSelection(), filter(), initialize(), and prepareRenderer().
1.6.2