InputEvent.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_EVENT_INPUTEVENT_H
00002 #define JAVA_AWT_EVENT_INPUTEVENT_H 1
00003 
00004 #ifndef JAVA_AWT_EVENT_COMPONENTEVENT_H
00005 #include <java_awt_event/ComponentEvent.h>
00006 #endif /* JAVA_AWT_EVENT_COMPONENTEVENT_H */
00007 #ifndef JAVA_AWT_SPEC
00008 #include <java_awt/Spec.h>
00009 #endif /* JAVA_AWT_SPEC */
00010 
00011 namespace java {
00012   namespace awt {
00013     namespace event {
00014 
00037       class JAVA_AWT_SPEC InputEvent : public ComponentEvent {
00038 
00039       public:
00040 
00041         enum MODIFIER_MASK {
00042 
00047           SHIFT_DOWN_MASK = 1 << 0,
00048 
00053           CTRL_DOWN_MASK = 1 << 1,
00054 
00059           META_DOWN_MASK = 1 << 2,
00060 
00065           ALT_DOWN_MASK = 1 << 3,
00066 
00071           BUTTON1_DOWN_MASK = 1 << 4,
00072 
00077           BUTTON2_DOWN_MASK = 1 << 5,
00078 
00083           BUTTON3_DOWN_MASK = 1 << 6,
00084 
00089           ALT_GRAPH_DOWN_MASK = 1 << 7,
00090 
00091         };
00092 
00096         virtual jint getModifiers() const;
00097 
00102         virtual void consume();
00103 
00107         virtual jboolean isShiftDown() const;
00108 
00112         virtual jboolean isControlDown() const;
00113 
00117         virtual jboolean isMetaDown() const;
00118 
00122         virtual jboolean isAltDown() const;
00123 
00127         virtual jboolean isButton1Down() const;
00128 
00132         virtual jboolean isButton2Down() const;
00133 
00137         virtual jboolean isButton3Down() const;
00138 
00142         virtual jboolean isAltGraphDown() const;
00143 
00157         static String getModifiersText(jint modifiers);
00158 
00159       protected:
00160 
00171         jint modifiers;
00172 
00183         InputEvent(const Ref<Component>& source = 0, jint id = 0, jlong when = 0, jint modifiers = 0);
00184 
00185       private:
00186 
00187         REGISTER_MEMBERS;
00188 
00189       };
00190 
00191     } // namespace event
00192   } // namespace awt
00193 } // namespace java
00194 
00195 #endif /* JAVA_AWT_EVENT_INPUTEVENT_H */

Generated on Fri May 16 11:54:43 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3