All Packages Class Hierarchy This Package Previous Next Index
Class BreezyGUI.IntegerField
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.TextComponent
|
+----java.awt.TextField
|
+----BreezyGUI.IntegerField
- public class IntegerField
- extends TextField
An IntegerField is a component that allows the editing of an integer (whole number),
and allows the user to avoid messy conversions to and from strings.
-
IntegerField(int)
- Creates an IntegerField containing the specified number.
-
getNumber()
- Returns the number in the IntegerField, or 0 if the data in the field do not
represent a valid integer.
-
isValid()
- Returns true if the data in the IntegerField represent an integer,
or false otherwise.
-
setNumber(int)
- Sets the number displayed in the IntegerField to the specified value.
IntegerField
public IntegerField(int num)
- Creates an IntegerField containing the specified number.
setNumber
public void setNumber(int num)
- Sets the number displayed in the IntegerField to the specified value.
isValid
public boolean isValid()
- Returns true if the data in the IntegerField represent an integer,
or false otherwise.
- Overrides:
- isValid in class Component
getNumber
public int getNumber()
- Returns the number in the IntegerField, or 0 if the data in the field do not
represent a valid integer.
All Packages Class Hierarchy This Package Previous Next Index