alma::acsplugins::alarmsystem::gui::toolbar::Toolbar Class Reference

Inheritance diagram for alma::acsplugins::alarmsystem::gui::toolbar::Toolbar:
Inheritance graph
[legend]
Collaboration diagram for alma::acsplugins::alarmsystem::gui::toolbar::Toolbar:
Collaboration graph
[legend]

List of all members.

Classes

class  ComboBoxRenderer

Public Types

enum  ComboBoxValues { NONE = ("None",AlarmGUIType.INACTIVE), PRIORITY3 = ("Priority 3",AlarmGUIType.PRIORITY_3), PRIORITY2 = ("Priority 2",AlarmGUIType.PRIORITY_2), PRIORITY1 = ("Priority 1",AlarmGUIType.PRIORITY_1) }

Public Member Functions

 Toolbar (AlarmTable table, AlarmTableModel model, AlarmSound alarmSound, boolean reduce, CernSysPanel panel)
void actionPerformed (ActionEvent e)
void updatePauseBtn (final boolean paused)
void changedUpdate (DocumentEvent e)
void insertUpdate (DocumentEvent e)
void removeUpdate (DocumentEvent e)

Private Member Functions

void initialize (boolean reduce)
void ratioSearchBtns ()

Private Attributes

final CernSysPanel alarmPanel
JComboBox autoAckLevelCB = new JComboBox(ComboBoxValues.values())
ImageIcon activeReductionIcon
ImageIcon inactiveReductionIcon
JToggleButton reductionRulesBtn
ImageIcon pausedIcon = new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"play.png"))
ImageIcon notPausedIcon = new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"pause.png"))
ImageIcon filterIcon = new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"filters.png"))
JToggleButton showBtn = new JToggleButton("Show",filterIcon, false)
JToggleButton hideBtn = new JToggleButton("Hide",filterIcon, false)
JButton pauseBtn = new JButton("Pause",notPausedIcon)
JLabel autoAckLbl = new JLabel("Auto ack: ")
JTextField searchTF = new JTextField(16)
JButton nextSearchBtn = new JButton(new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"resultset_next.png")))
JButton prevSearchBtn = new JButton(new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"resultset_previous.png")))
final AlarmTable table
final AlarmTableModel model
final SoundWidget soundComponent

Detailed Description

The toolbar for the alarm panel

Author:
acaproni

Member Enumeration Documentation

The values shown in the ComboBox. It contains the labels to use as renderer for each cell. One label is for the normal situation and the second one is used when the cell has focus (inverted colors)

Author:
acaproni
Enumerator:
NONE 
PRIORITY3 
PRIORITY2 
PRIORITY1 

Constructor & Destructor Documentation

alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::Toolbar ( AlarmTable  table,
AlarmTableModel  model,
AlarmSound  alarmSound,
boolean  reduce,
CernSysPanel  panel 
) [inline]

Constructor

Parameters:
table The table of alarms
model The table model
alarmSound The object playing audibles
reduce true if the reduction rules are applied at startup
panel The panel showing the toolbar

References alarmPanel, initialize(), and soundComponent.


Member Function Documentation

void alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::actionPerformed ( ActionEvent  e  )  [inline]
void alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::changedUpdate ( DocumentEvent  e  )  [inline]

The document listener for the text in the search TF

See also:
DocumentListener

References ratioSearchBtns().

void alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::initialize ( boolean  reduce  )  [inline, private]

Initialize the toolbar

Parameters:
<code>true</code> if the reduction rules are applied at startup

References activeReductionIcon, autoAckLbl, autoAckLevelCB, hideBtn, inactiveReductionIcon, nextSearchBtn, pauseBtn, prevSearchBtn, ratioSearchBtns(), reductionRulesBtn, searchTF, showBtn, and soundComponent.

Referenced by Toolbar().

void alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::insertUpdate ( DocumentEvent  e  )  [inline]

