public class

AdjustmentEvent

extends AWTEvent
java.lang.Object
   ↳ java.util.EventObject
     ↳ java.awt.AWTEvent
       ↳ java.awt.event.AdjustmentEvent

Class Overview

The adjustment event emitted by Adjustable objects.

Summary

Constants
int ADJUSTMENT_FIRST Marks the first integer id for the range of adjustment event ids.
int ADJUSTMENT_LAST Marks the last integer id for the range of adjustment event ids.
int ADJUSTMENT_VALUE_CHANGED The adjustment value changed event.
int BLOCK_DECREMENT The block decrement adjustment type.
int BLOCK_INCREMENT The block increment adjustment type.
int TRACK The absolute tracking adjustment type.
int UNIT_DECREMENT The unit decrement adjustment type.
int UNIT_INCREMENT The unit increment adjustment type.
[Expand]
Inherited Constants
From class java.awt.AWTEvent
[Expand]
Inherited Fields
From class java.awt.AWTEvent
From class java.util.EventObject
Public Constructors
AdjustmentEvent(Adjustable source, int id, int type, int value)
Constructs an AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.
AdjustmentEvent(Adjustable source, int id, int type, int value, boolean isAdjusting)
Constructs an AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.
Public Methods
Adjustable getAdjustable()
Returns the Adjustable object where this event originated.
int getAdjustmentType()
Returns the type of adjustment which caused the value changed event.
int getValue()
Returns the current value in the adjustment event.
boolean getValueIsAdjusting()
Returns true if this is one of multiple adjustment events.
String paramString()
Returns a string representing the state of this Event.
[Expand]
Inherited Methods
From class java.awt.AWTEvent
From class java.util.EventObject
From class java.lang.Object

Constants

public static final int ADJUSTMENT_FIRST

Marks the first integer id for the range of adjustment event ids.

Constant Value: 601 (0x00000259)

public static final int ADJUSTMENT_LAST

Marks the last integer id for the range of adjustment event ids.

Constant Value: 601 (0x00000259)

public static final int ADJUSTMENT_VALUE_CHANGED

The adjustment value changed event.

Constant Value: 601 (0x00000259)

public static final int BLOCK_DECREMENT

The block decrement adjustment type.

Constant Value: 3 (0x00000003)

public static final int BLOCK_INCREMENT

The block increment adjustment type.

Constant Value: 4 (0x00000004)

public static final int TRACK

The absolute tracking adjustment type.

Constant Value: 5 (0x00000005)

public static final int UNIT_DECREMENT

The unit decrement adjustment type.

Constant Value: 2 (0x00000002)

public static final int UNIT_INCREMENT

The unit increment adjustment type.

Constant Value: 1 (0x00000001)

Public Constructors

public AdjustmentEvent (Adjustable source, int id, int type, int value)

Constructs an AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.

Note that passing in an invalid id results in unspecified behavior. This method throws an IllegalArgumentException if source is null.

Parameters
source the Adjustable object where the event originated
id the event type
type the adjustment type
value the current value of the adjustment
Throws
IllegalArgumentException if source is null

public AdjustmentEvent (Adjustable source, int id, int type, int value, boolean isAdjusting)

Constructs an AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.

Note that passing in an invalid id results in unspecified behavior. This method throws an IllegalArgumentException if source is null.

Parameters
source the Adjustable object where the event originated
id the event type
type the adjustment type
value the current value of the adjustment
isAdjusting true if the event is one of a series of multiple adjusting events, otherwise false
Throws
IllegalArgumentException if source is null

Public Methods

public Adjustable getAdjustable ()

Returns the Adjustable object where this event originated.

Returns
  • the Adjustable object where this event originated

public int getAdjustmentType ()

Returns the type of adjustment which caused the value changed event. It will have one of the following values:

Returns
  • one of the adjustment values listed above

public int getValue ()

Returns the current value in the adjustment event.

Returns
  • the current value in the adjustment event

public boolean getValueIsAdjusting ()

Returns true if this is one of multiple adjustment events.

Returns
  • true if this is one of multiple adjustment events, otherwise returns false

public String paramString ()

Returns a string representing the state of this Event. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Returns
  • a string representation of this event