public class AdjustmentEvent extends AWTEvent
Scrollbar
ScrollPane
发射事件。当用户改变滚动组件的值,接收
AdjustmentEvent
实例。
未指定的行为将如果任何特定的AdjustmentEvent
实例的id
参数不在ADJUSTMENT_FIRST
到ADJUSTMENT_LAST
范围造成的。
任何AdjustmentEvent
实例的type
取下列值之一:
UNIT_INCREMENT
UNIT_DECREMENT
BLOCK_INCREMENT
BLOCK_DECREMENT
TRACK
Adjustable
,
AdjustmentListener
,
Serialized Form
Modifier and Type | Field and Description |
---|---|
static int |
ADJUSTMENT_FIRST
调整事件标识范围的第一个整数标识。
|
static int |
ADJUSTMENT_LAST
标识调整事件标识的范围的最后一个整数标识。
|
static int |
ADJUSTMENT_VALUE_CHANGED
调整值更改事件。
|
static int |
BLOCK_DECREMENT
块递减调整类型。
|
static int |
BLOCK_INCREMENT
块增量调整类型。
|
static int |
TRACK
绝对跟踪调整类型。
|
static int |
UNIT_DECREMENT
单位递减调整类型。
|
static int |
UNIT_INCREMENT
单位增量调整类型。
|
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
source
Constructor and Description |
---|
AdjustmentEvent(Adjustable source, int id, int type, int value)
构造一个指定的
Adjustable 源、事件类型、调整型
AdjustmentEvent 对象和价值。
|
AdjustmentEvent(Adjustable source, int id, int type, int value, boolean isAdjusting)
构建了一个
AdjustmentEvent 对象和指定的可调源、事件类型、调整型和价值。
|
Modifier and Type | Method and Description |
---|---|
Adjustable |
getAdjustable()
返回
Adjustable 对象这个事件的起源。
|
int |
getAdjustmentType()
返回引起值更改事件的调整的类型。
|
int |
getValue()
返回调整事件中的当前值。
|
boolean |
getValueIsAdjusting()
如果这是一个回报
true 多调整事件。
|
String |
paramString()
返回一个字符串,表示此
Event 状态。
|
getSource
public static final int ADJUSTMENT_FIRST
public static final int ADJUSTMENT_LAST
public static final int ADJUSTMENT_VALUE_CHANGED
@Native public static final int UNIT_INCREMENT
@Native public static final int UNIT_DECREMENT
@Native public static final int BLOCK_DECREMENT
@Native public static final int BLOCK_INCREMENT
@Native public static final int TRACK
public AdjustmentEvent(Adjustable source, int id, int type, int value)
Adjustable
源、事件类型、调整型
AdjustmentEvent
对象和价值。
该方法抛出一个IllegalArgumentException
如果source
是null
。
source
-
Adjustable
对象,事件的起源
id
-整数表示事件的类型。在允许值的信息,看到
AdjustmentEvent
类的描述
type
-一个整数类型的调整。在允许值的信息,看到
AdjustmentEvent
类的描述
value
-调整电流值
IllegalArgumentException
-如果
source
是空的
EventObject.getSource()
,
AWTEvent.getID()
,
getAdjustmentType()
,
getValue()
public AdjustmentEvent(Adjustable source, int id, int type, int value, boolean isAdjusting)
AdjustmentEvent
对象和价值。
该方法抛出一个IllegalArgumentException
如果source
是null
。
source
-
Adjustable
对象,事件的起源
id
-整数表示事件的类型。在允许值的信息,看到
AdjustmentEvent
类的描述
type
-一个整数类型的调整。在允许值的信息,看到
AdjustmentEvent
类的描述
value
-调整电流值
isAdjusting
-一个布尔值,等于
true
如果事件是一系列事件的多次调整,否则
false
IllegalArgumentException
-如果
source
是空的
EventObject.getSource()
,
AWTEvent.getID()
,
getAdjustmentType()
,
getValue()
,
getValueIsAdjusting()
public Adjustable getAdjustable()
Adjustable
对象这个事件的起源。
Adjustable
对象这个事件的起源
public int getValue()
public int getAdjustmentType()
public boolean getValueIsAdjusting()
true
多调整事件。
true
多调整事件,否则返回
false
public String paramString()
AWTEvent
Event
状态。这种方法的目的是用于调试目的,其含量和返回的字符串格式不同的实现可能会有所不同。返回的字符串是空的但可能不
null
。
paramString
方法重写,继承类
AWTEvent
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.