All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CDF.JFloatField

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.text.JTextComponent
                                   |
                                   +----com.sun.java.swing.JTextField
                                           |
                                           +----CDF.JNumberField
                                                   |
                                                   +----CDF.JFloatField

public class JFloatField
extends JNumberField
Subclass of JNumberField which ensures that only numbers are entered in the field


Constructor Index

 o JFloatField()
Constructor
 o JFloatField(int)
Constructor
 o JFloatField(String)
Constructor
 o JFloatField(String, int)
Constructor

Method Index

 o allowKey(KeyEvent)
Defines allowed keyStrokes
 o getDouble()
Return the number as an double
 o getFloat()
Return the number as a float

Constructors

 o JFloatField
 public JFloatField()
Constructor

 o JFloatField
 public JFloatField(String string)
Constructor

Parameters:
string - Initial value as string
 o JFloatField
 public JFloatField(int columns)
Constructor

Parameters:
columns - Number of characters space to allocate
 o JFloatField
 public JFloatField(String string,
                    int columns)
Constructor

Parameters:
string - Initial value as string
columns - Number of characters

Methods

 o allowKey
 public boolean allowKey(KeyEvent event)
Defines allowed keyStrokes

Parameters:
event - KeyEvent to judge
Returns:
== true -> Character is allowed
Overrides:
allowKey in class JNumberField
 o getFloat
 public float getFloat()
Return the number as a float

 o getDouble
 public double getDouble()
Return the number as an double


All Packages  Class Hierarchy  This Package  Previous  Next  Index