JQToolTipBridge.h

00001 /*
00002  * @(#)JQToolTipBridge.h  0.2.0 / 2007-12-01
00003  *
00004  * Copyright (c) 2007, ETF and contributors. All rights reserved.
00005  *
00006  * This software is licensed under the LGPL, version 2.1, license.
00007  * A copy of the license is included in the file LICENSE-LGPL.txt.
00008  */
00009 #ifndef JQTOOLTIPBRIDGE_H
00010 #define JQTOOLTIPBRIDGE_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 /*^**************************************************************************^*/
00015 /*- JQToolTipBridge Class.                                                   -*/
00016 /*^**************************************************************************^*/
00017 
00024 class JAVAQX_EXPORT JQToolTipBridge
00025 {
00026 public: // native calls
00027   static void setEnabled(JNIEnv *env, jclass cls, jboolean enabled);
00028   static void setFont(JNIEnv *env, jclass cls, jobject font);
00029   static void setBackground(JNIEnv *env, jclass cls, jint argb);
00030   static void setNullBackground(JNIEnv *env, jclass cls);
00031   static void setForeground(JNIEnv *env, jclass cls, jint argb);
00032   static void setNullForeground(JNIEnv *env, jclass cls);
00033   static void showText(JNIEnv *env, jclass cls, jstring text, jint x, jint y,
00034                        jlong componentBridge);
00035   static void hideText(JNIEnv *env, jclass cls);
00036 public:
00037   inline static bool toolTipsEnabled();
00038 private:
00039   static bool sm_enabled;
00040 };
00041 
00042 /*^**************************************************************************^*/
00043 /*- JQToolTipBridge :: Public Static Inline Member Function.                 -*/
00044 /*^**************************************************************************^*/
00045 
00051 inline bool JQToolTipBridge::toolTipsEnabled()
00052 {
00053   return sm_enabled;
00054 }
00055 
00056 /*^**************************************************************************^*/
00057 /*- Macro Definition.                                                        -*/
00058 /*^**************************************************************************^*/
00059 
00060 #define jqToolTipBridge (reinterpret_cast<JQToolTipBridge *>(bridge))
00061 
00062 #endif //JQTOOLTIPBRIDGE_H
00063 
00064 /*^*****************************************************************************
00065   File History:
00066 
00067  - 2007-12-01 14:37:05 Slobodan
00068    Initial version
00069 
00070 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.