MouseEvent.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_EVENT_MOUSEEVENT_H
00002 #define JAVA_AWT_EVENT_MOUSEEVENT_H 1
00003 
00004 #ifndef JAVA_AWT_POINT_H
00005 #include <java_awt/Point.h>
00006 #endif /* JAVA_AWT_POINT_H */
00007 #ifndef JAVA_LANG_SYNC_H
00008 #include <java_lang/Sync.h>
00009 #endif /* JAVA_LANG_SYNC_H */
00010 #ifndef JAVA_AWT_EVENT_INPUTEVENT_H
00011 #include <java_awt_event/InputEvent.h>
00012 #endif /* JAVA_AWT_EVENT_INPUTEVENT_H */
00013 #ifndef JAVA_AWT_SPEC
00014 #include <java_awt/Spec.h>
00015 #endif /* JAVA_AWT_SPEC */
00016 
00017 namespace java {
00018   namespace awt {
00019     namespace event {
00020 
00146       class JAVA_AWT_SPEC MouseEvent : public InputEvent {
00147 
00148       public:
00149 
00150         enum MOUSE_EVENT_ID {
00151 
00155           MOUSE_FIRST = 500,
00156 
00161           MOUSE_CLICKED = MOUSE_FIRST,
00162 
00167           MOUSE_PRESSED,
00168 
00173           MOUSE_RELEASED,
00174 
00180           MOUSE_ENTERED,
00181 
00187           MOUSE_EXITED,
00188 
00192           MOUSE_MOTION_FIRST,
00193 
00198           MOUSE_MOVED = MOUSE_MOTION_FIRST,
00199 
00204           MOUSE_DRAGGED,
00205 
00209           MOUSE_MOTION_LAST = MOUSE_DRAGGED,
00210 
00214           MOUSE_WHEEL_FIRST,
00215 
00221           MOUSE_WHEEL = MOUSE_WHEEL_FIRST,
00222 
00226           MOUSE_WHEEL_LAST = MOUSE_WHEEL,
00227 
00231           MOUSE_LAST = MOUSE_WHEEL,
00232 
00233         };
00234 
00235         enum MOUSE_EVENT_BUTTON {
00236 
00241           NOBUTTON = 0,
00242 
00247           BUTTON1,
00248 
00253           BUTTON2,
00254 
00259           BUTTON3,
00260 
00261         };
00262 
00263         MouseEvent();
00264 
00295         MouseEvent
00296           (const Ref<Component>& source, jint id, jlong when, 
00297            jint modifiers, jint x, jint y, jint clickCount = 0,
00298            jboolean popupTrigger = false, jint button = NOBUTTON);
00299 
00304         virtual void consume();
00305 
00313         virtual jint getX() const;
00314 
00322         virtual jint getY() const;
00323 
00330         virtual Point getPoint() const;
00331 
00342         virtual void translatePoint(jint x, jint y);
00343 
00349         virtual jint getClickCount() const;
00350 
00361         virtual jint getButton() const;
00362 
00375         virtual jboolean isPopupTrigger() const;
00376 
00383         virtual String paramString() const;
00384 
00385       protected:
00386 
00394         jint x;
00395 
00403         jint y;
00404 
00418         jint clickCount;
00419 
00431         jboolean popupTrigger;
00432 
00444         jint button;
00445 
00446         Sync sync;
00447 
00448       private:
00449 
00450         REGISTER_MEMBERS;
00451 
00452       };
00453 
00454     } // namespace event
00455   } // namespace awt
00456 } // namespace java
00457 
00458 #endif /* JAVA_AWT_EVENT_MOUSEEVENT_H */
00459 

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