UpDown.setAcceleration

Overview | Methods | This Package | All Packages

UpDown.setAcceleration

Sets how quickly the value of the up-down control changes when the user clicks the up and down arrows in the control.

Syntax

public void setAcceleration( UpDownAcceleration[] value )

Parameters

value

An array of UpDownAcceleration objects. Each UpDownAcceleration object contains an amount by which to change the value of the up-down control and an amount of time that elapses before the change takes effect. The UpDownAcceleration objects in the array should be arranged in ascending order based on the value of their seconds fields. By default, an up-down control contains three UpDownAcceleration objects: for the first UpDownAcceleration object, the seconds field is set to 0 (zero), and the increment field is set to 1; for the second, the seconds field is set to 2, and the increment field is set to 5; and for the third, the seconds field is set to 5, and the increment field is set to 20. This means that when the user clicks an arrow button, the value of the up-down control changes by 1. If the user clicks an arrow button and holds the mouse button down, the value of the up-down control starts to change by increments of 5 after 2 seconds and starts to change by increments of 20 after 5 seconds.

Exceptions

WFCInvalidArgumentException thrown if the specified value is not valid.

WFCSystemException thrown if the acceleration information cannot be set.

See Also   getAcceleration