Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.event

Class AdjustmentEvent

java.lang.Object
|
+--java.util.EventObject
   |
   +--java.awt.AWTEvent
      |
      +--java.awt.event.AdjustmentEvent


public class AdjustmentEvent

extends AWTEvent

This class represents an event that is generated when an adjustable value is changed.

Since:Author:See Also:

Field Summary

static intADJUSTMENT_FIRST

This is the first id in the range of ids used by adjustment events.
static intADJUSTMENT_LAST

This is the last id in the range of ids used by adjustment events.
static intADJUSTMENT_VALUE_CHANGED

This is the id indicating an adjustment value changed.
static intBLOCK_DECREMENT

Adjustment type for block decrements.
static intBLOCK_INCREMENT

Adjustment type for block increments.
static intTRACK

Adjustment type for tracking adjustments.
static intUNIT_DECREMENT

Adjustment type for unit decrements.
static intUNIT_INCREMENT

Adjustment type for unit increments.

Constructor Summary

AdjustmentEvent(java.awt.Adjustable source, int id, int type, int value)

Initializes an instance of AdjustmentEvent with the specified source, id, type, and value.
AdjustmentEvent(java.awt.Adjustable source, int id, int type, int value, boolean isAdjusting)

Initializes an instance of AdjustmentEvent with the specified source, id, type, and value.

Method Summary

java.awt.AdjustablegetAdjustable()

This method returns the source of the event as an Adjustable.
intgetAdjustmentType()

Returns the type of the event, which will be one of #UNIT_INCREMENT, #UNIT_DECREMENT, #BLOCK_INCREMENT, #BLOCK_DECREMENT, or #TRACK.
intgetValue()

Returns the new value of the adjustable object.
booleangetValueIsAdjusting()

Test if this event is part of a sequence of multiple adjustements.
java.lang.StringparamString()

Returns a string that describes the event.

Field Details

ADJUSTMENT_FIRST

public static final int ADJUSTMENT_FIRST

This is the first id in the range of ids used by adjustment events.


ADJUSTMENT_LAST

public static final int ADJUSTMENT_LAST

This is the last id in the range of ids used by adjustment events.


ADJUSTMENT_VALUE_CHANGED

public static final int ADJUSTMENT_VALUE_CHANGED

This is the id indicating an adjustment value changed.


BLOCK_DECREMENT

public static final int BLOCK_DECREMENT

Adjustment type for block decrements.


BLOCK_INCREMENT

public static final int BLOCK_INCREMENT

Adjustment type for block increments.


TRACK

public static final int TRACK

Adjustment type for tracking adjustments.


UNIT_DECREMENT

public static final int UNIT_DECREMENT

Adjustment type for unit decrements.


UNIT_INCREMENT

public static final int UNIT_INCREMENT

Adjustment type for unit increments.


Constructor Details

AdjustmentEvent

public AdjustmentEvent(java.awt.Adjustable source, int id, int type, int value)

Initializes an instance of AdjustmentEvent with the specified source, id, type, and value. Note that an invalid id leads to unspecified results.

Parameters:

Throws:


AdjustmentEvent

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

Initializes an instance of AdjustmentEvent with the specified source, id, type, and value. Note that an invalid id leads to unspecified results.

Since:Parameters:

Throws:


Method Details

getAdjustable

public Adjustable getAdjustable()

This method returns the source of the event as an Adjustable.

Returns:


getAdjustmentType

public int getAdjustmentType()

Returns the type of the event, which will be one of #UNIT_INCREMENT, #UNIT_DECREMENT, #BLOCK_INCREMENT, #BLOCK_DECREMENT, or #TRACK.

Returns:


getValue

public int getValue()

Returns the new value of the adjustable object.

Returns:


getValueIsAdjusting

public boolean getValueIsAdjusting()

Test if this event is part of a sequence of multiple adjustements.

Since:Returns:


paramString

public String paramString()

Returns a string that describes the event. This is in the format "ADJUSTMENT_VALUE_CHANGED,adjType=" + <type> + ",value=" + getValue() + ",isAdjusting=" + getValueIsAdjusting(), where type is the name of the constant returned by getAdjustmentType().

Returns: