TOC

Overview

Audience

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.


previous How to Use This Guide

Guide Conventions

Typographical Conventions

Conventions Description Example
Text in italics figures, reference to chapters and other sections, task name etc. Figure 1, Overview, etc.
  • Round bullets
list of points
  • DigitalSpinner Bean
  • DateSpinner Bean
  • TimeSpinner Bean
Text in Courier font

names of classes,methods, events, part of code included in the document, etc.

ActionPerformed

Images

Image Used to
previous navigate to the previous sub-heading
previous navigate to the previous main heading
toc return to the Table of Contents
note represent a Note information

Guide Organization

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


previous Copyrights And Trademarks

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.


TOC

Bean at a Glance

Bean Overview

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.  


previousCommonly used Methods, Events and Properties

Creation Methods

DigitalSpinner()

Key Properties

currentValue
minValue
maxValue
stepValue

Commonly used Methods

getCurrent()
     Gets the current value of DigitalSpinner.
setCurrent(int cur_val)
     Sets the current value of DigitalSpinner.


Key Events

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.


up

Bean Description

Functional Overview

The DigitalSpinner allows


previousDependencies

The DigitalSpinner requires the services of


previousSecurity

Only Java security restrictions apply.


previousUser Interface

The bean has a user-friendly GUI. Refer to the section User Interface in the Spinner Overall bean documentation for detailed information.


previousIntrospection

public class DigitalSpinnerBeanInfo



 

up

Summaries

Property Summary

<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


previousMethod Summary


previousEvent Summary

As Listener :


up

Reference to Properties

 


up

Reference to Methods

public void addActionListener(ActionListener l)

Adds the specified action listener to receive action events.

         Parameters:
                 l - the ActionListener to be added.
 

public DigitalSpinner()

Constructor for DigitalSpinner. Constructs a DigitalSpinner with default settings. The GUI is constructed and initialized with pre-set values.
 

public int getCurrent()

Gets the current value.

         Returns:
                 the current value.
 

public int getMax()

Gets the maximum value.

         Returns:
                 the maximum value.
 

public int getMin()

Gets the minimum value.

         Returns:
                 the minimum value.
 

public int getStep()

Gets the increment value.

         Returns:
                 the increment value.
 

public void removeActionListener(ActionListener l)

Removes the specified action listener so that it will no longer receive action events.

         Parameters:
                 l - the ActionListener to be removed.
 

public void setCurrent(int cur_val)

Sets the current value.

         Parameters:
                 cur_val - the desired current value.
 

public void setMax(int max_val)

Sets the maximum value.

         Parameters:
                 max_val - the desired maximum value.
 

public void setMin(int min_val)

Sets the minimum value.

         Parameters:
                 min_val - the desired minimum value.
 

public void setStep(int step_val)

Sets the increment value.

         Parameters:
                 step_val - the desired increment value.
 


up

Reference to Events

The DateSpinner fires the following events:

  1.  increment/decrement event to

As Listener

    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:


up

Support Classes

 
None.


up

See Also

Java Programming Language

Java Beans Specifications


This documemt is last updated in V1.0 on 04/02/1998