jscicalc.graph.AxisDialog.FieldFocusListener Class Reference

Focus listener for numerical text fields. More...

List of all members.

Public Member Functions

void focusGained (java.awt.event.FocusEvent focusEvent)
 The focus was gained.
void focusLost (java.awt.event.FocusEvent focusEvent)
 The focus was lost.

Package Functions

 FieldFocusListener (javax.swing.JTextField textField, boolean positive)
 the constructor needs two pieced of information.

Private Attributes

javax.swing.JTextField textField
 The text field.
boolean positive
 This value should be true if the number must be positive, false otherwise.


Detailed Description

Focus listener for numerical text fields.

Constructor & Destructor Documentation

jscicalc.graph.AxisDialog.FieldFocusListener.FieldFocusListener ( javax.swing.JTextField  textField,
boolean  positive 
) [package]

the constructor needs two pieced of information.

It needs to know the text field that that is attached to this so that it can return the focus. It also needs to know if the field can be nonpositive. Major and minor units are required to be positive.

Parameters:
textField The text field
positive Set to true to restrict values to positive integers.

References jscicalc.graph.AxisDialog.FieldFocusListener.textField.


Member Function Documentation

void jscicalc.graph.AxisDialog.FieldFocusListener.focusGained ( java.awt.event.FocusEvent  focusEvent  ) 

The focus was gained.

Do nothing. This is required by the interface.

Parameters:
focusEvent The event

void jscicalc.graph.AxisDialog.FieldFocusListener.focusLost ( java.awt.event.FocusEvent  focusEvent  ) 

The focus was lost.

Check the input and return focus if it is not valid.

Parameters:
focusEvent The event

References jscicalc.graph.AxisDialog.FieldFocusListener.positive, and jscicalc.graph.AxisDialog.FieldFocusListener.textField.


Member Data Documentation

This value should be true if the number must be positive, false otherwise.

Referenced by jscicalc.graph.AxisDialog.FieldFocusListener.focusLost().


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

Generated on Sun Jun 1 08:58:09 2008 for Java Scientific Calculator by  doxygen 1.5.5