Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
Sample
Document
Class java.awt.event.AdjustmentEvent
Inherited members: ShowHide
Deprecated: ShowHide
View: ClientSubclassPackageImplementation
java.awt.event

Class AdjustmentEvent

  • java.lang.Object
    • java.util.EventObject
      • java.awt.AWTEvent
        • java.awt.event.AdjustmentEvent
  • All Implemented Interfaces:
    java.io.Serializable
    public class AdjustmentEvent extends AWTEvent
    The adjustment event emitted by Adjustable objects like Scrollbar and ScrollPane. When the user changes the value of the scrolling component, it receives an instance of AdjustmentEvent.

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

    The type of any AdjustmentEvent instance takes one of the following values:

    • UNIT_INCREMENT
    • UNIT_DECREMENT
    • BLOCK_INCREMENT
    • BLOCK_DECREMENT
    • TRACK
    Assigning the value different from listed above will cause an unspecified behavior.
    Since:
    1.1
    See Also:
    Adjustable, AdjustmentListener, Serialized Form
    • Fields 
      Modifier and Type Field and Description
      Inherited member indicator ACTION_EVENT_MASK Reveal DetailHide Detail
      static long ACTION_EVENT_MASK
      The event mask for selecting action events.
      public static final long ACTION_EVENT_MASK
      The event mask for selecting action events.
      See Also:
      Constant Field Values
      Inherited member indicator ADJUSTMENT_EVENT_MASK Reveal DetailHide Detail
      static long ADJUSTMENT_EVENT_MASK
      The event mask for selecting adjustment events.
      public static final long ADJUSTMENT_EVENT_MASK
      The event mask for selecting adjustment events.
      See Also:
      Constant Field Values
      Ordinary member indicator ADJUSTMENT_FIRST Reveal DetailHide Detail
      static int ADJUSTMENT_FIRST
      Marks the first integer id for the range of adjustment event ids.
      public static final int ADJUSTMENT_FIRST
      Marks the first integer id for the range of adjustment event ids.
      See Also:
      Constant Field Values
      Ordinary member indicator ADJUSTMENT_LAST Reveal DetailHide Detail
      static int ADJUSTMENT_LAST
      Marks the last 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.
      See Also:
      Constant Field Values
      Ordinary member indicator ADJUSTMENT_VALUE_CHANGED Reveal DetailHide Detail
      static int ADJUSTMENT_VALUE_CHANGED
      The adjustment value changed event.
      public static final int ADJUSTMENT_VALUE_CHANGED
      The adjustment value changed event.
      See Also:
      Constant Field Values
      Ordinary member indicator BLOCK_DECREMENT Reveal DetailHide Detail
      static int BLOCK_DECREMENT
      The block decrement adjustment type.
      public static final int BLOCK_DECREMENT
      The block decrement adjustment type.
      See Also:
      Constant Field Values
      Ordinary member indicator BLOCK_INCREMENT Reveal DetailHide Detail
      static int BLOCK_INCREMENT
      The block increment adjustment type.
      public static final int BLOCK_INCREMENT
      The block increment adjustment type.
      See Also:
      Constant Field Values
      Inherited member indicator COMPONENT_EVENT_MASK Reveal DetailHide Detail
      static long COMPONENT_EVENT_MASK
      The event mask for selecting component events.
      public static final long COMPONENT_EVENT_MASK
      The event mask for selecting component events.
      See Also:
      Constant Field Values
      Inherited member indicator consumed Reveal DetailHide Detail
      protected boolean consumed
      Controls whether or not the event is sent back down to the peer once the source has processed it - false means it's sent to the peer; true means it's not.
      protected boolean consumed
      Controls whether or not the event is sent back down to the peer once the source has processed it - false means it's sent to the peer; true means it's not. Semantic events always have a 'true' value since they were generated by the peer in response to a low-level event.
      See Also:
      AWTEvent.consume(), AWTEvent.isConsumed()
      Inherited member indicator CONTAINER_EVENT_MASK Reveal DetailHide Detail
      static long CONTAINER_EVENT_MASK
      The event mask for selecting container events.
      public static final long CONTAINER_EVENT_MASK
      The event mask for selecting container events.
      See Also:
      Constant Field Values
      Inherited member indicator FOCUS_EVENT_MASK Reveal DetailHide Detail
      static long FOCUS_EVENT_MASK
      The event mask for selecting focus events.
      public static final long FOCUS_EVENT_MASK
      The event mask for selecting focus events.
      See Also:
      Constant Field Values
      Inherited member indicator HIERARCHY_BOUNDS_EVENT_MASK Reveal DetailHide Detail
      static long HIERARCHY_BOUNDS_EVENT_MASK
      The event mask for selecting hierarchy bounds events.
      public static final long HIERARCHY_BOUNDS_EVENT_MASK
      The event mask for selecting hierarchy bounds events.
      See Also:
      Constant Field Values
      Inherited member indicator HIERARCHY_EVENT_MASK Reveal DetailHide Detail
      static long HIERARCHY_EVENT_MASK
      The event mask for selecting hierarchy events.
      public static final long HIERARCHY_EVENT_MASK
      The event mask for selecting hierarchy events.
      See Also:
      Constant Field Values
      Inherited member indicator id Reveal DetailHide Detail
      protected int id
      The event's id.
      protected int id
      The event's id.
      See Also:
      AWTEvent.getID(), AWTEvent.AWTEvent(java.lang.Object, int)
      Inherited member indicator INPUT_METHOD_EVENT_MASK Reveal DetailHide Detail
      static long INPUT_METHOD_EVENT_MASK
      The event mask for selecting input method events.
      public static final long INPUT_METHOD_EVENT_MASK
      The event mask for selecting input method events.
      See Also:
      Constant Field Values
      Inherited member indicator INVOCATION_EVENT_MASK Reveal DetailHide Detail
      static long INVOCATION_EVENT_MASK
      The event mask for selecting invocation events.
      public static final long INVOCATION_EVENT_MASK
      The event mask for selecting invocation events.
      See Also:
      Constant Field Values
      Inherited member indicator ITEM_EVENT_MASK Reveal DetailHide Detail
      static long ITEM_EVENT_MASK
      The event mask for selecting item events.
      public static final long ITEM_EVENT_MASK
      The event mask for selecting item events.
      See Also:
      Constant Field Values
      Inherited member indicator KEY_EVENT_MASK Reveal DetailHide Detail
      static long KEY_EVENT_MASK
      The event mask for selecting key events.
      public static final long KEY_EVENT_MASK
      The event mask for selecting key events.
      See Also:
      Constant Field Values
      Inherited member indicator MOUSE_EVENT_MASK Reveal DetailHide Detail
      static long MOUSE_EVENT_MASK
      The event mask for selecting mouse events.
      public static final long MOUSE_EVENT_MASK
      The event mask for selecting mouse events.
      See Also:
      Constant Field Values
      Inherited member indicator MOUSE_MOTION_EVENT_MASK Reveal DetailHide Detail
      static long MOUSE_MOTION_EVENT_MASK
      The event mask for selecting mouse motion events.
      public static final long MOUSE_MOTION_EVENT_MASK
      The event mask for selecting mouse motion events.
      See Also:
      Constant Field Values
      Inherited member indicator MOUSE_WHEEL_EVENT_MASK Reveal DetailHide Detail
      static long MOUSE_WHEEL_EVENT_MASK
      The event mask for selecting mouse wheel events.
      public static final long MOUSE_WHEEL_EVENT_MASK
      The event mask for selecting mouse wheel events.
      Since:
      1.4
      See Also:
      Constant Field Values
      Inherited member indicator PAINT_EVENT_MASK Reveal DetailHide Detail
      static long PAINT_EVENT_MASK
      The event mask for selecting paint events.
      public static final long PAINT_EVENT_MASK
      The event mask for selecting paint events.
      See Also:
      Constant Field Values
      Inherited member indicator RESERVED_ID_MAX Reveal DetailHide Detail
      static int RESERVED_ID_MAX
      The maximum value for reserved AWT event IDs.
      public static final int RESERVED_ID_MAX
      The maximum value for reserved AWT event IDs. Programs defining their own event IDs should use IDs greater than this value.
      See Also:
      Constant Field Values
      Inherited member indicator source Reveal DetailHide Detail
      protected java.lang.Object source
      The object on which the Event initially occurred.
      protected transient java.lang.Object source
      The object on which the Event initially occurred.
      Inherited member indicator TEXT_EVENT_MASK Reveal DetailHide Detail
      static long TEXT_EVENT_MASK
      The event mask for selecting text events.
      public static final long TEXT_EVENT_MASK
      The event mask for selecting text events.
      See Also:
      Constant Field Values
      Ordinary member indicator TRACK Reveal DetailHide Detail
      static int TRACK
      The absolute tracking adjustment type.
      public static final int TRACK
      The absolute tracking adjustment type.
      See Also:
      Constant Field Values
      Ordinary member indicator UNIT_DECREMENT Reveal DetailHide Detail
      static int UNIT_DECREMENT
      The unit decrement adjustment type.
      public static final int UNIT_DECREMENT
      The unit decrement adjustment type.
      See Also:
      Constant Field Values
      Ordinary member indicator UNIT_INCREMENT Reveal DetailHide Detail
      static int UNIT_INCREMENT
      The unit increment adjustment type.
      public static final int UNIT_INCREMENT
      The unit increment adjustment type.
      See Also:
      Constant Field Values
      Inherited member indicator WINDOW_EVENT_MASK Reveal DetailHide Detail
      static long WINDOW_EVENT_MASK
      The event mask for selecting window events.
      public static final long WINDOW_EVENT_MASK
      The event mask for selecting window events.
      See Also:
      Constant Field Values
      Inherited member indicator WINDOW_FOCUS_EVENT_MASK Reveal DetailHide Detail
      static long WINDOW_FOCUS_EVENT_MASK
      The event mask for selecting window focus events.
      public static final long WINDOW_FOCUS_EVENT_MASK
      The event mask for selecting window focus events.
      Since:
      1.4
      See Also:
      Constant Field Values
      Inherited member indicator WINDOW_STATE_EVENT_MASK Reveal DetailHide Detail
      static long WINDOW_STATE_EVENT_MASK
      The event mask for selecting window state events.
      public static final long WINDOW_STATE_EVENT_MASK
      The event mask for selecting window state events.
      Since:
      1.4
      See Also:
      Constant Field Values
    • Constructors 
      Constructor and Description
      Ordinary member indicator AdjustmentEvent Reveal DetailHide Detail
      AdjustmentEvent(Adjustable source, int id, int type, int value)
      Constructs an AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.
      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:
      java.lang.IllegalArgumentException - if source is null
      See Also:
      EventObject.getSource(), AWTEvent.getID(), getAdjustmentType(), getValue()
      Ordinary member indicator AdjustmentEvent Reveal DetailHide Detail
      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 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:
      java.lang.IllegalArgumentException - if source is null
      Since:
      1.4
      See Also:
      EventObject.getSource(), AWTEvent.getID(), getAdjustmentType(), getValue(), getValueIsAdjusting()
    • Methods 
      Modifier and Type Method and Description
      Inherited member indicator consume Reveal DetailHide Detail
      protected void consume()
      Consumes this event, if this event can be consumed.
      protected void consume()
      Description copied from class: AWTEvent
      Consumes this event, if this event can be consumed. Only low-level, system events can be consumed
      Ordinary member indicator getAdjustable Reveal DetailHide Detail
      Adjustable getAdjustable()
      Returns the Adjustable object where this event originated.
      public Adjustable getAdjustable()
      Returns the Adjustable object where this event originated.
      Returns:
      the Adjustable object where this event originated
      Ordinary member indicator getAdjustmentType Reveal DetailHide Detail
      int getAdjustmentType()
      Returns the type of adjustment which caused the value changed event.
      public int getAdjustmentType()
      Returns the type of adjustment which caused the value changed event. It will have one of the following values:
      • UNIT_INCREMENT
      • UNIT_DECREMENT
      • BLOCK_INCREMENT
      • BLOCK_DECREMENT
      • TRACK
      Returns:
      one of the adjustment values listed above
      Inherited member indicator getID Reveal DetailHide Detail
      int getID()
      Returns the event type.
      public int getID()
      Description copied from class: AWTEvent
      Returns the event type.
      Inherited member indicator getSource Reveal DetailHide Detail
      java.lang.Object getSource()
      The object on which the Event initially occurred.
      public java.lang.Object getSource()
      Description copied from class: java.util.EventObject
      The object on which the Event initially occurred.
      Returns:
      The object on which the Event initially occurred.
      Ordinary member indicator getValue Reveal DetailHide Detail
      int getValue()
      Returns the current value in the adjustment event.
      public int getValue()
      Returns the current value in the adjustment event.
      Returns:
      the current value in the adjustment event
      Ordinary member indicator getValueIsAdjusting Reveal DetailHide Detail
      boolean getValueIsAdjusting()
      Returns true if this is one of multiple adjustment events.
      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
      Since:
      1.4
      Inherited member indicator isConsumed Reveal DetailHide Detail
      protected boolean isConsumed()
      Returns whether this event has been consumed.
      protected boolean isConsumed()
      Description copied from class: AWTEvent
      Returns whether this event has been consumed.
      Overridden member indicator paramString Reveal DetailHide Detail
      java.lang.String paramString()
      Returns a string representing the state of this Event.
      public java.lang.String paramString()
      Description copied from class: AWTEvent
      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 in class AWTEvent
      Returns:
      a string representation of this event
      Inherited member indicator setSource Reveal DetailHide Detail
      void setSource(java.lang.Object newSource)
      Retargets an event to a new source.
      public void setSource(java.lang.Object newSource)
      Description copied from class: AWTEvent
      Retargets an event to a new source. This method is typically used to retarget an event to a lightweight child Component of the original heavyweight source.

      This method is intended to be used only by event targeting subsystems, such as client-defined KeyboardFocusManagers. It is not for general client use.

      Parameters:
      newSource - the new Object to which the event should be dispatched
      Since:
      1.4
      Inherited member indicator toString Reveal DetailHide Detail
      java.lang.String toString()
      Returns a String representation of this object.
      public java.lang.String toString()
      Description copied from class: AWTEvent
      Returns a String representation of this object.
      Overrides:
      toString in class java.util.EventObject
      Returns:
      A a String representation of this EventObject.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge