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.


Constructor Index

 o IntegerField(int)
Creates an IntegerField containing the specified number.

Method Index

 o getNumber()
Returns the number in the IntegerField, or 0 if the data in the field do not represent a valid integer.
 o isValid()
Returns true if the data in the IntegerField represent an integer, or false otherwise.
 o setNumber(int)
Sets the number displayed in the IntegerField to the specified value.

Constructors

 o IntegerField
 public IntegerField(int num)
Creates an IntegerField containing the specified number.

Methods

 o setNumber
 public void setNumber(int num)
Sets the number displayed in the IntegerField to the specified value.

 o isValid
 public boolean isValid()
Returns true if the data in the IntegerField represent an integer, or false otherwise.

Overrides:
isValid in class Component
 o 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