![]() |
Overview |
This document is intended to be used by application builders who would like to build Java applications which provide date 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 DigitalSpinner would be advantageous, though not mandatory. No knowledge about the implementation of DigitalSpinner is 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 DigitalSpinner 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 DigitalSpinner 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 integer directly in the input field.
currentValue
minValue
maxValue
stepValue
getCurrent()
Gets the current value of DigitalSpinner.
setCurrent(int cur_val)
Sets the current value of DigitalSpinner.
Increment - The
event is fired to all registered ActionListeners when the currrent value
increases.
Decrement - The event
is fired to all registered ActionListeners when the currrent value decreases.
![]() |
Bean Description |
The DigitalSpinner allows
The DigitalSpinner 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 DigitalSpinnerBeanInfo
![]() |
Summaries |
<Name> | [Constrained | Bound | Indexed ] | <Datatype> | <Description> | <default value> | <access type> |
stepValue | Bound | int | Increment value | 1 | Read / Write |
minValue | Bound | int | Minimum value | 1 | Read / Write |
maxValue | Bound | int | Maximum value | 10 | Read / Write |
currentValue | Bound | int | Current value | 1 | 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.
Constructor for DigitalSpinner. Constructs
a DigitalSpinner with default settings. The GUI is constructed and
initialized with pre-set values.
Gets the current value.
Returns:
the current value.
Gets the maximum value.
Returns:
the maximum value.
Gets the minimum value.
Returns:
the minimum value.
Gets the increment value.
Returns:
the increment value.
Removes the specified action listener so that it will no longer receive action events.
Parameters:
l - the ActionListener to be removed.
Sets the current value.
Parameters:
cur_val - the desired current value.
Sets the maximum value.
Parameters:
max_val - the desired maximum value.
Sets the minimum value.
Parameters:
min_val - the desired minimum value.
Sets the increment value.
Parameters:
step_val - the desired increment value.
![]() |
Reference to Events |
The DateSpinner fires the following events:
public class java.awt.event
ActionEvent
Specifies the DigitalSpinner 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
increment/decrement value.
Parameters:
e - ActionEvent.
![]() |
Support Classes |
None.
![]() |
See Also |
This documemt is last updated in V1.0 on 04/02/1998