java.awt.event
Class AdjustmentEvent

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject 
      extended by java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent 
          extended by java.awt.event.AdjustmentEvent
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class AdjustmentEvent
extends AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent

The adjustment event emitted by Adjustable objects.

Since:
1.1
See Also:
Adjustable sample code for java.awt.Adjustable definition code for java.awt.Adjustable , AdjustmentListener sample code for java.awt.event.AdjustmentListener definition code for java.awt.event.AdjustmentListener , Serialized Form

Field Summary
static int ADJUSTMENT_FIRST sample code for java.awt.event.AdjustmentEvent.ADJUSTMENT_FIRST definition code for java.awt.event.AdjustmentEvent.ADJUSTMENT_FIRST
          Marks the first integer id for the range of adjustment event ids.
static int ADJUSTMENT_LAST sample code for java.awt.event.AdjustmentEvent.ADJUSTMENT_LAST definition code for java.awt.event.AdjustmentEvent.ADJUSTMENT_LAST
          Marks the last integer id for the range of adjustment event ids.
static int ADJUSTMENT_VALUE_CHANGED sample code for java.awt.event.AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED definition code for java.awt.event.AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED
          The adjustment value changed event.
static int BLOCK_DECREMENT sample code for java.awt.event.AdjustmentEvent.BLOCK_DECREMENT definition code for java.awt.event.AdjustmentEvent.BLOCK_DECREMENT
          The block decrement adjustment type.
static int BLOCK_INCREMENT sample code for java.awt.event.AdjustmentEvent.BLOCK_INCREMENT definition code for java.awt.event.AdjustmentEvent.BLOCK_INCREMENT
          The block increment adjustment type.
static int TRACK sample code for java.awt.event.AdjustmentEvent.TRACK definition code for java.awt.event.AdjustmentEvent.TRACK
          The absolute tracking adjustment type.
static int UNIT_DECREMENT sample code for java.awt.event.AdjustmentEvent.UNIT_DECREMENT definition code for java.awt.event.AdjustmentEvent.UNIT_DECREMENT
          The unit decrement adjustment type.
static int UNIT_INCREMENT sample code for java.awt.event.AdjustmentEvent.UNIT_INCREMENT definition code for java.awt.event.AdjustmentEvent.UNIT_INCREMENT
          The unit increment adjustment type.
 
Fields inherited from class java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
ACTION_EVENT_MASK sample code for java.awt.AWTEvent.ACTION_EVENT_MASK definition code for java.awt.AWTEvent.ACTION_EVENT_MASK , ADJUSTMENT_EVENT_MASK sample code for java.awt.AWTEvent.ADJUSTMENT_EVENT_MASK definition code for java.awt.AWTEvent.ADJUSTMENT_EVENT_MASK , COMPONENT_EVENT_MASK sample code for java.awt.AWTEvent.COMPONENT_EVENT_MASK definition code for java.awt.AWTEvent.COMPONENT_EVENT_MASK , consumed sample code for java.awt.AWTEvent.consumed definition code for java.awt.AWTEvent.consumed , CONTAINER_EVENT_MASK sample code for java.awt.AWTEvent.CONTAINER_EVENT_MASK definition code for java.awt.AWTEvent.CONTAINER_EVENT_MASK , FOCUS_EVENT_MASK sample code for java.awt.AWTEvent.FOCUS_EVENT_MASK definition code for java.awt.AWTEvent.FOCUS_EVENT_MASK , HIERARCHY_BOUNDS_EVENT_MASK sample code for java.awt.AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK definition code for java.awt.AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK , HIERARCHY_EVENT_MASK sample code for java.awt.AWTEvent.HIERARCHY_EVENT_MASK definition code for java.awt.AWTEvent.HIERARCHY_EVENT_MASK , id sample code for java.awt.AWTEvent.id definition code for java.awt.AWTEvent.id , INPUT_METHOD_EVENT_MASK sample code for java.awt.AWTEvent.INPUT_METHOD_EVENT_MASK definition code for java.awt.AWTEvent.INPUT_METHOD_EVENT_MASK , INVOCATION_EVENT_MASK sample code for java.awt.AWTEvent.INVOCATION_EVENT_MASK definition code for java.awt.AWTEvent.INVOCATION_EVENT_MASK , ITEM_EVENT_MASK sample code for java.awt.AWTEvent.ITEM_EVENT_MASK definition code for java.awt.AWTEvent.ITEM_EVENT_MASK , KEY_EVENT_MASK sample code for java.awt.AWTEvent.KEY_EVENT_MASK definition code for java.awt.AWTEvent.KEY_EVENT_MASK , MOUSE_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_EVENT_MASK , MOUSE_MOTION_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_MOTION_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_MOTION_EVENT_MASK , MOUSE_WHEEL_EVENT_MASK sample code for java.awt.AWTEvent.MOUSE_WHEEL_EVENT_MASK definition code for java.awt.AWTEvent.MOUSE_WHEEL_EVENT_MASK , PAINT_EVENT_MASK sample code for java.awt.AWTEvent.PAINT_EVENT_MASK definition code for java.awt.AWTEvent.PAINT_EVENT_MASK , RESERVED_ID_MAX sample code for java.awt.AWTEvent.RESERVED_ID_MAX definition code for java.awt.AWTEvent.RESERVED_ID_MAX , TEXT_EVENT_MASK sample code for java.awt.AWTEvent.TEXT_EVENT_MASK definition code for java.awt.AWTEvent.TEXT_EVENT_MASK , WINDOW_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_EVENT_MASK , WINDOW_FOCUS_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_FOCUS_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_FOCUS_EVENT_MASK , WINDOW_STATE_EVENT_MASK sample code for java.awt.AWTEvent.WINDOW_STATE_EVENT_MASK definition code for java.awt.AWTEvent.WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
source sample code for java.util.EventObject.source definition code for java.util.EventObject.source
 
