java.awt.event
Class AdjustmentEvent
java.lang.Object
|
+--java.util.EventObject
|
+--java.awt.AWTEvent
|
+--java.awt.event.AdjustmentEvent
public class
AdjustmentEventextends
AWTEvent This class represents an event that is generated when an adjustable
value is changed.
Since:Author:- Aaron M. Renn <arenn@urbanophile.com>
See Also:
ADJUSTMENT_FIRST
public static final int ADJUSTMENT_FIRSTThis is the first id in the range of ids used by adjustment events.
ADJUSTMENT_LAST
public static final int ADJUSTMENT_LASTThis is the last id in the range of ids used by adjustment events.
ADJUSTMENT_VALUE_CHANGED
public static final int ADJUSTMENT_VALUE_CHANGEDThis is the id indicating an adjustment value changed.
BLOCK_DECREMENT
public static final int BLOCK_DECREMENTAdjustment type for block decrements.
BLOCK_INCREMENT
public static final int BLOCK_INCREMENTAdjustment type for block increments.
TRACK
public static final int TRACKAdjustment type for tracking adjustments.
UNIT_DECREMENT
public static final int UNIT_DECREMENTAdjustment type for unit decrements.
UNIT_INCREMENT
public static final int UNIT_INCREMENTAdjustment type for unit increments.
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:
getAdjustable
public Adjustable getAdjustable() This method returns the source of the event as an Adjustable.
Returns:
- the
Adjustable source of the event
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:
- true if this is not the last adjustment
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:
- a string that describes the event