00001 /* 00002 * @(#)PlainDocumentBridge.h 0.2.0 / 2007-12-11 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 PLAINDOCUMENTBRIDGE_H 00010 #define PLAINDOCUMENTBRIDGE_H 00011 00012 #include "JavaQxQSwing.h" 00013 00014 #include "PlainDocument.h" 00015 #include "TextDocumentBridge.h" 00016 00017 /*^**************************************************************************^*/ 00018 /*- PlainDocumentBridge Class. -*/ 00019 /*^**************************************************************************^*/ 00020 00027 class JAVAQX_EXPORT PlainDocumentBridge : public TextDocumentBridge 00028 { 00029 Q_OBJECT 00030 protected: 00031 PlainDocumentBridge(JNIEnv *env, jobject obj); 00032 public: // native calls 00033 static jlong newInstance(JNIEnv *env, jobject obj); 00034 public: 00035 inline PlainDocument *plainDocument() const; 00036 }; 00037 00038 /*^**************************************************************************^*/ 00039 /*- PlainDocumentBridge :: Inline Member Function. -*/ 00040 /*^**************************************************************************^*/ 00041 00047 inline PlainDocument *PlainDocumentBridge::plainDocument() const 00048 { 00049 return static_cast<PlainDocument *>(qObject()); 00050 } 00051 00052 /*^**************************************************************************^*/ 00053 /*- Macro Definition. -*/ 00054 /*^**************************************************************************^*/ 00055 00056 #define plainDocumentBridge (reinterpret_cast<PlainDocumentBridge *>(bridge)) 00057 00058 #endif //PLAINDOCUMENTBRIDGE_H 00059 00060 /*^***************************************************************************** 00061 File History: 00062 00063 - 2007-12-11 23:14:23 Slobodan 00064 Initial version 00065 00066 *****************************************************************************^*/