All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.BSMaskedTextFields.BSTimeTextField

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.TextComponent
                   |
                   +----java.awt.TextField
                           |
                           +----COM.BSMaskedTextFields.BSTimeTextField

public class BSTimeTextField
extends TextField
implements FocusListener, TextListener
A TextField which only allows its input to be a complete time.

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.


Variable Index

 o field_24HourTime
 o fieldDisplaySeconds
 o fieldTimeSeparator
 o format
 o ivjTextAsDate
 o ivjTextAsSQLTime
 o ivjTextAsString
 o javaVendor
 o propertyChange

Constructor Index

 o BSTimeTextField()
Constructor
 o BSTimeTextField(int)
BSTimeTextField constructor comment.
 o BSTimeTextField(String)
BSTimeTextField constructor comment.
 o BSTimeTextField(String, int)
BSTimeTextField constructor comment.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
The addPropertyChangeListener method was generated to support the propertyChange field.
 o conn1(TextEvent)
conn1
 o conn12(FocusEvent)
conn12
 o enforceMask(String)
This method ensures that the value entered by the user into the TextField conforms to a java time and the properties set.
 o firePropertyChange(String, Object, Object)
The firePropertyChange method was generated to support the propertyChange field.
 o focusGained(FocusEvent)
Method to handle events for the FocusListener interface.
 o focusLost(FocusEvent)
Method to handle events for the FocusListener interface.
 o get_24HourTime()
Gets the _24HourTimeproperty (boolean) value.
 o getDisplaySeconds()
Gets the displaySecondsproperty (boolean) value.
 o getFormat()
This method is used to calculate the desired time format for the TextField based on the bean properties.
 o getFormatTime()
This method is used to calculate the desired time format for the TextField based on the bean properties.
 o getNullString()
This method calculates the initial String displayed in the TextField.
 o getTextAsDate()
Return the TextAsDate property value.
 o getTextAsSQLTime()
Return the TextAsSQLTime property value.
 o getTextAsString()
Return the TextAsString property value.
 o getTimeSeparator()
Gets the timeSeparatorproperty (char) value.
 o handleException(Throwable)
Called whenever the part throws an exception.
 o initConnections()
Initializes connections
 o initialize()
Initialize the class.
 o removePropertyChangeListener(PropertyChangeListener)
The removePropertyChangeListener method was generated to support the propertyChange field.
 o set_24HourTime(boolean)
Sets the _24HourTime property (boolean) value.
 o setCaretPosition(int)
Sets the position of the text insertion caret for the TextComponent
 o setDisplaySeconds(boolean)
Sets the displaySeconds property (boolean) value.
 o setTextAsDate(Date)
Set the TextAsDate to a new value.
 o setTextAsSQLTime(Time)
Set the TextAsSQLTime to a new value.
 o setTextAsString(String)
Set the TextAsString to a new value.
 o setTimeSeparator(char)
Sets the timeSeparator property (char) value.
 o textValueChanged(TextEvent)
Method to handle events for the TextListener interface.

Variables

 o field_24HourTime
 protected boolean field_24HourTime
 o fieldDisplaySeconds
 protected boolean fieldDisplaySeconds
 o fieldTimeSeparator
 protected char fieldTimeSeparator
 o format
 protected Vector format
 o ivjTextAsDate
 protected Date ivjTextAsDate
 o ivjTextAsSQLTime
 protected Time ivjTextAsSQLTime
 o ivjTextAsString
 protected String ivjTextAsString
 o javaVendor
 protected String javaVendor
 o propertyChange
 protected transient PropertyChangeSupport propertyChange

Constructors

 o BSTimeTextField
 public BSTimeTextField()
Constructor

 o BSTimeTextField
 public BSTimeTextField(int columns)
BSTimeTextField constructor comment.

Parameters:
columns - int
 o BSTimeTextField
 public BSTimeTextField(String text)
BSTimeTextField constructor comment.

Parameters:
text - java.lang.String
 o BSTimeTextField
 public BSTimeTextField(String text,
                        int columns)
BSTimeTextField constructor comment.

Parameters:
text - java.lang.String
columns - int

Methods

 o addPropertyChangeListener
 public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
The addPropertyChangeListener method was generated to support the propertyChange field.

Parameters:
listener - java.beans.PropertyChangeListener
 o conn1
 private void conn1(TextEvent arg1)
conn1

Parameters:
arg1 - java.awt.event.TextEvent
 o conn12
 private void conn12(FocusEvent arg1)
conn12

