Class Hierarchy All Packages
BeanStreet TextFields are designed to make the development of client-side
validating graphical user interfaces (GUIs) with Java easier. BeanStreet TextFields is a
collection of easy-to-configure JavaBeans for validating user input against a mask, a data type,
or a value.
These JavaBean components are easy to develop and all you need is a Java development environment to be able
to set the few properties on one of these JavaBeans.
When the application or applet is run the TextField looks like a standard Java AWT TextField, however the properties
set on the JavaBean will enable the TextField to behave either as a masked and/or context sensitive TextField. These
TextFields will enable your Java applications and applets to enforce the following: simple and complex masks against
user input, numeric-only user input, a limited set of valid input characters, input restricted
to a particular primitive Java data type, and masks on international user input.
These TextFields support input from all standard devices as well as Clipboard functions.
For additional release information, technical support, or general Automated Business Computer Systems contact
information please visit Automated Business Computer Systems' Home Page
or The BeanStreet TextFields Home Page.
Overview
Part of the COM.BSMaskedTextFields package
This TextField is designed to only allow its input to be a complete date. End users who encounter this TextField will
be able to type a date in a seamless fashion. The format of the date the end user needs to enter is set with the combination
of available properties (See below).
Months and days can be entered with leading zeros, although this is not required. The TextField can automatically,
based on format, determine valid values for months and days. Years can be entered as two or four digit figure, this is
done to make end user data entry activity easier. Please notice the detailed description of the property
twoDigitCenturyCutOff for details on how two digit years works and how this feature enables dates well beyond
year 2000 (See below). The upward limit on dates for this TextField are only those imposed by
Java Date classes.
There are three methods designed for obtaining the current value the TextField is holding, which one a developer
uses is based on the individual demands of a particular applet or application. These methods are getTextAsDate(),
getTextAsSQLDate(), and getTextAsString(), they are used to return the current user input as a java.util.Date, a
java.sql.Date, and a java.lang.String, respectively. These methods enable the user input to be used in calendar functions,
database functions, or whatever else a developer needs.
Properties
These bean properties can be used to modify the date format the TextField will enforce: dateSeparator, fourDigitYear,
twoDigitCenturyCutOff, and USFormat.
dateSeparator: The character which separates the month, day, and year, in the String representation of the date.
fourDigitYear: Whether or not the year should be displayed as a four digit integer, setting this boolean property to false
will cause the year to be displayed as a two digit integer.
twoDigitCenturyCutOff: A four digit year, important when the fourDigitYear property is set to false. When a two digit
year is entered with a value less than the last two digits of this value the year will be assumed to be of the next century, if
the two digit year value is greater than the last two digits of this value the year will be assumed to be of the same century
as this value.
USFormat: A boolean value, when set to true the date format is MM-DD-Year. When set to false the date format is
DD-MM-Year.
Overview
Part of the COM.BSNumberTextFields package
A TextField which only allows its input to be the range of floating-point values acceptable for a Java primitive double.
That range is approximately - 1.7e308 to 1.7e308.
Should a value be entered into the TextField which is not in range or contains non-digit characters the TextField will
attempt to create a representation of the value which is within the range of double, if possible. This TextField
will only allow one '-' (negative sign) and one '.' (decimal point), and does not support further delimited numbers in this
release.
The properties which can be set on this TextField enable currency and other masked input functions where
all of the text entered must conform to a floating-point value (See below).
Note: The non-digit value '-' (the minus sign) is allowed. Its value is zero (0).
There are three methods which can be used to obtain the value currently in the TextField. The methods
getInputAs_double(), getInputAsDouble(), and getTextAsString(), return the current value as a
Java primitive double, a java.lang.Double, and a java.lang.String, respectively. If the prefixString or suffixString
properties are used the getTextAsString() method will return a String which includes them except in the case where
the only value in the TextField is the combination of the prefixString and/or suffixString without any additional user input.
Properties
These bean properties can be used to modify the format the TextField will enforce: prefixString and suffixString.
prefixString: The String which will always appear at the beginning of the TextField.
suffixString: The String which will always appear at the end of the TextField.
Overview
Part of the COM.BSNumberTextFields package
A TextField which only allows its input to be the range of integer values acceptable for a Java primitive long. That range
is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
Should a value be entered into the TextField which is not in range or contains non-digit characters the TextField will
attempt to create a representation of the value which is within the range of long, if possible. This TextField
will only allow one '-' (negative sign) and does not support further delimited numbers in this release.
Note: The non-digit value '-' (the minus sign) is allowed. Its value is zero (0).
The properties which can be set on this TextField enable currency and other masked input functions where
all of the text entered must conform to an integer value (See below).
There are three methods which can be used to obtain the value currently in the TextField. The methods
getInputAs_long(), getInputAsLong(), and getTextAsString(), return the current value as a
Java primitive long, a java.lang.Long, and a java.lang.String, respectively. If the prefixString or suffixString
properties are used the getTextAsString() method will return a String which includes them except in the case where
the only value in the TextField is the combination of the prefixString and/or suffixString without any additional user input.
Properties
These bean properties can be used to modify the format the TextField will enforce: prefixString and suffixString.
prefixString: The String which will always appear at the beginning of the TextField.
suffixString: The String which will always appear at the end of the TextField.
Overview
Part of the COM.BSMaskedTextFields package
A TextField which only allows its input to be that which conforms to a mask.
The properties which can be set on this TextField enable masked input functions where
all of the text entered must conform to a particular mask (See below).
There are three methods which can be used to obtain the value currently in the TextField. The methods
getTextAs_long(), getTextAsLong(), and getTextAsString(), return the current value as a
Java primitive long, a java.lang.Long, and a java.lang.String, respectively. The results of these methods are dependent upon
how the properties are set (See below).
Properties
These bean properties can be used to modify the format the TextField will enforce: canBeIncomplete,
designatedAlphaCharacter, designatedAlphaNumericCharacter, designatedAnyCharacter,
designatedAnyCharacterFromSpecialCharacters, designatedNumericCharacter, mask, specialCharacters, and
specialCharactersInReturnString.
canBeIncomplete: Whether or not this TextField should return a String value when the mask is not fully complete. If the
value is true the text value will be returned, if the value is false this TextField will return an empty String ("") whenever
asked for its text value until the mask is completely filled.
designatedAlphaCharacter: The character which designates any alpha character, according to the unicode standard, in
the mask enforced upon this TextField.
designatedAlphaNumericCharacter: The character which designates any alpha or numeric character, according to the
unicode standard, in the mask enforced upon this TextField.
designatedAnyCharacter: The character which designates any character in the mask enforced upon this TextField.
designatedAnyCharacterFromSpecialCharacters: The character which designates any character from the
specialCharacters array in the mask enforced upon this TextField.
designatedNumericCharacter: The character which designates any numeric character, according to the unicode
standard, in the mask enforced upon this TextField.
mask: A String, made up of designatedCharacters and specialCharacters. The mask String indicates how the format of
this TextField will be enforced.
specialCharacters: An array of the special characters included in the mask.
specialCharactersInReturnString: Whether or not characters in the specialCharacters array should appear in the String
representation returned from the getTextAsString() method, if the value is false the getTextAsString() method will return
the same value as getText().
Overview
Part of the COM.BSMaskedTextFields package
This TextField is designed to only allow its input to be a complete time. End users who encounter this TextField will
be able to type a time in a seamless fashion. The format of the time the end user needs to enter is set with the combination
of available properties (See below).
Hours, minutes, and seconds can be entered with leading zeros, although this is not required. The TextField can automatically,
based on format, determine valid values for the hour.
There are three methods designed for obtaining the current value the TextField is holding, which one a developer
uses is based on the individual demands of a particular applet or application. These methods are getTextAsDate(),
getTextAsSQLTime(), and getTextAsString(), they are used to return the current user input as a java.util.Date, a
java.sql.Time, and a java.lang.String, respectively. getTextAsDate() will return a Date set to January 1, 1970, with a time
that corresponds to that typed by the end user into the TextField. These methods enable the user input to be used in calendar functions,
database functions, or whatever else a developer needs.
Properties
These bean properties can be used to modify the time format the TextField will enforce: 24HourTime, displaySeconds,
and timeSeparator.
24HourTime: Whether or not the time should be displayed in a 24 hour format, if this value is set to false the time will
displayed in a 12 hour format appended with AM or PM.
displaySeconds: Whether or not the should be displayed including seconds. If this value is set to false the time will
displayed as only hours and minutes.
timeSeparator: The character which separates the hour, minutes, and if applicable the seconds, in the String representation of the time.
For additional release information, technical support, or general Automated Business Computer Systems contact
information please visit Automated Business Computer Systems' Home Page
or The BeanStreet TextFields Home Page.
(C) Copyright Automated Business Computer Systems 1997. All rights reserved.Overview
BSDateTextField Class
Icon: BSDoubleTextField Class
Icon: BSIntegerTextField Class
Icon: BSMaskedTextField Class
Icon: BSTimeTextField Class
Icon:
Class Hierarchy All Packages Top of Page