SWING - AdjustmentEvent Class


Advertisements


Introduction

The Class AdjustmentEvent represents adjustment event emitted by Adjustable objects.

Class Declaration

Following is the declaration for java.awt.event.AdjustmentEvent class −

public class AdjustmentEvent
   extends AWTEvent

Field

Following are the fields for java.awt.Component class −

  • static int ADJUSTMENT_FIRST − Marks the first integer ID for the range of adjustment event IDs.

  • static int ADJUSTMENT_LAST − Marks the last integer ID for the range of adjustment event IDs.

  • static int ADJUSTMENT_VALUE_CHANGED − The adjustment value changed event.

  • static int BLOCK_DECREMENT − The block decrement adjustment type.

  • static int BLOCK_INCREMENT − The block increment adjustment type.

  • static int TRACK − The absolute tracking adjustment type.

  • static int UNIT_DECREMENT − The unit decrement adjustment type.

  • static int UNIT_INCREMENT − The unit increment adjustment type.

Class Constructors

Sr.No. Constructor & Description
1

AdjustmentEvent(Adjustable source, int id, int type, int value)

Constructs an AdjustmentEvent object with the specified Adjustable source, event type, adjustment type, and value.

2

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.

Class Methods

Sr.No. Method & Description
1

Adjustable getAdjustable()

Returns the Adjustable object where this event originated.

2

int getAdjustmentType()

Returns the type of adjustment which caused the value changed event.

3

int getValue()

Returns the current value in the adjustment event.

4

boolean getValueIsAdjusting()

Returns true if this is one of the multiple adjustment events.

5

String paramString()

Returns a string representing the state of this Event.

Methods Inherited

This interface inherits methods from the following classes −

  • java.awt.AWTEvent
  • java.util.EventObject
  • java.lang.Object

swing_event_classes.htm

Advertisements