Back to index

wims  3.65+svn20090927
Public Member Functions | Static Public Attributes | Protected Member Functions | Package Functions | Package Attributes | Private Member Functions | Private Attributes | Static Private Attributes
SharpTools.HistoDialog Class Reference

This is used to provide options configuration for a histogram. More...

Inheritance diagram for SharpTools.HistoDialog:
Inheritance graph
[legend]
Collaboration diagram for SharpTools.HistoDialog:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void setTitleField (String s)
String getTitleField ()
 Get the Title textfield.
void setCellRange (CellRange range)
 Set the cell range.
CellRange getCellRange ()
 Get the cell range.
CellPoint getStartCell ()
void setStartCell (CellPoint addr)
CellPoint getEndCell ()
void setEndCell (CellPoint addr)
Float getStartValue ()
void setStartValue (Float f)
Float getEndValue ()
void setEndValue (Float f)
Float getBucket ()
void setBucket (Float f)
Float getXMin ()
void setXMin (Float f)
Float getXMax ()
void setXMax (Float f)
Float getXUnit ()
void setXUnit (Float f)
Float getYMin ()
void setYMin (Float f)
Float getYMax ()
void setYMax (Float f)
Float getYUnit ()
void setYUnit (Float f)
boolean getByPercentage ()
void setByPercentage (boolean set)
int getChoice ()
boolean isCancelled ()

Static Public Attributes

static final int CLOSED_OPTION = JOptionPane.CLOSED_OPTION
static final int YES_OPTION = JOptionPane.YES_OPTION
static final int NO_OPTION = JOptionPane.NO_OPTION
static final int OK_OPTION = JOptionPane.OK_OPTION
static final int CANCEL_OPTION = JOptionPane.CANCEL_OPTION

Protected Member Functions

boolean onOK ()
 This function is called when the OK button is pressed.
JRootPane createRootPane ()
 override this protected funciton to register ESCAPE with the root pane
void onOpen ()
 I provide several hooks for the sublasses to override.
boolean onClose ()
 This function is called when (1) the close button is clocked (2) Escape is pressed.
boolean onCancel ()
 This function is called when the Cancel button is pressed.
boolean onYes ()
 This function is called when the Yes button is pressed.
boolean onNo ()
 This function is called when the No button is pressed.
void setOptionPane (Object message, int messageType, int optionType, Icon icon)
 This is used by subclasses to set the JOptionPane component in the dialog.
void setOptionPane (Object message, int messageType, int optionType, Icon icon, int defaultIndex)
 This is used by subclasses to set the JOptionPane component in the dialog.

Package Functions

 HistoDialog (JFrame aFrame)
 construct a modal dialog

Package Attributes

final ImageIcon histogramIcon32 = new ImageIcon(getClass().getResource("/images/chart32.gif"))
final ImageIcon okIcon = new ImageIcon(getClass().getResource("/images/ok.gif"))
final ImageIcon cancelIcon = new ImageIcon(getClass().getResource("/images/cancel.gif"))
final ImageIcon noIcon = new ImageIcon(getClass().getResource("/images/no.gif"))

Private Member Functions

boolean validateInput ()
 Validates the input - called when the OK button is pressed.
boolean isNegative (NumberField field, String name)
 Check the NumberField can't contain a negative number.
boolean orderOK (NumberField start, NumberField end, String startname, String endname)
 Make sure first value is lower than the second's and both have valid input.
boolean addressOK (AddressField field, String name)
 Make sure AddressField valid input.
void invalidInput (String s)
 Pop up an error message.

Private Attributes

JFrame owner
JTextField title
AddressField startCell
AddressField endCell
NumberField startValue
NumberField endValue
NumberField bucket
NumberField xMin
NumberField xMax
NumberField xUnit
NumberField yMin
NumberField yMax
NumberField yUnit
JRadioButton percentageButton
JRadioButton countButton

Static Private Attributes