The document listener for the text in the search TF

See also:
DocumentListener

References ratioSearchBtns().

void alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::ratioSearchBtns (  )  [inline, private]

Enable/disable the buttons for searching depending on the content of the text field.

This is the logic:

  • if the TF is empty the buttons are all disabled
  • if the TF contains test, the buttons are all enabled
  • if the user filters then the TF is disabled (this is done while catching the filterBtn event)

References hideBtn, nextSearchBtn, prevSearchBtn, searchTF, and showBtn.

Referenced by changedUpdate(), initialize(), insertUpdate(), and removeUpdate().

void alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::removeUpdate ( DocumentEvent  e  )  [inline]

The document listener for the text in the search TF

See also:
DocumentListener

References ratioSearchBtns().

void alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::updatePauseBtn ( final boolean  paused  )  [inline]

Update the state of the pause button depending on the state paused/unpaused of the application

This method is not called directly by actionPerformed when the button is pressed. It is executed when the application is started/paused.

Parameters:
paused true if the application is paused

References notPausedIcon, pauseBtn, and pausedIcon.

Referenced by alma::acsplugins::alarmsystem::gui::CernSysPanel::pause(), and alma::acsplugins::alarmsystem::gui::CernSysPanel::resume().


Member Data Documentation

The icon shown in the button when reduction is active

Referenced by actionPerformed(), and initialize().

The panel showing the toolbar

Referenced by actionPerformed(), and Toolbar().

JLabel alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::autoAckLbl = new JLabel("Auto ack: ") [private]

The label box for auto-acknowledgement of alarms

Referenced by initialize().

JComboBox alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::autoAckLevelCB = new JComboBox(ComboBoxValues.values()) [private]

The combo box for auto-acknowledgment of alarms

Referenced by actionPerformed(), and initialize().

ImageIcon alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::filterIcon = new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"filters.png")) [private]

The icon for the filter button

JToggleButton alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::hideBtn = new JToggleButton("Hide",filterIcon, false) [private]

The button to hide the alarms matching the content of the searchTF text field

Referenced by actionPerformed(), initialize(), and ratioSearchBtns().

The icon shown in the button when reduction is inactive

Referenced by actionPerformed(), and initialize().

The table model

Referenced by actionPerformed().

JButton alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::nextSearchBtn = new JButton(new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"resultset_next.png"))) [private]

The button to search for the next item

Referenced by actionPerformed(), initialize(), and ratioSearchBtns().

ImageIcon alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::notPausedIcon = new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"pause.png")) [private]

The icon shown by pauseBtn when the application is not paused

Referenced by actionPerformed(), and updatePauseBtn().

JButton alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::pauseBtn = new JButton("Pause",notPausedIcon) [private]

The button to pause/unpause the application

Referenced by actionPerformed(), initialize(), and updatePauseBtn().

ImageIcon alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::pausedIcon = new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"play.png")) [private]

The icon shown by pauseBtn when the application is paused

Referenced by updatePauseBtn().

JButton alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::prevSearchBtn = new JButton(new ImageIcon(Toolbar.class.getResource(AlarmGUIType.iconFolder+"resultset_previous.png"))) [private]

The button to search for the next item

Referenced by actionPerformed(), initialize(), and ratioSearchBtns().

The check box to activate/deactivate the reduction of alarms

Referenced by actionPerformed(), and initialize().

JTextField alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::searchTF = new JTextField(16) [private]

The text field to write the text to search for in the table

Referenced by actionPerformed(), initialize(), and ratioSearchBtns().

JToggleButton alma::acsplugins::alarmsystem::gui::toolbar::Toolbar::showBtn = new JToggleButton("Show",filterIcon, false) [private]

The button to select the alarms matching the content of the searchTF text field

Referenced by actionPerformed(), initialize(), and ratioSearchBtns().

Referenced by initialize(), and Toolbar().

The table of alarms

Referenced by actionPerformed().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2