JQSplitPaneBridge.h

00001 /*
00002  * @(#)JQSplitPaneBridge.h  0.2.0 / 2007-12-04
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 JQSPLITPANEBRIDGE_H
00010 #define JQSPLITPANEBRIDGE_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 #include "JQComponentBridge.h"
00015 #include "QSplitterAdapter.h"
00016 
00017 /*^**************************************************************************^*/
00018 /*- JQSplitPaneBridge Class.                                                 -*/
00019 /*^**************************************************************************^*/
00020 
00027 class JAVAQX_EXPORT JQSplitPaneBridge : public JQComponentBridge
00028 {
00029   Q_OBJECT
00030 protected:
00031   JQSplitPaneBridge(JNIEnv *env, jobject obj);
00032 public slots: // native calls
00033   void setLeftComponent(JNIEnv *env, jlong componentBridge);
00034   void setRightComponent(JNIEnv *env, jlong componentBridge);
00035   void setOrientation(JNIEnv *env, jint orientation);
00036   void setContinuousLayout(JNIEnv *env, jboolean continuousLayout);
00037   void setResizeWeight(JNIEnv *env, jdouble resizeWeight);
00038   jint getDividerSize(JNIEnv *env);
00039   void setDividerSize(JNIEnv *env, jint dividerSize);
00040   void setDividerLocation(JNIEnv *env, jint dividerLocation);
00041   void setOneTouchExpandable(JNIEnv *env, jboolean oneTouchExpandable);
00042 public: // native calls
00043   static void initialize(JNIEnv *env, jclass cls);
00044   static jlong newInstance(JNIEnv *env, jobject obj);
00045 public: // native callbacks
00046   void dividerLocationChanged(jint dividerLocation);
00047 public:
00048   inline QSplitterAdapter *qSplitterAdapter() const;
00049 protected slots:
00050   void splitterMovedSlot(int position, int index);
00051 private:
00052   static jmethodID sm_dividerLocationChangedMID;
00053 };
00054 
00055 /*^**************************************************************************^*/
00056 /*- JQSplitPaneBridge :: Public Inline Member Function.                      -*/
00057 /*^**************************************************************************^*/
00058 
00064 inline QSplitterAdapter *JQSplitPaneBridge::qSplitterAdapter() const
00065 {
00066   return static_cast<QSplitterAdapter *>(qObject());
00067 }
00068 
00069 /*^**************************************************************************^*/
00070 /*- Macro Definition.                                                        -*/
00071 /*^**************************************************************************^*/
00072 
00073 #define jqSplitPaneBridge (reinterpret_cast<JQSplitPaneBridge *>(bridge))
00074 
00075 #endif //JQSPLITPANEBRIDGE_H
00076 
00077 /*^*****************************************************************************
00078   File History:
00079 
00080  - 2007-12-04 20:30:14 Slobodan
00081    Initial version
00082 
00083 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.