alma::acs::logging::preferences::ExpertPrefsDlg Class Reference

Inheritance diagram for alma::acs::logging::preferences::ExpertPrefsDlg:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::preferences::ExpertPrefsDlg:
Collaboration graph
[legend]

List of all members.

Classes

class  PassVerifier

Public Types

enum  NumberOption {
  UNLIMITED = ("Unlimited",0), K100 = ("100K",100000), K200 = ("200K",200000), K300 = ("300K",300000),
  K400 = ("400K",400000), K500 = ("500K",500000)
}
enum  TimeOption {
  UNLIMITED = ("Unlimited",0), H1 = ("1h",60), H3 = ("3h",180), H5 = ("5h",300),
  H12 = ("12h",720), D1 = ("1d",1440)
}
enum  OptionWidgets {
  MAX_NUM_OF_LOGS = ("Max num. of logs:",null), TIME_FRAME = ("Time frame:",null), MAX_INPUT_RATE, MAX_OUTPUT_RATE,
  DYNAMIC_DISCARD_LEVEL
}

Public Member Functions

 ExpertPrefsDlg (Component owner, UserPreferences prefs)
void actionPerformed (ActionEvent e)
boolean okPressed ()
UserPreferences getPreferences ()
void setVisible (boolean visible)

Private Member Functions

void initGUI ()
void buildWidgets ()
void ratioWidgets ()
void enableOption (JCheckBox cB)

Private Attributes

UserPreferences preferences
UserPreferences originalPreferences
JButton okBtn
JButton cancelBtn
JButton restoreBtn
boolean okBtnPressed = false
Component owner
JComboBox maxLogsInTableCB = new JComboBox(NumberOption.values())
JComboBox timeFrameCB = new JComboBox(TimeOption.values())
JTextField inputRateTF = new JTextField("0",8)
JTextField outputRateTF = new JTextField("0",8)
JTextField dynThresholdTF = new JTextField("0",6)
JTextField dynDampingTF = new JTextField("0",6)
JTextField dynIntervalTF = new JTextField("0",6)

Detailed Description

A dialog to setup (expert) preferences.

Author:
acaproni

Member Enumeration Documentation

A class containing the options for the number of logs.

Each option is a couple <label, value> where

  • value is the value of the option
  • label is a label to show to the user for that option
Enumerator:
UNLIMITED 
K100 
K200 
K300 
K400 
K500 

OptionWidgets is essentially used to access the check boxes with a meaningful name.

Author:
acaproni
Enumerator:
MAX_NUM_OF_LOGS 
TIME_FRAME 
MAX_INPUT_RATE 
MAX_OUTPUT_RATE 
DYNAMIC_DISCARD_LEVEL 

A class containing the options for the time frame of logs

Each option is a couple <label, value> where

  • value is the value of the option
  • label is a label to show to the user for that option
Enumerator:
UNLIMITED 
H1 
H3 
H5 
H12 
D1 

Constructor & Destructor Documentation

alma::acs::logging::preferences::ExpertPrefsDlg::ExpertPrefsDlg ( Component  owner,
UserPreferences  prefs 
) [inline]

Member Function Documentation

void alma::acs::logging::preferences::ExpertPrefsDlg::actionPerformed ( ActionEvent  e  )  [inline]
void alma::acs::logging::preferences::ExpertPrefsDlg::buildWidgets (  )  [inline, private]

Build the widgets shown in the dialog

References dynDampingTF, dynIntervalTF, dynThresholdTF, inputRateTF, maxLogsInTableCB, outputRateTF, and timeFrameCB.

Referenced by ExpertPrefsDlg().

void alma::acs::logging::preferences::ExpertPrefsDlg::enableOption ( JCheckBox  cB  )  [inline, private]

Enable or disable the option of the given check box.

Parameters:
cB The chackbox the enable/disable the option

References dynDampingTF, dynIntervalTF, dynThresholdTF, inputRateTF, maxLogsInTableCB, outputRateTF, and timeFrameCB.

Referenced by actionPerformed(), and ratioWidgets().

UserPreferences alma::acs::logging::preferences::ExpertPrefsDlg::getPreferences (  )  [inline]
void alma::acs::logging::preferences::ExpertPrefsDlg::initGUI (  )  [inline, private]
boolean alma::acs::logging::preferences::ExpertPrefsDlg::okPressed (  )  [inline]

Return true if the user pressed the Ok button to approve the changes

References okBtnPressed.

Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed().

void alma::acs::logging::preferences::ExpertPrefsDlg::ratioWidgets (  )  [inline, private]
void alma::acs::logging::preferences::ExpertPrefsDlg::setVisible ( boolean  visible  )  [inline]

Override JDialog.setVisible to show this dialog over the LogsingClient component.

References owner.

Referenced by actionPerformed(), and ExpertPrefsDlg().


Member Data Documentation

Referenced by actionPerformed(), and initGUI().

JTextField alma::acs::logging::preferences::ExpertPrefsDlg::dynDampingTF = new JTextField("0",6) [private]

The damping factor for the dynamic discarding of logs

Referenced by buildWidgets(), enableOption(), getPreferences(), initGUI(), and ratioWidgets().

JTextField alma::acs::logging::preferences::ExpertPrefsDlg::dynIntervalTF = new JTextField("0",6) [private]

The time interval for the dynamic discarding of logs

Referenced by buildWidgets(), enableOption(), getPreferences(), initGUI(), and ratioWidgets().

JTextField alma::acs::logging::preferences::ExpertPrefsDlg::dynThresholdTF = new JTextField("0",6) [private]

The threshold for the dynamic discarding of logs

Referenced by buildWidgets(), enableOption(), getPreferences(), initGUI(), and ratioWidgets().

JTextField alma::acs::logging::preferences::ExpertPrefsDlg::inputRateTF = new JTextField("0",8) [private]

The rate of logs from the NC

Referenced by buildWidgets(), enableOption(), getPreferences(), initGUI(), and ratioWidgets().

JComboBox alma::acs::logging::preferences::ExpertPrefsDlg::maxLogsInTableCB = new JComboBox(NumberOption.values()) [private]

The max number of logs in table

Referenced by buildWidgets(), enableOption(), getPreferences(), initGUI(), and ratioWidgets().

Referenced by actionPerformed(), and initGUI().

Say if the user pressed the OK or the Cancel button

Referenced by actionPerformed(), and okPressed().

The preferences received in the constructor and used to reset.

Referenced by actionPerformed(), and ExpertPrefsDlg().

JTextField alma::acs::logging::preferences::ExpertPrefsDlg::outputRateTF = new JTextField("0",8) [private]

The rate of logs into the table

Referenced by buildWidgets(), enableOption(), getPreferences(), initGUI(), and ratioWidgets().

The component to show this dialog over

Referenced by setVisible().

The preferences shown and changed by this panel

This is a copy of the object received in the constructor.
In this implementation this property is filled with the values from the GUI by getPreferences()

See also:
getPreferences()

Referenced by actionPerformed(), ExpertPrefsDlg(), getPreferences(), and ratioWidgets().

Referenced by actionPerformed(), and initGUI().

JComboBox alma::acs::logging::preferences::ExpertPrefsDlg::timeFrameCB = new JComboBox(TimeOption.values()) [private]

The max time frame to keep in the table

Referenced by buildWidgets(), enableOption(), getPreferences(), initGUI(), and ratioWidgets().


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

Generated by  doxygen 1.6.2