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
-
JFloatField()
- Constructor
-
JFloatField(int)
- Constructor
-
JFloatField(String)
- Constructor
-
JFloatField(String, int)
- Constructor
-
allowKey(KeyEvent)
- Defines allowed keyStrokes
-
getDouble()
- Return the number as an double
-
getFloat()
- Return the number as a float
JFloatField
public JFloatField()
- Constructor
JFloatField
public JFloatField(String string)
- Constructor
- Parameters:
- string - Initial value as string
JFloatField
public JFloatField(int columns)
- Constructor
- Parameters:
- columns - Number of characters space to allocate
JFloatField
public JFloatField(String string,
int columns)
- Constructor
- Parameters:
- string - Initial value as string
- columns - Number of characters
allowKey
public boolean allowKey(KeyEvent event)
- Defines allowed keyStrokes
- Parameters:
- event - KeyEvent to judge
- Returns:
- == true -> Character is allowed
- Overrides:
- allowKey in class JNumberField
getFloat
public float getFloat()
- Return the number as a float
getDouble
public double getDouble()
- Return the number as an double
All Packages Class Hierarchy This Package Previous Next Index