AdjustmentEventpublic class AdjustmentEvent extends AWTEvent This class is not supported in Android 1.0. It is merely provided to maintain
interface compatibility with desktop Java implementations. |
Fields Summary |
---|
private static final long | serialVersionUID | public static final int | ADJUSTMENT_FIRST | public static final int | ADJUSTMENT_LAST | public static final int | ADJUSTMENT_VALUE_CHANGED | public static final int | UNIT_INCREMENT | public static final int | UNIT_DECREMENT | public static final int | BLOCK_DECREMENT | public static final int | BLOCK_INCREMENT | public static final int | TRACK | private int | type | private int | value | private boolean | isAdjusting |
Constructors Summary |
---|
public AdjustmentEvent(Adjustable source, int id, int type, int value)
this(source, id, type, value, false);
| public AdjustmentEvent(Adjustable source, int id, int type, int value, boolean isAdjusting)
super(source, id);
this.type = type;
this.value = value;
this.isAdjusting = isAdjusting;
|
Methods Summary |
---|
public java.awt.Adjustable | getAdjustable()
return (Adjustable) source;
| public int | getAdjustmentType()
return type;
| public int | getValue()
return value;
| public boolean | getValueIsAdjusting()
return isAdjusting;
| public java.lang.String | paramString()
/* The format is based on 1.5 release behavior
* which can be revealed by the following code:
*
* AdjustmentEvent e = new AdjustmentEvent(new Scrollbar(),
* AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
* AdjustmentEvent.UNIT_INCREMENT, 1);
* System.out.println(e);
*/
String idString = (id == ADJUSTMENT_VALUE_CHANGED ?
"ADJUSTMENT_VALUE_CHANGED" : "unknown type"); //$NON-NLS-1$ //$NON-NLS-2$
String adjType = null;
switch (type) {
case UNIT_INCREMENT:
adjType = "UNIT_INCREMENT"; //$NON-NLS-1$
break;
case UNIT_DECREMENT:
adjType = "UNIT_DECREMENT"; //$NON-NLS-1$
break;
case BLOCK_INCREMENT:
adjType = "BLOCK_INCREMENT"; //$NON-NLS-1$
break;
case BLOCK_DECREMENT:
adjType = "BLOCK_DECREMENT"; //$NON-NLS-1$
break;
case TRACK:
adjType = "TRACK"; //$NON-NLS-1$
break;
default:
adjType = "unknown type"; //$NON-NLS-1$
}
return (idString + ",adjType=" + adjType + ",value=" + value + //$NON-NLS-1$ //$NON-NLS-2$
",isAdjusting=" + isAdjusting); //$NON-NLS-1$
|
|