AdjustmentEvent in Java

0
178
Spread the love
  • 3
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    3
    Shares

AdjustmentEvent in Java
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.

Spread the love
  • 3
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    3
    Shares

LEAVE A REPLY

Please enter your comment!
Please enter your name here