JQDesktopPaneBridge.h

00001 /*
00002  * @(#)JQDesktopPaneBridge.h  0.2.0 / 2007-11-19
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 JQDESKTOPPANEBRIDGE_H
00010 #define JQDESKTOPPANEBRIDGE_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 #include "JQContainerBridge.h"
00015 
00016 /*^**************************************************************************^*/
00017 /*- JQDesktopPaneBridge Class.                                               -*/
00018 /*^**************************************************************************^*/
00019 
00026 class JAVAQX_EXPORT JQDesktopPaneBridge : public JQContainerBridge
00027 {
00028   Q_OBJECT
00029 protected:
00030   JQDesktopPaneBridge(JNIEnv *env, jobject obj);
00031 public slots: // native calls
00032   void insertChild(JNIEnv *env, jlong childBridge, jint index);
00033   void removeChild(JNIEnv *env, jlong childBridge);
00034   void setCurrentComponent(JNIEnv *env, jlong componentBridge);
00035   void selectNextComponent(JNIEnv *env);
00036   void selectPreviousComponent(JNIEnv *env);
00037   void closeCurrentComponent(JNIEnv *env);
00038   void closeAllComponents(JNIEnv *env);
00039   void cascadeComponents(JNIEnv *env);
00040   void tileComponents(JNIEnv *env);
00041 public: // native calls
00042   static void initialize(JNIEnv *env, jclass cls);
00043   static jlong newInstance(JNIEnv *env, jobject obj);
00044 public: // native callbacks
00045   void activeComponentChanged(jobject component);
00046 public:
00047   virtual jobject getBackground(JNIEnv *env, jclass colorClass);
00048   virtual void setBackground(JNIEnv *env, jint argb);
00049   virtual void setNullBackground(JNIEnv *env);
00050 public:
00051   inline QMdiArea *qMdiArea() const;
00052 protected slots:
00053   void subWindowActivatedSlot(QMdiSubWindow *window);
00054 private:
00055   static jmethodID sm_activeComponentChangedMID;
00056 };
00057 
00058 /*^**************************************************************************^*/
00059 /*- JQDesktopPaneBridge :: Public Inline Member Function.                    -*/
00060 /*^**************************************************************************^*/
00061 
00067 inline QMdiArea *JQDesktopPaneBridge::qMdiArea() const
00068 {
00069   return static_cast<QMdiArea *>(qObject());
00070 }
00071 
00072 /*^**************************************************************************^*/
00073 /*- Macro Definition.                                                        -*/
00074 /*^**************************************************************************^*/
00075 
00076 #define jqDesktopPaneBridge (reinterpret_cast<JQDesktopPaneBridge *>(bridge))
00077 
00078 #endif //JQDESKTOPPANEBRIDGE_H
00079 
00080 /*^*****************************************************************************
00081   File History:
00082 
00083  - 2007-11-19 09:55:17 Slobodan
00084    Initial version
00085 
00086 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.