equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
25 |
25 |
26 package java.awt.event; |
26 package java.awt.event; |
27 |
27 |
28 import java.awt.Adjustable; |
28 import java.awt.Adjustable; |
29 import java.awt.AWTEvent; |
29 import java.awt.AWTEvent; |
30 import javax.tools.annotation.GenerateNativeHeader; |
30 import java.lang.annotation.Native; |
31 |
31 |
32 import javax.tools.annotation.GenerateNativeHeader; |
|
33 |
32 |
34 /** |
33 /** |
35 * The adjustment event emitted by Adjustable objects like |
34 * The adjustment event emitted by Adjustable objects like |
36 * {@link java.awt.Scrollbar} and {@link java.awt.ScrollPane}. |
35 * {@link java.awt.Scrollbar} and {@link java.awt.ScrollPane}. |
37 * When the user changes the value of the scrolling component, |
36 * When the user changes the value of the scrolling component, |
55 * @see AdjustmentListener |
54 * @see AdjustmentListener |
56 * |
55 * |
57 * @author Amy Fowler |
56 * @author Amy Fowler |
58 * @since 1.1 |
57 * @since 1.1 |
59 */ |
58 */ |
60 /* No native methods here, but the constants are needed in the supporting JNI code */ |
|
61 @GenerateNativeHeader |
|
62 public class AdjustmentEvent extends AWTEvent { |
59 public class AdjustmentEvent extends AWTEvent { |
63 |
60 |
64 /** |
61 /** |
65 * Marks the first integer id for the range of adjustment event ids. |
62 * Marks the first integer id for the range of adjustment event ids. |
66 */ |
63 */ |
77 public static final int ADJUSTMENT_VALUE_CHANGED = ADJUSTMENT_FIRST; //Event.SCROLL_LINE_UP |
74 public static final int ADJUSTMENT_VALUE_CHANGED = ADJUSTMENT_FIRST; //Event.SCROLL_LINE_UP |
78 |
75 |
79 /** |
76 /** |
80 * The unit increment adjustment type. |
77 * The unit increment adjustment type. |
81 */ |
78 */ |
82 public static final int UNIT_INCREMENT = 1; |
79 @Native public static final int UNIT_INCREMENT = 1; |
83 |
80 |
84 /** |
81 /** |
85 * The unit decrement adjustment type. |
82 * The unit decrement adjustment type. |
86 */ |
83 */ |
87 public static final int UNIT_DECREMENT = 2; |
84 @Native public static final int UNIT_DECREMENT = 2; |
88 |
85 |
89 /** |
86 /** |
90 * The block decrement adjustment type. |
87 * The block decrement adjustment type. |
91 */ |
88 */ |
92 public static final int BLOCK_DECREMENT = 3; |
89 @Native public static final int BLOCK_DECREMENT = 3; |
93 |
90 |
94 /** |
91 /** |
95 * The block increment adjustment type. |
92 * The block increment adjustment type. |
96 */ |
93 */ |
97 public static final int BLOCK_INCREMENT = 4; |
94 @Native public static final int BLOCK_INCREMENT = 4; |
98 |
95 |
99 /** |
96 /** |
100 * The absolute tracking adjustment type. |
97 * The absolute tracking adjustment type. |
101 */ |
98 */ |
102 public static final int TRACK = 5; |
99 @Native public static final int TRACK = 5; |
103 |
100 |
104 /** |
101 /** |
105 * The adjustable object that fired the event. |
102 * The adjustable object that fired the event. |
106 * |
103 * |
107 * @serial |
104 * @serial |