![]() |
Overview |
This document is intended to be used by application builders who would like to build Java applications which provide time increment/decrement functionality. The application developer is expected to be familiar with the Java language and the JavaBeans architecture. The developer should be familiar with building applications by linking beans in an application builder tool. Familiarity with the functionality of TimeSpinner would be advantageous, though not mandatory. No knowledge about the implementation of TimeSpinner required in order to use these beans.
Conventions | Description | Example |
Text in italics | figures, reference to chapters and other sections, task name etc. | Figure 1, Overview, etc. |
|
list of points |
|
Text in Courier font |
names of classes,methods, events, part of code included in the document, etc. |
ActionPerformed |
Image | Used to |
![]() |
navigate to the previous sub-heading |
![]() |
navigate to the previous main heading |
![]() |
return to the Table of Contents |
![]() |
represent a Note information |
Overview - introduces the user to the TimeSpinner bean. Provides information like intended audience, guide conventions, guide organization and copyrights
Bean at a Glance - gives a brief overview of the bean. It also provides information on the commonly used methods, events and properties.
Bean Description - explains the bean in detail. It provides information on dependencies, security, customization, etc.
Summaries - summarizes the properties, methods and events of the bean.
Reference to Properties - links to the respective properties.
Reference to Methods - links to the respective methods.
Reference to Events - links to the respective events.
Support Classes - provides information on the public classes.
See Also- links to related topics
Copyright © 1998 IBM Corp.
All rights reserved.
IBM and VisualAge are trademarks of International Business Machines in the United States and/or other countries.
* Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc, in the U.S. and other countries.
![]() |
Bean at a Glance |
public class TimeSpinner extends Spinner
This bean is a component with two small direction buttons
that lets the user modify the value in an input field or possibly enter
a new legal value of time directly on the input field. By setting the value
of a specified property, the user can separately increase/decrease the
hour, minute and second values.
TimeSpinner()
TimeSpinner(int style)
getCurrent()
Gets the current value of TimeSpinner.
setCurrent(Time cur_val)
Sets the current value of TimeSpinner.
Increment - The
event is fired to all registered ActionListeners when the currrent value
of TimeSpinner increases.
Decrement - The event
is fired to all registered ActionListeners when the currrent value of TimeSpinner
decreases.
![]() |
Bean Description |
The TimeSpinner allows
The TimeSpinner requires the services of
Only Java security restrictions apply.
The bean has a user-friendly GUI. Refer to the section User Interface in the Spinner Overall bean documentation for detailed information.
public class TimeSpinnerBeanInfo
![]() |
Summaries |
<Name> | [Constrained | Bound | Indexed ] | <Datatype> | <Description> | <default value> | <access type> |
hourStepValue | Bound | int | the setp value of hour | 1 | Read / Write |
minuteStepValue | Bound | int | the setp value of minute | 1 | Read / Write |
secondStepValue | Bound | int | the setp value of second | 1 | Read / Write |
minValue | Bound | Time | minimum value of time | 0:00:00 | Read / Write |
maxValue | Bound | Time | maximum value of time | 23:59:59 | Read / Write |
currentValue | Bound | Time | current value of time | 12:00:00 | Read / Write |
elapsedMinutes | Bound | int | minutes between minimum and maximum value | 1439 | Read / Write |
isSecondDisplayEnabled | Bound | boolean | second displayed or not | true | Read / Write |
timeFormat | Bound | int | selection of 12/24 hour time formats | 0 | Read / Write |
As Listener :
![]() |
Reference to Properties |
![]() |
Reference to Methods |
Adds the specified action listener to receive action events.
Parameters:
l - the ActionListener to be added.
Gets the current time value.
Returns:
the current time value.
Gets the elapsed minutes between minimum and maximum value.
Returns:
the elapsed minutes between minimum and maximum value.
Gets current hour value.
Returns:
the current hour value.
public int getHourMin()
Gets maximum hour value.
Returns:
the hour maximum value.
Gets maximum hour value.
Returns:
the hour maximum value.
Gets the increment value of hour.
Returns:
the increment value of hour.
Gets the maximum value.
Gets the minimum value.
Gets the current minute value.
Returns:
the current minute value.
Gets the maximum minute value.
Returns:
the minute maximum value.
Gets maximum minute value.
Returns:
the minute maximum value.
Gets the increment value of minute.
Returns:
the increment valueof minute.
Gets current second value.
Returns:
the current second value.
Gets maximum second value.
Returns:
the second maximum value.
Gets minimum second value.
Returns:
the second minimum value.
Gets the increment value of second.
Returns:
the increment value of second.
Gets the time format.
Returns:
the time format.
public boolean isSecondDisplayEnabled()
Returns 'true' if the time display option is selected.
Returns:
the time display option.
Removes the specified action listener so it no longer receives action events.
Parameters:
l - the ActionListener to be removed.
Sets the current time value.
Parameters:
cur_val - the desired time value.
Sets the elapsed minutes between minimum and maximum value ( when the elapsed minutes changes, the maximum value is changed accordingly).
Parameters:
val - the desired elapsed minutes between minimum and maximum value.
Sets the current hour value.
Parameters:
cur_val - the desired hour value.
Sets the minimum hour value.
Parameters:
min_val - the desired minimum hour value.
Sets the maximum hour value.
Parameters:
max_val - the desired maximum hour value.
public void setHourStep(int step_val)
Sets the increment value of hour.
Parameters:
step_val - the desired step value of hour.
Sets the maximum value.
Parameters:
max_val - the desired maximum value.
Sets the minimum value.
Parameters:
min_val - the desired minimum value.
Sets the current minute value.
Parameters:
cur_val - the desired minute value.
Sets the maximum minute value.
Parameters:
max_val - the desired maximum minute value.
Sets the minimum minute value.
Parameters:
min_val - the desired minimum minute value.
Sets the increment value of minute.
Parameters:
step_val - the desired step value of minute.
Sets the current second value.
Parameters:
cur_val - the desired second value.
Sets the time display option.
Parameters:
disp_flag - boolean indicator of the time display status.
Sets the maximum second value.
Parameters:
max_val - the desired maximum second value.
Sets the minimum second value.
Parameters:
min_val - the desired second minimum value.
Sets the increment value of second.
Parameters:
step_val - the desired step value of second.
Sets the time format.
Parameters:
format - the desired time format.
Constructor for TimeSpinner. Constructs a TimeSpinner
with default settings. The GUI is constructed and initialized with pre-set
values.
Constructor for TimeSpinner. Constructs a TimeSpinner with specified time format.
![]() |
Reference to Events |
The TimeSpinner fires the following events:
public class java.awt.event
ActionEvent
Specifies that the TimeSpinner current value increment/decrement
public interface java.awt.event.ActionListener
Event listener interface for ActionEvent. The methods
contained in the interface are:
Indicates that the current value increment/decrement.
Parameters:
e - ActionEvent.
![]() |
Support Classes |
None.
![]() |
See Also |
This document is last updated in V1.0 on 04/02/1998