Constructor Summary
AdjustmentEvent sample code for java.awt.event.AdjustmentEvent.AdjustmentEvent(java.awt.Adjustable, int, int, int) definition code for java.awt.event.AdjustmentEvent.AdjustmentEvent(java.awt.Adjustable, int, int, int) (Adjustable sample code for java.awt.Adjustable definition code for java.awt.Adjustable  source, int id, int type, int value)
          Constructs an AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.
AdjustmentEvent sample code for java.awt.event.AdjustmentEvent.AdjustmentEvent(java.awt.Adjustable, int, int, int, boolean) definition code for java.awt.event.AdjustmentEvent.AdjustmentEvent(java.awt.Adjustable, int, int, int, boolean) (Adjustable sample code for java.awt.Adjustable definition code for java.awt.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.
 
Method Summary
 Adjustable sample code for java.awt.Adjustable definition code for java.awt.Adjustable getAdjustable sample code for java.awt.event.AdjustmentEvent.getAdjustable() definition code for java.awt.event.AdjustmentEvent.getAdjustable() ()
          Returns the Adjustable object where this event originated.
 int getAdjustmentType sample code for java.awt.event.AdjustmentEvent.getAdjustmentType() definition code for java.awt.event.AdjustmentEvent.getAdjustmentType() ()
          Returns the type of adjustment which caused the value changed event.
 int getValue sample code for java.awt.event.AdjustmentEvent.getValue() definition code for java.awt.event.AdjustmentEvent.getValue() ()
          Returns the current value in the adjustment event.
 boolean getValueIsAdjusting sample code for java.awt.event.AdjustmentEvent.getValueIsAdjusting() definition code for java.awt.event.AdjustmentEvent.getValueIsAdjusting() ()
          Returns true if this is one of multiple adjustment events.
 String sample code for java.lang.String definition code for java.lang.String paramString sample code for java.awt.event.AdjustmentEvent.paramString() definition code for java.awt.event.AdjustmentEvent.paramString() ()
          Returns a string representing the state of this Event.
 
Methods inherited from class java.awt.AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
consume sample code for java.awt.AWTEvent.consume() definition code for java.awt.AWTEvent.consume() , getID sample code for java.awt.AWTEvent.getID() definition code for java.awt.AWTEvent.getID() , isConsumed sample code for java.awt.AWTEvent.isConsumed() definition code for java.awt.AWTEvent.isConsumed() , setSource sample code for java.awt.AWTEvent.setSource(java.lang.Object) definition code for java.awt.AWTEvent.setSource(java.lang.Object) , toString sample code for java.awt.AWTEvent.toString() definition code for java.awt.AWTEvent.toString()
 
Methods inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

ADJUSTMENT_FIRST sample code for java.awt.event.AdjustmentEvent.ADJUSTMENT_FIRST

public static final int ADJUSTMENT_FIRST
Marks the first integer id for the range of adjustment event ids.

See Also:
Constant Field Values

ADJUSTMENT_LAST sample code for java.awt.event.AdjustmentEvent.ADJUSTMENT_LAST

public static final int ADJUSTMENT_LAST
Marks the last integer id for the range of adjustment event ids.

See Also:
Constant Field Values

ADJUSTMENT_VALUE_CHANGED sample code for java.awt.event.AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED

public static final int ADJUSTMENT_VALUE_CHANGED
The adjustment value changed event.

See Also:
Constant Field Values

UNIT_INCREMENT sample code for java.awt.event.AdjustmentEvent.UNIT_INCREMENT

public static final int UNIT_INCREMENT
The unit increment adjustment type.

See Also:
Constant Field Values

UNIT_DECREMENT sample code for java.awt.event.AdjustmentEvent.UNIT_DECREMENT

public static final int UNIT_DECREMENT
The unit decrement adjustment type.

See Also:
Constant Field Values

BLOCK_DECREMENT sample code for java.awt.event.AdjustmentEvent.BLOCK_DECREMENT

public static final int BLOCK_DECREMENT
The block decrement adjustment type.

See Also:
Constant Field Values

BLOCK_INCREMENT sample code for java.awt.event.AdjustmentEvent.BLOCK_INCREMENT

public static final int BLOCK_INCREMENT
The block increment adjustment type.

See Also:
Constant Field Values

TRACK sample code for java.awt.event.AdjustmentEvent.TRACK

public static final int TRACK
The absolute tracking adjustment type.

See Also:
Constant Field Values
Constructor Detail

AdjustmentEvent sample code for java.awt.event.AdjustmentEvent(java.awt.Adjustable, int, int, int) definition code for java.awt.event.AdjustmentEvent(java.awt.Adjustable, int, int, int)

public AdjustmentEvent(Adjustable sample code for java.awt.Adjustable definition code for java.awt.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 sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if source is null

AdjustmentEvent sample code for java.awt.event.AdjustmentEvent(java.awt.Adjustable, int, int, int, boolean) definition code for java.awt.event.AdjustmentEvent(java.awt.Adjustable, int, int, int, boolean)

public AdjustmentEvent(Adjustable sample code for java.awt.Adjustable definition code for java.awt.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 sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if source is null
Method Detail

getAdjustable sample code for java.awt.event.AdjustmentEvent.getAdjustable() definition code for java.awt.event.AdjustmentEvent.getAdjustable()

public Adjustable sample code for java.awt.Adjustable definition code for java.awt.Adjustable  getAdjustable()
Returns the Adjustable object where this event originated.

Returns:
the Adjustable object where this event originated

getValue sample code for java.awt.event.AdjustmentEvent.getValue() definition code for java.awt.event.AdjustmentEvent.getValue()

public int getValue()
Returns the current value in the adjustment event.

Returns:
the current value in the adjustment event

getAdjustmentType sample code for java.awt.event.AdjustmentEvent.getAdjustmentType() definition code for java.awt.event.AdjustmentEvent.getAdjustmentType()

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

getValueIsAdjusting sample code for java.awt.event.AdjustmentEvent.getValueIsAdjusting() definition code for java.awt.event.AdjustmentEvent.getValueIsAdjusting()

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

paramString sample code for java.awt.event.AdjustmentEvent.paramString() definition code for java.awt.event.AdjustmentEvent.paramString()

public String sample code for java.lang.String definition code for java.lang.String  paramString()
Description copied from class: AWTEvent sample code for java.awt.AWTEvent.paramString() definition code for java.awt.AWTEvent.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.

Overrides:
paramString sample code for java.awt.AWTEvent.paramString() definition code for java.awt.AWTEvent.paramString() in class AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent
Returns:
a string representation of this event