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.
-
field_24HourTime
-
-
fieldDisplaySeconds
-
-
fieldTimeSeparator
-
-
format
-
-
ivjTextAsDate
-
-
ivjTextAsSQLTime
-
-
ivjTextAsString
-
-
javaVendor
-
-
propertyChange
-
-
BSTimeTextField()
- Constructor
-
BSTimeTextField(int)
- BSTimeTextField constructor comment.
-
BSTimeTextField(String)
- BSTimeTextField constructor comment.
-
BSTimeTextField(String, int)
- BSTimeTextField constructor comment.
-
addPropertyChangeListener(PropertyChangeListener)
- The addPropertyChangeListener method was generated to support the propertyChange field.
-
conn1(TextEvent)
- conn1
-
conn12(FocusEvent)
- conn12
-
enforceMask(String)
- This method ensures that the value entered by the user into the
TextField conforms to a java time and the properties set.
-
firePropertyChange(String, Object, Object)
- The firePropertyChange method was generated to support the propertyChange field.
-
focusGained(FocusEvent)
- Method to handle events for the FocusListener interface.
-
focusLost(FocusEvent)
- Method to handle events for the FocusListener interface.
-
get_24HourTime()
- Gets the _24HourTimeproperty (boolean) value.
-
getDisplaySeconds()
- Gets the displaySecondsproperty (boolean) value.
-
getFormat()
- This method is used to calculate the desired time format for the TextField
based on the bean properties.
-
getFormatTime()
- This method is used to calculate the desired time format for the TextField
based on the bean properties.
-
getNullString()
- This method calculates the initial String displayed in the TextField.
-
getTextAsDate()
- Return the TextAsDate property value.
-
getTextAsSQLTime()
- Return the TextAsSQLTime property value.
-
getTextAsString()
- Return the TextAsString property value.
-
getTimeSeparator()
- Gets the timeSeparatorproperty (char) value.
-
handleException(Throwable)
- Called whenever the part throws an exception.
-
initConnections()
- Initializes connections
-
initialize()
- Initialize the class.
-
removePropertyChangeListener(PropertyChangeListener)
- The removePropertyChangeListener method was generated to support the propertyChange field.
-
set_24HourTime(boolean)
- Sets the _24HourTime property (boolean) value.
-
setCaretPosition(int)
- Sets the position of the text insertion caret for the TextComponent
-
setDisplaySeconds(boolean)
- Sets the displaySeconds property (boolean) value.
-
setTextAsDate(Date)
- Set the TextAsDate to a new value.
-
setTextAsSQLTime(Time)
- Set the TextAsSQLTime to a new value.
-
setTextAsString(String)
- Set the TextAsString to a new value.
-
setTimeSeparator(char)
- Sets the timeSeparator property (char) value.
-
textValueChanged(TextEvent)
- Method to handle events for the TextListener interface.
field_24HourTime
protected boolean field_24HourTime
fieldDisplaySeconds
protected boolean fieldDisplaySeconds
fieldTimeSeparator
protected char fieldTimeSeparator
format
protected Vector format
ivjTextAsDate
protected Date ivjTextAsDate
ivjTextAsSQLTime
protected Time ivjTextAsSQLTime
ivjTextAsString
protected String ivjTextAsString
javaVendor
protected String javaVendor
propertyChange
protected transient PropertyChangeSupport propertyChange
BSTimeTextField
public BSTimeTextField()
- Constructor
BSTimeTextField
public BSTimeTextField(int columns)
- BSTimeTextField constructor comment.
- Parameters:
- columns - int
BSTimeTextField
public BSTimeTextField(String text)
- BSTimeTextField constructor comment.
- Parameters:
- text - java.lang.String
BSTimeTextField
public BSTimeTextField(String text,
int columns)
- BSTimeTextField constructor comment.
- Parameters:
- text - java.lang.String
- columns - int
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- The addPropertyChangeListener method was generated to support the propertyChange field.
- Parameters:
- listener - java.beans.PropertyChangeListener
conn1
private void conn1(TextEvent arg1)
- conn1
- Parameters:
- arg1 - java.awt.event.TextEvent
conn12
private void conn12(FocusEvent arg1)
- conn12
- Parameters:
- arg1 - java.awt.event.FocusEvent
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
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
focusGained
public void focusGained(FocusEvent e)
- Method to handle events for the FocusListener interface.
- Parameters:
- e - java.awt.event.FocusEvent
focusLost
public void focusLost(FocusEvent e)
- Method to handle events for the FocusListener interface.
- Parameters:
- e - java.awt.event.FocusEvent
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
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
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
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[]
getNullString
protected StringBuffer getNullString()
- This method calculates the initial String displayed in the TextField.
- Returns:
- java.lang.StringBuffer
getTextAsDate
public Date getTextAsDate()
- Return the TextAsDate property value.
- Returns:
- java.util.Date
getTextAsSQLTime
public Time getTextAsSQLTime()
- Return the TextAsSQLTime property value.
- Returns:
- java.sql.Time
getTextAsString
public String getTextAsString()
- Return the TextAsString property value.
Returns the same as getText().
- Returns:
- java.lang.String
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
handleException
private void handleException(Throwable exception)
- Called whenever the part throws an exception.
- Parameters:
- exception - java.lang.Throwable
initConnections
private void initConnections()
- Initializes connections
initialize
private void initialize()
- Initialize the class.
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- The removePropertyChangeListener method was generated to support the propertyChange field.
- Parameters:
- listener - java.beans.PropertyChangeListener
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
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
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
setTextAsDate
private void setTextAsDate(Date newValue)
- Set the TextAsDate to a new value.
- Parameters:
- newValue - java.util.Date
setTextAsSQLTime
private void setTextAsSQLTime(Time newValue)
- Set the TextAsSQLTime to a new value.
- Parameters:
- newValue - java.sql.Time
setTextAsString
private void setTextAsString(String newValue)
- Set the TextAsString to a new value.
- Parameters:
- newValue - java.lang.String
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
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