JQLabelBridge.h

00001 /*
00002  * @(#)JQLabelBridge.h  0.2.0 / 2007-07-28
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 JQLABELBRIDGE_H
00010 #define JQLABELBRIDGE_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 #include "JQComponentBridge.h"
00015 #include "QLabelAdapter.h"
00016 
00017 /*^**************************************************************************^*/
00018 /*- JQLabelBridge Class.                                                     -*/
00019 /*^**************************************************************************^*/
00020 
00027 class JAVAQX_EXPORT JQLabelBridge : public JQComponentBridge
00028 {
00029   Q_OBJECT
00030 protected:
00031   JQLabelBridge(JNIEnv *env, jobject obj);
00032 public slots: // native calls
00033   void setText(JNIEnv *env, jstring text);
00034   void setTextFormat(JNIEnv *env, jint textFormat);
00035   void setWordWrap(JNIEnv *env, jboolean wordWrap);
00036   void setAlignment(JNIEnv *env, jint ha, jint va);
00037   void setIcon(JNIEnv *env, jobject iconSet);
00038   void setIconSize(JNIEnv *env, jint width, jint height);
00039   void setBorderType(JNIEnv *env, jint borderType);
00040   void setBorderStyle(JNIEnv *env, jint borderStyle);
00041   void setBorderWidth(JNIEnv *env, jint borderWidth);
00042 public: // native calls
00043   static void initialize(JNIEnv *env, jclass cls);
00044   static jlong newInstance(JNIEnv *env, jobject obj);
00045 public:
00046   inline QLabelAdapter *qLabelAdapter() const;
00047 };
00048 
00049 /*^**************************************************************************^*/
00050 /*- JQLabelBridge :: Inline Member Function.                                 -*/
00051 /*^**************************************************************************^*/
00052 
00058 inline QLabelAdapter *JQLabelBridge::qLabelAdapter() const
00059 {
00060   return static_cast<QLabelAdapter *>(qObject());
00061 }
00062 
00063 /*^**************************************************************************^*/
00064 /*- Macro Definition.                                                        -*/
00065 /*^**************************************************************************^*/
00066 
00067 #define jqLabelBridge (reinterpret_cast<JQLabelBridge *>(bridge))
00068 
00069 #endif //JQLABELBRIDGE_H
00070 
00071 /*^*****************************************************************************
00072   File History:
00073 
00074  - 2007-07-28 12:57:43 Slobodan
00075    Initial version
00076 
00077 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.