Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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

Collaboration diagram for alma::acs::logging::preferences::ExpertPrefsDlg:

Collaboration graph
[legend]
List of all members.

Public Types

enum  NumberOption {
  Unlimited, K, K, K,
  K, K, lbl, value
}
enum  TimeOption {
  Unlimited, h, h, h,
  h, d, lbl, value
}
enum  OptionWidgets {
  logs, null, frame, null,
  NC
}

Public Member Functions

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

Package Types


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

enum alma::acs::logging::preferences::ExpertPrefsDlg::NumberOption
 

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
Enumeration values:
Unlimited 
K 
K 
K 
K 
K 
lbl  Constructor

Parameters:
lbl The label to show in the combo box
val The number of minutes
value  Return the TimeOption having the parameter as value;

Parameters:
val The value to get the TimeOption from
Returns:
the TimeOption having the parameter as value or null if there is no TimeOption having the parameter as value

enum alma::acs::logging::preferences::ExpertPrefsDlg::OptionWidgets
 

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

Author:
acaproni
Enumeration values:
logs 
null 
frame 
null 
NC 

enum alma::acs::logging::preferences::ExpertPrefsDlg::TimeOption
 

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
Enumeration values:
Unlimited 
h 
h 
h 
h 
d 
lbl  Constructor

Parameters:
lbl The label to show in the combo box
val The number of minutes
value  Return the TimeOption having the parameter as value;

Parameters:
val The value to get the TimeOption from
Returns:
the TimeOption having the parameter as value or null if there is no TimeOption having the parameter as value


Constructor & Destructor Documentation

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

Constructor

Parameters:
owner The owner of the dialog
initialNumOfLogs The initial value for the num of logs
initialTimeFrame The initial value for the time frame (minutes)


Member Function Documentation

void alma::acs::logging::preferences::ExpertPrefsDlg::actionPerformed ActionEvent  e  )  [inline]
 

See also:
java.awt.event.ActionListener

java.awt.event.ActionEvent

void alma::acs::logging::preferences::ExpertPrefsDlg::buildWidgets  )  [inline, private]
 

Build the widgets shown in the dialog

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

UserPreferences alma::acs::logging::preferences::ExpertPrefsDlg::getPreferences  )  [inline]
 

Return the user preferences defined in the dialog.

Returns:
The user preferences defined in the dialog.
See also:
preferences

void alma::acs::logging::preferences::ExpertPrefsDlg::initGUI  )  [inline, private]
 

Builds the GUI

DISABLED

boolean alma::acs::logging::preferences::ExpertPrefsDlg::okPressed  )  [inline]
 

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

void alma::acs::logging::preferences::ExpertPrefsDlg::ratioWidgets  )  [inline, private]
 

Ratio the content of the widgets getting their values from preferences.

Parameters:
numbOfLogs The number of logs
timeFrame The number of minutes of the time frame
See also:
prefrences

Override void alma::acs::logging::preferences::ExpertPrefsDlg::setVisible boolean  visible  )  [inline]
 

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


Member Data Documentation

JButton alma::acs::logging::preferences::ExpertPrefsDlg::cancelBtn [private]
 

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

The damping factor for the dynamic discarding of logs

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

The time interval for the dynamic discarding of logs

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

The threshold for the dynamic discarding of logs

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

The rate of logs from the NC

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

The max number of logs in table

JButton alma::acs::logging::preferences::ExpertPrefsDlg::okBtn [private]
 

boolean alma::acs::logging::preferences::ExpertPrefsDlg::okBtnPressed = false [private]
 

Say if the user pressed the OK or the Cancel button

UserPreferences alma::acs::logging::preferences::ExpertPrefsDlg::originalPreferences [private]
 

The preferences received in the constructor and used to reset.

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

The rate of logs into the table

Component alma::acs::logging::preferences::ExpertPrefsDlg::owner [private]
 

The component to show this dialog over

UserPreferences alma::acs::logging::preferences::ExpertPrefsDlg::preferences [private]
 

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()

JButton alma::acs::logging::preferences::ExpertPrefsDlg::restoreBtn [private]
 

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

The max time frame to keep in the table


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:57 2009 for ACS Java API by doxygen 1.3.8