AdjustmentEvent in Java

AdjustmentEvent in Java:

Any Subclass of AdjustmentEvent class indicates that an adjustment has been made to an Adjustable object like ScrollBar.

The getID() method of this class returns the type of an AdjustmentEvent (in general AWT components generate adjustment events of type AdjusmentEvent.ADJUSTMENT_VALUE_CHANGED).we can perform different types of adjustment to the Adjustable object that can be classified in the one of the five constants (when we call getAdjustmentType() method).

getValue() method of this class returns the new value of Adjustable object. getAdjustable() returns the Adjustable object which is the source of the event.

The structure of the class AdjustmentEvent in Java is as follows:

public class java.awt.event.AdjustmentEvent extends
java.awt.AWTEvent {
//Constructor
public AdjustmentEvent(Adjustable source, int id, int type, int value);
// Constants
public static final int ADJUSTMENT_FIRST;
public static final int ADJUSTMENT_LAST;
public static final int ADJUSTMENT_VALUE_CHANGED;
public static final int BLOCK_DECREMENT;//it indicates that the Adjustable
//value has been decremented by multiple units.
public static final int BLOCK_INCREMENT;//it indicates that the Adjustable
//value has been incremented by multiple units.
public static final int TRACK;// It indicates that that the Adjustable value
// has been set to an absolute value.
public static final int UNIT_DECREMENT;//it indicates that the Adjustable
//value has been decremented by one unit.
public static final int UNIT_INCREMENT;//it indicates that the Adjustable
//value has been incremented by one unit.
public Adjustable getAdjustable();
public int getAdjustmentType();
public int getValue();
public String paramString();
}

Don't miss out!

Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address

Give it a try. You can unsubscribe at any time.

Thanks for subscribing! Please check your email for further instructions.

I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on [email protected]