static final String bucketstring = SharpTools.translation.getProperty("Bucket_Size")
static final String startvaluestring = SharpTools.translation.getProperty("Start_Value")
static final String endvaluestring = SharpTools.translation.getProperty("End_Value")
static final String xunitstring = SharpTools.translation.getProperty("X_Unit")
static final String yunitstring = SharpTools.translation.getProperty("Y_Unit")
static final String xminstring = SharpTools.translation.getProperty("X_Start")
static final String xmaxstring = SharpTools.translation.getProperty("X_End")
static final String yminstring = SharpTools.translation.getProperty("Y_Start")
static final String ymaxstring = SharpTools.translation.getProperty("Y_End")

Detailed Description

This is used to provide options configuration for a histogram.

Author:
Hua Zhong
Version:
Revision:
1.6

Definition at line 20 of file HistoDialog.java.


Constructor & Destructor Documentation

SharpTools.HistoDialog.HistoDialog ( JFrame  aFrame) [inline, package]

construct a modal dialog

Parameters:
aFramethe parent frame

new GridLayout(0, 1, 5, 5));

Definition at line 45 of file HistoDialog.java.

                               {
       super(aFrame, "Histogram Options", true);

       owner = aFrame;

       // initialize all the components
       title = new JTextField(10);
       startCell = new AddressField(5);
       endCell = new AddressField(5);
       startValue = new NumberField(5);
       endValue = new NumberField(5);
       bucket = new NumberField(5, true);
       xMin = new NumberField(5);
       xMax = new NumberField(5);
       xUnit = new NumberField(5, true);
       yMin = new NumberField(5);
       yMax = new NumberField(5);
       yUnit = new NumberField(5, true);

       // set tooltip text
       startCell.setToolTipText(SharpTools.translation.getProperty("Start_cell"));
       endCell.setToolTipText(SharpTools.translation.getProperty("End_cell"));
       startValue.setToolTipText(SharpTools.translation.getProperty("Start_value"));
       endValue.setToolTipText(SharpTools.translation.getProperty("End_value"));
       xMin.setToolTipText(SharpTools.translation.getProperty("Minumum_value_on_X_axis"));
       xMax.setToolTipText(SharpTools.translation.getProperty("Maximum_value_on_X_axis"));
       xUnit.setToolTipText(SharpTools.translation.getProperty("Unit_on_X_axis"));
       yMin.setToolTipText(SharpTools.translation.getProperty("Minumum_value_on_Y_axis"));
       yMax.setToolTipText(SharpTools.translation.getProperty("Maximum_value_on_Y_axis"));
       yUnit.setToolTipText(SharpTools.translation.getProperty("Unit_on_Y_axis"));
       
       /*
        * All the following crap is laying out the component.
        * Nothing interesting.
        */
       
       JPanel east = new JPanel();
       east.setLayout(new BoxLayout(east, BoxLayout.Y_AXIS));
       east.setBorder(BorderFactory.createEmptyBorder(10,10,20,10));

       // title
       JPanel textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
       JLabel label = new JLabel(SharpTools.translation.getProperty("Chart_Title")+" : ");
       label.setLabelFor(title);
       label.setDisplayedMnemonic(KeyEvent.VK_T);
       textPanel.add(label);
       textPanel.add(title);
       
       east.add(textPanel);

       // separator
       textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
       textPanel.add(new JSeparator());
       //     textPanel.setBorder(BorderFactory.createEtchedBorder());
       east.add(textPanel);
       
       // Cell Range
       textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
       
       label = new JLabel(SharpTools.translation.getProperty("Cell_Range")+" : ");
       label.setLabelFor(startCell);
       label.setDisplayedMnemonic(KeyEvent.VK_C);

       textPanel.add(label);
       textPanel.add(startCell);

       textPanel.add(new JLabel(":"));
       textPanel.add(endCell);

       east.add(textPanel);

       // Value Range
       textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));

       label = new JLabel(SharpTools.translation.getProperty("Value_Range")+" : ");
       label.setLabelFor(startValue);
       label.setDisplayedMnemonic(KeyEvent.VK_V);

       textPanel.add(label);
       textPanel.add(startValue);

       label = new JLabel(" "+SharpTools.translation.getProperty("to")+" ");
       label.setLabelFor(endValue);
       textPanel.add(label);
       textPanel.add(endValue);

       east.add(textPanel);

       // Bucket Size
       label = new JLabel("   "+SharpTools.translation.getProperty("Bucket")+"  ");
       label.setLabelFor(bucket);
       label.setDisplayedMnemonic(KeyEvent.VK_B);
       textPanel.add(label);
       textPanel.add(bucket);
       
       east.add(textPanel);

       // separator
       textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
       textPanel.add(new JSeparator());
       //     textPanel.setBorder(BorderFactory.createEtchedBorder());
       east.add(textPanel);
       
       // X Scale
       textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
       

       label = new JLabel(SharpTools.translation.getProperty("X_Scale")+" : ");
       label.setLabelFor(xMin);
       label.setDisplayedMnemonic(KeyEvent.VK_X);

       textPanel.add(label);
       textPanel.add(xMin);

       label = new JLabel(" "+SharpTools.translation.getProperty("to")+" ");
       label.setLabelFor(xMax);
       textPanel.add(label);
       textPanel.add(xMax);

       label = new JLabel(" "+SharpTools.translation.getProperty("Unit")+" ");
       label.setLabelFor(xUnit);
       label.setDisplayedMnemonic(KeyEvent.VK_U);
       textPanel.add(label);
       textPanel.add(xUnit);

       east.add(textPanel);

       // Y Scale
       textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));

       label = new JLabel(SharpTools.translation.getProperty("Y_Scale")+" : ");
       label.setLabelFor(yMin);
       label.setDisplayedMnemonic(KeyEvent.VK_Y);

       textPanel.add(label);
       textPanel.add(yMin);

       label = new JLabel(" "+SharpTools.translation.getProperty("to")+" ");
       label.setLabelFor(yMax);
       textPanel.add(label);
       textPanel.add(yMax);

       label = new JLabel(" "+SharpTools.translation.getProperty("Unit")+" ");
       label.setLabelFor(yUnit);
       label.setDisplayedMnemonic(KeyEvent.VK_N);
       textPanel.add(label);
       textPanel.add(yUnit);
       
       east.add(textPanel);

       // separator
       textPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
       textPanel.add(new JSeparator());
       east.add(textPanel);

       // Radio buttons     
       textPanel = new JPanel();
       textPanel.setLayout(new FlowLayout(FlowLayout.LEFT));

       // add radio buttons
       ButtonGroup metric = new ButtonGroup();
       percentageButton = new JRadioButton(SharpTools.translation.getProperty("percentage"));
       percentageButton.setMnemonic(KeyEvent.VK_P);
       //     radio.setActionCommand("Count");
       metric.add(percentageButton);
       
       label = new JLabel(SharpTools.translation.getProperty("Display_Y_by")+" ");
       textPanel.add(label);
       
       textPanel.add(percentageButton);
       //     percentageButton.setSelected(true);

       countButton = new JRadioButton(SharpTools.translation.getProperty("Count"));
       countButton.setMnemonic(KeyEvent.VK_O);
       
       metric.add(countButton);
       textPanel.add(countButton);
       
       east.add(textPanel);

       
       setOptionPane(east,
                    JOptionPane.PLAIN_MESSAGE,
                    JOptionPane.OK_CANCEL_OPTION,
                    histogramIcon32);

       // this is OK; onClose() will not be called
       // but choice's default value is CLOSED_OPTION
       setDefaultCloseOperation(DISPOSE_ON_CLOSE);

       startCell.requestFocus();   
       
    }

