00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef JQTEXTAREABRIDGE_H
00010 #define JQTEXTAREABRIDGE_H
00011
00012 #include "JavaQxQSwing.h"
00013
00014 #include "JQTextComponentBridge.h"
00015 #include "QTextArea.h"
00016
00017
00018
00019
00020
00027 class JAVAQX_EXPORT JQTextAreaBridge : public JQTextComponentBridge
00028 {
00029 Q_OBJECT
00030 protected:
00031 JQTextAreaBridge(JNIEnv *env, jobject obj);
00032 public slots:
00033 void setWrapText(JNIEnv *env, jboolean textWrap);
00034 void paintComponentView(JNIEnv *env, jlong graphicsPointer);
00035 public:
00036 static void initialize(JNIEnv *env, jclass cls);
00037 static jlong newInstance(JNIEnv *env, jobject obj);
00038 public:
00039 void paintView(jlong graphicsPointer, jint x, jint y, jint width,
00040 jint height);
00041 public:
00042 inline QTextArea *qTextArea() const;
00043 public:
00044 virtual void setDocument(JNIEnv *env, jobject document);
00045 virtual void setEditable(JNIEnv *env, jboolean editable);
00046 virtual void insertText(JNIEnv *env, jstring text);
00047 virtual void cut(JNIEnv *env);
00048 virtual void copy(JNIEnv *env);
00049 virtual void paste(JNIEnv *env);
00050 virtual void clear(JNIEnv *env);
00051 virtual void selectAll(JNIEnv *env);
00052 virtual jobject getBackground(JNIEnv *env, jclass colorClass);
00053 virtual void setBackground(JNIEnv *env, jint argb);
00054 virtual void setNullBackground(JNIEnv *env);
00055 virtual jint getCursor(JNIEnv *env);
00056 virtual void setCursor(JNIEnv *env, jint type);
00057 protected:
00058 virtual void filterEnabledEvents();
00059 private:
00060 static jmethodID sm_paintViewMID;
00061 };
00062
00063
00064
00065
00066
00072 inline QTextArea *JQTextAreaBridge::qTextArea() const
00073 {
00074 return static_cast<QTextArea *>(qObject());
00075 }
00076
00077
00078
00079
00080
00081 #define jqTextAreaBridge (reinterpret_cast<JQTextAreaBridge *>(bridge))
00082
00083 #endif //JQTEXTAREABRIDGE_H
00084
00085
00086
00087
00088
00089
00090
00091