InputEvent类是所有组件级别输入事件的根事件类。输入事件被传递到处理前监听器通常由他们起源的源。这让监听器和组件的子类“消费”事件源不会使他们以默认方式处理。例如,一个按钮组件,将防止消耗mousePressed事件按钮被激活。
类的声明
以下是声明的java.awt.event.InputEvent类:
public abstract class InputEvent extends ComponentEvent
字段域
是领域类java.awt.event.InputEvent:
- 
		
static int ALT_DOWN_MASK -- Alt键扩展修辞符常数。
 - 
		
static int ALT_GRAPH_DOWN_MASK -- Alt Graph键扩展修饰符常量。
 - 
		
static int ALT_GRAPH_MASK -- Alt Graph键修改常数。
 - 
		
static int ALT_MASK -- Alt键修饰符常数。
 - 
		
static int BUTTON1_DOWN_MASK -- 鼠标Button1的扩展修饰符常数。
 - 
		
static int BUTTON1_MASK -- 鼠标按钮修饰符常数。
 - 
		
static int BUTTON2_DOWN_MASK -- 鼠标Button2 扩展修饰符常量。
 - 
		
static int BUTTON2_MASK -- 鼠标按钮修饰符常数。
 - 
		
static int BUTTON3_DOWN_MASK -- 鼠标Button3 扩展修饰符常数。
 - 
		
static int BUTTON3_MASK --鼠标按钮修饰符常数。
 - 
		
static int CTRL_DOWN_MASK -- 控制键的扩展修饰符常量。
 - 
		
static int CTRL_MASK -- 控制键修饰符常数。
 - 
		
static int META_DOWN_MASK -- Meta键扩展修饰符常数。
 - 
		
static int META_MASK -- Meta键修饰符常数。
 - 
		
static int SHIFT_DOWN_MASK -- Shift键扩展修饰符常数。
 - 
		
static int SHIFT_MASK -- Shift键修饰符常数。
 
类方法
| S.N. | 方法 & 描述 | 
|---|---|
| 1 | 
				void consume()  Consumes this event so that it will not be processed in the default manner by the source which originated it.  | 
		
| 2 | 
				int getModifiers()  Returns the modifier mask for this event.  | 
		
| 3 | 
				int getModifiersEx()  Returns the extended modifier mask for this event.  | 
		
| 4 | 
				static String getModifiersExText(int modifiers)  Returns a String describing the extended modifier keys and mouse buttons, such as "Shift", "Button1", or "Ctrl+Shift".  | 
		
| 5 | 
				long getWhen() Returns the timestamp of when this event occurred.  | 
		
| 6 | 
				boolean isAltDown()  Returns whether or not the Alt modifier is down on this event.  | 
		
| 7 | 
				boolean isAltGraphDown() Returns whether or not the AltGraph modifier is down on this event.  | 
		
| 8 | 
				boolean isConsumed() Returns whether or not this event has been consumed.  | 
		
| 9 | 
				boolean isControlDown()  Returns whether or not the Control modifier is down on this event.  | 
		
| 10 | 
				boolean isMetaDown() Returns whether or not the Meta modifier is down on this event.  | 
		
| 11 | 
				boolean isShiftDown()  Returns whether or not the Shift modifier is down on this event.  | 
		
继承的方法
这个类继承的方法从以下类:
- 
		
java.awt.event.ComponentEvent
 - 
		
java.awt.AWTEvent
 - 
		
java.util.EventObject
 - 
		
java.lang.Object
 
