Home » openjdk-7 » java » awt » event » [javadoc | source]
java.awt.event
public class: AdjustmentEvent [javadoc | source]
java.lang.Object
   java.util.EventObject
      java.awt.AWTEvent
         java.awt.event.AdjustmentEvent

All Implemented Interfaces:
    Serializable

The adjustment event emitted by Adjustable objects like java.awt.Scrollbar and java.awt.ScrollPane . When the user changes the value of the scrolling component, it receives an instance of {@code AdjustmentEvent}.

An unspecified behavior will be caused if the {@code id} parameter of any particular {@code AdjustmentEvent} instance is not in the range from {@code ADJUSTMENT_FIRST} to {@code ADJUSTMENT_LAST}.

The {@code type} of any {@code AdjustmentEvent} instance takes one of the following values:

Assigning the value different from listed above will cause an unspecified behavior.
Field Summary
public static final  int ADJUSTMENT_FIRST    Marks the first integer id for the range of adjustment event ids. 
public static final  int ADJUSTMENT_LAST    Marks the last integer id for the range of adjustment event ids. 
public static final  int ADJUSTMENT_VALUE_CHANGED    The adjustment value changed event. 
public static final  int UNIT_INCREMENT    The unit increment adjustment type. 
public static final  int UNIT_DECREMENT    The unit decrement adjustment type. 
public static final  int BLOCK_DECREMENT    The block decrement adjustment type. 
public static final  int BLOCK_INCREMENT    The block increment adjustment type. 
public static final  int TRACK    The absolute tracking adjustment type. 
 Adjustable adjustable    The adjustable object that fired the event. 
 int value    value will contain the new value of the adjustable object. This value will always be in a range associated adjustable object. 
 int adjustmentType    The adjustmentType describes how the adjustable object value has changed. This value can be increased/decreased by a block or unit amount where the block is associated with page increments/decrements, and a unit is associated with line increments/decrements. 
 boolean isAdjusting    The isAdjusting is true if the event is one of the series of multiple adjustment events. 
Fields inherited from java.awt.AWTEvent:
id,  consumed,  focusManagerIsDispatching,  isPosted,  COMPONENT_EVENT_MASK,  CONTAINER_EVENT_MASK,  FOCUS_EVENT_MASK,  KEY_EVENT_MASK,  MOUSE_EVENT_MASK,  MOUSE_MOTION_EVENT_MASK,  WINDOW_EVENT_MASK,  ACTION_EVENT_MASK,  ADJUSTMENT_EVENT_MASK,  ITEM_EVENT_MASK,  TEXT_EVENT_MASK,  INPUT_METHOD_EVENT_MASK,  INPUT_METHODS_ENABLED_MASK,  PAINT_EVENT_MASK,  INVOCATION_EVENT_MASK,  HIERARCHY_EVENT_MASK,  HIERARCHY_BOUNDS_EVENT_MASK,  MOUSE_WHEEL_EVENT_MASK,  WINDOW_STATE_EVENT_MASK,  WINDOW_FOCUS_EVENT_MASK,  RESERVED_ID_MAX
Fields inherited from java.util.EventObject:
source
Constructor:
 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.

    This method throws an IllegalArgumentException if source is null.

    Parameters:
    source - The Adjustable object where the event originated
    id - An integer indicating the type of event. For information on allowable values, see the class description for AdjustmentEvent
    type - An integer indicating the adjustment type. For information on allowable values, see the class description for AdjustmentEvent
    value - The current value of the adjustment
    Throws:
    IllegalArgumentException - if source is null
    Also see:
    getSource()
    getID()
    getAdjustmentType()
    getValue()
 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.

    This method throws an IllegalArgumentException if source is null.

    Parameters:
    source - The Adjustable object where the event originated
    id - An integer indicating the type of event. For information on allowable values, see the class description for AdjustmentEvent
    type - An integer indicating the adjustment type. For information on allowable values, see the class description for AdjustmentEvent
    value - The current value of the adjustment
    isAdjusting - A boolean that equals true if the event is one of a series of multiple adjusting events, otherwise false
    Throws:
    IllegalArgumentException - if source is null
    Also see:
    getSource()
    getID()
    getAdjustmentType()
    getValue()
    getValueIsAdjusting()
    since: 1.4 -
Method from java.awt.event.AdjustmentEvent Summary:
getAdjustable,   getAdjustmentType,   getValue,   getValueIsAdjusting,   paramString
Methods from java.awt.AWTEvent:
consume,   convertToOld,   copyPrivateDataInto,   dispatched,   getAccessControlContext,   getID,   isConsumed,   paramString,   setSource,   toString
Methods from java.util.EventObject:
getSource,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.event.AdjustmentEvent Detail:
 public Adjustable getAdjustable() 
    Returns the Adjustable object where this event originated.
 public int getAdjustmentType() 
 public int getValue() 
    Returns the current value in the adjustment event.
 public boolean getValueIsAdjusting() 
    Returns true if this is one of multiple adjustment events.
 public String paramString()