Here is the call graph for this function:


Member Function Documentation

boolean SharpTools.HistoDialog.addressOK ( AddressField  field,
String  name 
) [inline, private]

Make sure AddressField valid input.

Parameters:
fieldthe address text field
namethe name of this field
Returns:
whether the input is a valid address

Definition at line 351 of file HistoDialog.java.

                                                               {
       // calculate
       CellPoint addr = field.getAddress();

       if (addr == null) {
           invalidInput(name);
           field.selectAll();
           field.requestFocus();
           return false;
       }
       
       return true;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

JRootPane SharpTools.SharpDialog.createRootPane ( ) [inline, protected, inherited]

override this protected funciton to register ESCAPE with the root pane

Returns:
a customized JRootPane object

Definition at line 126 of file SharpDialog.java.

                                         {
       KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
       JRootPane rootPane = new JRootPane();
       rootPane.registerKeyboardAction(
                                   new ActionListener() {
                                          public void actionPerformed
                                              (ActionEvent ev) {    
                                              if (onClose()) {
                                                 choice = CLOSED_OPTION;
                                                 setVisible(false);
                                              }
                                          }
                                       },
                                   stroke,
                                   JComponent.WHEN_IN_FOCUSED_WINDOW);
       return rootPane;
    }

Here is the call graph for this function:

Definition at line 429 of file HistoDialog.java.

{ return bucket.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 450 of file HistoDialog.java.

{ return percentageButton.isSelected(); }

Here is the caller graph for this function:

Get the cell range.

Returns:
the range that user input

Definition at line 400 of file HistoDialog.java.

                                    {
       CellPoint point1 = startCell.getAddress();
       CellPoint point2 = endCell.getAddress();
       if (point1 == null || point2 == null)
           return null;
       else {
           // correct problems like "A2:B1".  Always convert to "A1:B2"
           int minrow = Math.min(point1.getRow(), point2.getRow());
           int maxrow = Math.max(point1.getRow(), point2.getRow());
           int mincol = Math.min(point1.getCol(), point2.getCol());
           int maxcol = Math.max(point1.getCol(), point2.getCol());
           
           return new CellRange(minrow, maxrow, mincol, maxcol);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

int SharpTools.SharpDialog.getChoice ( ) [inline, inherited]
Returns:
user choice

Definition at line 344 of file SharpDialog.java.

                           {
       return choice;
    }

Here is the caller graph for this function:

Definition at line 420 of file HistoDialog.java.

{ return endCell.getAddress(); }    

Here is the call graph for this function:

Definition at line 426 of file HistoDialog.java.

{ return endValue.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 417 of file HistoDialog.java.

{ return startCell.getAddress(); }

Here is the call graph for this function:

Definition at line 423 of file HistoDialog.java.

{ return startValue.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Get the Title textfield.

Returns:
the new title

Definition at line 379 of file HistoDialog.java.

                                  {
       return title.getText();
    }

Here is the caller graph for this function:

Float SharpTools.HistoDialog.getXMax ( ) [inline]

Definition at line 435 of file HistoDialog.java.

{ return xMax.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Float SharpTools.HistoDialog.getXMin ( ) [inline]

Definition at line 432 of file HistoDialog.java.

{ return xMin.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Float SharpTools.HistoDialog.getXUnit ( ) [inline]

Definition at line 438 of file HistoDialog.java.

{ return xUnit.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Float SharpTools.HistoDialog.getYMax ( ) [inline]

Definition at line 444 of file HistoDialog.java.

{ return yMax.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Float SharpTools.HistoDialog.getYMin ( ) [inline]

Definition at line 441 of file HistoDialog.java.

{ return yMin.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Float SharpTools.HistoDialog.getYUnit ( ) [inline]

Definition at line 447 of file HistoDialog.java.

{ return yUnit.getNumber(); }

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.HistoDialog.invalidInput ( String  s) [inline, private]

Pop up an error message.

Parameters:
sthe name of the field with invalod input

Definition at line 461 of file HistoDialog.java.

                                       {
       SharpOptionPane.showMessageDialog(owner,
                                     SharpTools.translation.getProperty("Sorry"),
                                     SharpTools.translation.getProperty("Histogram"),
                                     JOptionPane.ERROR_MESSAGE, null);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns:
whether this operation was cancelled

Definition at line 351 of file SharpDialog.java.

                                 {
       return choice == CANCEL_OPTION || choice == CLOSED_OPTION;
    }

Here is the caller graph for this function:

boolean SharpTools.HistoDialog.isNegative ( NumberField  field,
String  name 
) [inline, private]

Check the NumberField can't contain a negative number.

Parameters:
fieldthe NumberField component
nameused for error reporting
Returns:
whether the input is a negative number

Definition at line 294 of file HistoDialog.java.

                                                               {
       Float f = field.getNumber();
       if (f == null || f.floatValue() <= 0) {
           invalidInput(name);
           field.selectAll();
           field.requestFocus();
           return true;
       }
       return false;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean SharpTools.SharpDialog.onCancel ( ) [inline, protected, inherited]

This function is called when the Cancel button is pressed.

Returns:
whether the dialog should be closed

Reimplemented in SharpTools.SortDialog, SharpTools.NewFileDialog, and SharpTools.PasswordDialog.

Definition at line 187 of file SharpDialog.java.

                                 {
       return true;
    }

Here is the caller graph for this function:

boolean SharpTools.SharpDialog.onClose ( ) [inline, protected, inherited]

This function is called when (1) the close button is clocked (2) Escape is pressed.

By default, we think it's the same as clicking Cancel button

Returns:
whether the dialog should be closed

Reimplemented in SharpTools.NewFileDialog.

Definition at line 167 of file SharpDialog.java.

                                {
       return onCancel();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean SharpTools.SharpDialog.onNo ( ) [inline, protected, inherited]

This function is called when the No button is pressed.

Returns:
whether the dialog should be closed

Definition at line 207 of file SharpDialog.java.

                             {
       return true;
    }

Here is the caller graph for this function:

boolean SharpTools.HistoDialog.onOK ( ) [inline, protected]

This function is called when the OK button is pressed.

Returns:
whether the dialog should be closed

Reimplemented from SharpTools.SharpDialog.

Definition at line 468 of file HistoDialog.java.

                             {
       // validate the input here
       return validateInput();
    }

Here is the call graph for this function:

void SharpTools.SharpDialog.onOpen ( ) [inline, protected, inherited]

I provide several hooks for the sublasses to override.

This function is called when the dialog window is opened.

Reimplemented in SharpTools.ConnectDialog, SharpTools.NewFileDialog, SharpTools.PasswordDialog, and SharpTools.FindDialog.

Definition at line 153 of file SharpDialog.java.

                            {
       
    }

Here is the caller graph for this function:

boolean SharpTools.SharpDialog.onYes ( ) [inline, protected, inherited]

This function is called when the Yes button is pressed.

Returns:
whether the dialog should be closed

Definition at line 197 of file SharpDialog.java.

                              {
       return true;
    }

Here is the caller graph for this function:

boolean SharpTools.HistoDialog.orderOK ( NumberField  start,
NumberField  end,
String  startname,
String  endname 
) [inline, private]

Make sure first value is lower than the second's and both have valid input.

Parameters:
startthe first number field
endthe second number field
startnamethe name of the first field
endnamethe name of the second field
Returns:
whether the order is correct

Definition at line 314 of file HistoDialog.java.

                                                           {
       // calculate
       Float f1 = start.getNumber();

       if (f1 == null) {
           invalidInput(startname);
           start.selectAll();
           start.requestFocus();
           return false;
       }
       
       Float f2 = end.getNumber();

       if (f2 == null) {
           invalidInput(endname);
           end.selectAll();
           end.requestFocus();
           return false;
       }
       
       if (f1.floatValue() > f2.floatValue()) {
           // exchange          
           start.setNumber(f2);
           end.setNumber(f1);
       }

       return true;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.HistoDialog.setBucket ( Float  f) [inline]

Definition at line 430 of file HistoDialog.java.

{ bucket.setNumber(f); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 451 of file HistoDialog.java.

                                             {
       percentageButton.setSelected(set);
       countButton.setSelected(!set);
    }

Here is the caller graph for this function:

Set the cell range.

Parameters:
rangethe new cell range

Definition at line 388 of file HistoDialog.java.

                                              {
       if (range != null) {
           startCell.setAddress(range.getminCorner());
           endCell.setAddress(range.getmaxCorner());
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 421 of file HistoDialog.java.

{ endCell.setAddress(addr); }

Here is the call graph for this function:

void SharpTools.HistoDialog.setEndValue ( Float  f) [inline]

Definition at line 427 of file HistoDialog.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.SharpDialog.setOptionPane ( Object  message,
int  messageType,
int  optionType,
Icon  icon 
) [inline, protected, inherited]

This is used by subclasses to set the JOptionPane component in the dialog.

Parameters:
messagethe message box
messageTypethe message type
optionTypethe option type
iconthe icon to display

Definition at line 220 of file SharpDialog.java.

                                        {
       
       setOptionPane(message, messageType, optionType, icon, 0);
    }

Here is the caller graph for this function:

void SharpTools.SharpDialog.setOptionPane ( Object  message,
int  messageType,
int  optionType,
Icon  icon,
int  defaultIndex 
) [inline, protected, inherited]

This is used by subclasses to set the JOptionPane component in the dialog.

Parameters:
messagethe message box
messageTypethe message type
optionTypethe option type
iconthe icon to display
defaultIndexthe default index

Definition at line 238 of file SharpDialog.java.

                                               {
       
       addWindowListener(new WindowAdapter() {

              public void windowOpened(WindowEvent we) {
                  // set the initial focus to rowField
                  onOpen();
              }
              
                public void windowClosing(WindowEvent we) {
                  if (onClose()) {
                     choice = CLOSED_OPTION;
                     setVisible(false);
                  }
              }
           });
       
       // handle this by onClose()
       setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);

       okButton.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent evt) {
                  if (onOK()) {
                     choice = OK_OPTION;
                     setVisible(false);
                  }
              }
           });

       cancelButton.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent evt) {
                  if (onCancel()) {
                     choice = CANCEL_OPTION;
                     setVisible(false);
                  }
              }
           });
       
       yesButton.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent evt) {
                  if (onYes()) {
                     choice = YES_OPTION;
                     setVisible(false);
                  }
              }
           });
       
       noButton.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent evt) {
                  if (onNo()) {
                     choice = NO_OPTION;
                     setVisible(false);
                  }
              }
           });

       // setup Mnemonic
       okButton.setMnemonic (KeyEvent.VK_O);
       cancelButton.setMnemonic (KeyEvent.VK_C);
       yesButton.setMnemonic (KeyEvent.VK_Y);
       noButton.setMnemonic (KeyEvent.VK_N);
       
       Object[] buttons = setButtons(optionType);
       JOptionPane optionPane = new JOptionPane(message, messageType,
                                           optionType, icon,
                                           buttons,
                                           buttons[defaultIndex]);
       
       setContentPane(optionPane);

       pack();
       setLocationRelativeTo(getParent());
    }

Here is the call graph for this function:

Definition at line 418 of file HistoDialog.java.

{ startCell.setAddress(addr); }

Here is the call graph for this function:

void SharpTools.HistoDialog.setStartValue ( Float  f) [inline]

Definition at line 424 of file HistoDialog.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.HistoDialog.setTitleField ( String  s) [inline]

Definition at line 369 of file HistoDialog.java.

                                        {
       title.setText(s);
       setTitle(SharpTools.translation.getProperty("Options")+"-"+s);
    }

Here is the caller graph for this function:

void SharpTools.HistoDialog.setXMax ( Float  f) [inline]

Definition at line 436 of file HistoDialog.java.

{ xMax.setNumber(f); }

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.HistoDialog.setXMin ( Float  f) [inline]

Definition at line 433 of file HistoDialog.java.

{ xMin.setNumber(f); }

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.HistoDialog.setXUnit ( Float  f) [inline]

Definition at line 439 of file HistoDialog.java.

{ xUnit.setNumber(f); }

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.HistoDialog.setYMax ( Float  f) [inline]

Definition at line 445 of file HistoDialog.java.

{ yMax.setNumber(f); }

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.HistoDialog.setYMin ( Float  f) [inline]

Definition at line 442 of file HistoDialog.java.

{ yMin.setNumber(f); }

Here is the call graph for this function:

Here is the caller graph for this function:

void SharpTools.HistoDialog.setYUnit ( Float  f) [inline]

Definition at line 448 of file HistoDialog.java.

{ yUnit.setNumber(f); }

Here is the call graph for this function:

Here is the caller graph for this function:

Validates the input - called when the OK button is pressed.

Returns:
whether the input is valid

Definition at line 255 of file HistoDialog.java.

                                    {
       /*
        * get values from text fields and check the validity,
        * give friendly error report
        */
       if (!addressOK(startCell, SharpTools.translation.getProperty("Start_Cell")))
           return false;

       if (!addressOK(endCell, SharpTools.translation.getProperty("End_Cell")))
           return false;
       
       if (!orderOK(startValue, endValue, startvaluestring, endvaluestring))
           return false;
       
       if (!orderOK(xMin, xMax, xminstring, xmaxstring))
           return false;
       
       if (!orderOK(yMin, yMax, yminstring, ymaxstring))
           return false;
       
       if (isNegative(bucket, bucketstring))
           return false;

       if (isNegative(xUnit, xunitstring))
           return false;

       if (isNegative(yUnit, yunitstring))
           return false;

       return true;
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 28 of file HistoDialog.java.

final String SharpTools.HistoDialog.bucketstring = SharpTools.translation.getProperty("Bucket_Size") [static, private]

Definition at line 240 of file HistoDialog.java.

final int SharpTools.SharpDialog.CANCEL_OPTION = JOptionPane.CANCEL_OPTION [static, inherited]

Definition at line 26 of file SharpDialog.java.

final ImageIcon SharpTools.SharpDialog.cancelIcon = new ImageIcon(getClass().getResource("/images/cancel.gif")) [package, inherited]

Definition at line 28 of file SharpDialog.java.

final int SharpTools.SharpDialog.CLOSED_OPTION = JOptionPane.CLOSED_OPTION [static, inherited]

Definition at line 22 of file SharpDialog.java.

JRadioButton SharpTools.HistoDialog.countButton [private]

Definition at line 36 of file HistoDialog.java.

Definition at line 25 of file HistoDialog.java.

Definition at line 27 of file HistoDialog.java.

final String SharpTools.HistoDialog.endvaluestring = SharpTools.translation.getProperty("End_Value") [static, private]

Definition at line 242 of file HistoDialog.java.

final ImageIcon SharpTools.HistoDialog.histogramIcon32 = new ImageIcon(getClass().getResource("/images/chart32.gif")) [package]

Definition at line 37 of file HistoDialog.java.

final int SharpTools.SharpDialog.NO_OPTION = JOptionPane.NO_OPTION [static, inherited]

Definition at line 24 of file SharpDialog.java.

final ImageIcon SharpTools.SharpDialog.noIcon = new ImageIcon(getClass().getResource("/images/no.gif")) [package, inherited]

Definition at line 29 of file SharpDialog.java.

final int SharpTools.SharpDialog.OK_OPTION = JOptionPane.OK_OPTION [static, inherited]

Definition at line 25 of file SharpDialog.java.

final ImageIcon SharpTools.SharpDialog.okIcon = new ImageIcon(getClass().getResource("/images/ok.gif")) [package, inherited]

Definition at line 27 of file SharpDialog.java.

JFrame SharpTools.HistoDialog.owner [private]

Definition at line 22 of file HistoDialog.java.

Definition at line 35 of file HistoDialog.java.

Definition at line 24 of file HistoDialog.java.

Definition at line 26 of file HistoDialog.java.

final String SharpTools.HistoDialog.startvaluestring = SharpTools.translation.getProperty("Start_Value") [static, private]

Definition at line 241 of file HistoDialog.java.

JTextField SharpTools.HistoDialog.title [private]

Definition at line 23 of file HistoDialog.java.

Definition at line 30 of file HistoDialog.java.

final String SharpTools.HistoDialog.xmaxstring = SharpTools.translation.getProperty("X_End") [static, private]

Definition at line 246 of file HistoDialog.java.

Definition at line 29 of file HistoDialog.java.

final String SharpTools.HistoDialog.xminstring = SharpTools.translation.getProperty("X_Start") [static, private]

Definition at line 245 of file HistoDialog.java.

Definition at line 31 of file HistoDialog.java.

final String SharpTools.HistoDialog.xunitstring = SharpTools.translation.getProperty("X_Unit") [static, private]

Definition at line 243 of file HistoDialog.java.

final int SharpTools.SharpDialog.YES_OPTION = JOptionPane.YES_OPTION [static, inherited]

Definition at line 23 of file SharpDialog.java.

Definition at line 33 of file HistoDialog.java.

final String SharpTools.HistoDialog.ymaxstring = SharpTools.translation.getProperty("Y_End") [static, private]

Definition at line 248 of file HistoDialog.java.

Definition at line 32 of file HistoDialog.java.

final String SharpTools.HistoDialog.yminstring = SharpTools.translation.getProperty("Y_Start") [static, private]

Definition at line 247 of file HistoDialog.java.

Definition at line 34 of file HistoDialog.java.

final String SharpTools.HistoDialog.yunitstring = SharpTools.translation.getProperty("Y_Unit") [static, private]

Definition at line 244 of file HistoDialog.java.


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