Parameters:
arg1 - java.awt.event.FocusEvent
 o enforceMask
 protected void enforceMask(String str)
This method ensures that the value entered by the user into the TextField conforms to a java time and the properties set.

Parameters:
str - java.lang.String
 o firePropertyChange
 public void firePropertyChange(String propertyName,
                                Object oldValue,
                                Object newValue)
The firePropertyChange method was generated to support the propertyChange field.

Parameters:
propertyName - java.lang.String
oldValue - java.lang.Object
newValue - java.lang.Object
 o focusGained
 public void focusGained(FocusEvent e)
Method to handle events for the FocusListener interface.

Parameters:
e - java.awt.event.FocusEvent
 o focusLost
 public void focusLost(FocusEvent e)
Method to handle events for the FocusListener interface.

Parameters:
e - java.awt.event.FocusEvent
 o get_24HourTime
 public boolean get_24HourTime()
Gets the _24HourTimeproperty (boolean) value. This value indicates 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.

Returns:
The _24HourTime property value.
See Also:
set_24HourTime
 o getDisplaySeconds
 public boolean getDisplaySeconds()
Gets the displaySecondsproperty (boolean) value. This value indicates 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.

Returns:
The displaySeconds property value.
See Also:
setDisplaySeconds
 o getFormat
 protected Vector getFormat()
This method is used to calculate the desired time format for the TextField based on the bean properties.

Returns:
java.util.Vector
 o getFormatTime
 protected String[] getFormatTime()
This method is used to calculate the desired time format for the TextField based on the bean properties.

Returns:
java.lang.String[]
 o getNullString
 protected StringBuffer getNullString()
This method calculates the initial String displayed in the TextField.

Returns:
java.lang.StringBuffer
 o getTextAsDate
 public Date getTextAsDate()
Return the TextAsDate property value.

Returns:
java.util.Date
 o getTextAsSQLTime
 public Time getTextAsSQLTime()
Return the TextAsSQLTime property value.

Returns:
java.sql.Time
 o getTextAsString
 public String getTextAsString()
Return the TextAsString property value. Returns the same as getText().

Returns:
java.lang.String
 o getTimeSeparator
 public char getTimeSeparator()
Gets the timeSeparatorproperty (char) value. The character which separates the hour, minutes, and if applicable the seconds, in the String representation of the time.

Returns:
The timeSeparator property value.
See Also:
setTimeSeparator
 o handleException
 private void handleException(Throwable exception)
Called whenever the part throws an exception.

Parameters:
exception - java.lang.Throwable
 o initConnections
 private void initConnections()
Initializes connections

 o initialize
 private void initialize()
Initialize the class.

 o removePropertyChangeListener
 public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
The removePropertyChangeListener method was generated to support the propertyChange field.

Parameters:
listener - java.beans.PropertyChangeListener
 o set_24HourTime
 public void set_24HourTime(boolean _24HourTime)
Sets the _24HourTime property (boolean) value. This value indicates 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.

Parameters:
_24HourTime - The new value for the property.
See Also:
get_24HourTime
 o setCaretPosition
 public void setCaretPosition(int position)
Sets the position of the text insertion caret for the TextComponent

Parameters:
position - the position
Throws: IllegalArgumentException
If position is less than 0.
Overrides:
setCaretPosition in class TextComponent
 o setDisplaySeconds
 public void setDisplaySeconds(boolean displaySeconds)
Sets the displaySeconds property (boolean) value. This value indicates 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.

Parameters:
displaySeconds - The new value for the property.
See Also:
getDisplaySeconds
 o setTextAsDate
 private void setTextAsDate(Date newValue)
Set the TextAsDate to a new value.

Parameters:
newValue - java.util.Date
 o setTextAsSQLTime
 private void setTextAsSQLTime(Time newValue)
Set the TextAsSQLTime to a new value.

Parameters:
newValue - java.sql.Time
 o setTextAsString
 private void setTextAsString(String newValue)
Set the TextAsString to a new value.

Parameters:
newValue - java.lang.String
 o setTimeSeparator
 public void setTimeSeparator(char timeSeparator)
Sets the timeSeparator property (char) value. The character which separates the hour, minutes, and if applicable the seconds, in the String representation of the time.

Parameters:
timeSeparator - The new value for the property.
See Also:
getTimeSeparator
 o textValueChanged
 public void textValueChanged(TextEvent e)
Method to handle events for the TextListener interface.

Parameters:
e - java.awt.event.TextEvent

All Packages  Class Hierarchy  This Package  Previous  Next  Index