TextDocumentBridge Class Reference

TextDocument Bridge. More...

#include <TextDocumentBridge.h>

Inheritance diagram for TextDocumentBridge:

QObjectBridge PlainDocumentBridge StyledDocumentBridge

List of all members.

Public Slots

void clearText (JNIEnv *env)
 Clears the text.
jstring getText (JNIEnv *env)
 Returns text of the document.
void setText (JNIEnv *env, jstring text)
 Sets text of the document.
void appendText (JNIEnv *env, jstring text)
 Appends text to the end of the document.
jboolean isUndoAvailable (JNIEnv *env)
 Returns true if undo operation is available.
jboolean isRedoAvailable (JNIEnv *env)
 Returns true if redo operation is available.
void undo (JNIEnv *env)
 Undos last action.
void redo (JNIEnv *env)
 Redos last action.
void setUndoRedoEnabled (JNIEnv *env, jboolean enabled)
 Sets whether or not the undo stack is enabled.
void setUndoRedoListening (JNIEnv *env, jboolean listening)
 Sets undo/redo listening.
jboolean isModified (JNIEnv *env)
 Returns true if the document is modified.
void setModified (JNIEnv *env, jboolean modified)
 Sets whether or not the document is modified.
void print (JNIEnv *env, jobject printer)
 Prints the document using the specified printer object.
void setUseHighlighter (JNIEnv *env, jboolean useHighlighter)
 Sets whether or not the document is using the highlighter.
void setFormat (JNIEnv *env, jint start, jint length, jobject format)
 Sets the character format for the specified text segment.
void undoAvailableSlot (bool available)
 undoAvailable slot.
void redoAvailableSlot (bool available)
 redAvailable slot.

Public Member Functions

void undoAvailable (jboolean available)
 Calls undoAvailable method of the TextDocument object.
void redoAvailable (jboolean available)
 Calls redoAvailable method of the TextDocument object.
void highlightBlock (jint blockStart, jstring blockText)
 Calls highlightDocument method of the TextDocument object.
QTextDocumentAdapterqTextDocument () const
 Returns QTextDocumentAdapter adaptee.
virtual void destroy (JNIEnv *env)

Static Public Member Functions

static void initialize (JNIEnv *env, jclass cls)
 Initializes TextDocumentBridge class.
static
QTextDocumentAdapter
toQDocument (JNIEnv *env, jobject document)
 Returns QTextDocumentAdapter object of the specified QSwing TextDocument object.

Protected Member Functions

 TextDocumentBridge (JNIEnv *env, jobject obj, QTextDocumentAdapter *document)
 Constructs new TextDocumentBridge object.
virtual jfieldID bridgePointerFID () const
 Returns bridge pointer FID.

Static Protected Member Functions

static jmethodID createMID ()
 Returns createMID.


Detailed Description

TextDocument Bridge.

Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)
Version:
0.2.0

Constructor & Destructor Documentation

TextDocumentBridge::TextDocumentBridge ( JNIEnv *  env,
jobject  obj,
QTextDocumentAdapter document 
) [protected]

Constructs new TextDocumentBridge object.

Parameters:
env the JNIEnv pointer
obj the QSwing TextDocument object
document the Qt QTextDocument


Member Function Documentation

void TextDocumentBridge::clearText ( JNIEnv *  env  )  [slot]

Clears the text.

Parameters:
env the JNIEnv pointer

jstring TextDocumentBridge::getText ( JNIEnv *  env  )  [slot]

Returns text of the document.

Parameters:
env the JNIEnv pointer
Returns:
text of the document

void TextDocumentBridge::setText ( JNIEnv *  env,
jstring  text 
) [slot]

Sets text of the document.

Parameters:
env the JNIEnv pointer
text the text of the document

void TextDocumentBridge::appendText ( JNIEnv *  env,
jstring  text 
) [slot]

Appends text to the end of the document.

Parameters:
env the JNIEnv pointer
text text the text to be appended

jboolean TextDocumentBridge::isUndoAvailable ( JNIEnv *  env  )  [slot]

Returns true if undo operation is available.

Parameters:
env the JNIEnv pointer
Returns:
true if undo operation is available

jboolean TextDocumentBridge::isRedoAvailable ( JNIEnv *  env  )  [slot]

Returns true if redo operation is available.

Parameters:
env the JNIEnv pointer
Returns:
true if undo operation is available

void TextDocumentBridge::undo ( JNIEnv *  env  )  [slot]

Undos last action.

Parameters:
env the JNIEnv pointer

void TextDocumentBridge::redo ( JNIEnv *  env  )  [slot]

Redos last action.

Parameters:
env the JNIEnv pointer

void TextDocumentBridge::setUndoRedoEnabled ( JNIEnv *  env,
jboolean  enabled 
) [slot]

Sets whether or not the undo stack is enabled.

Parameters:
env the JNIEnv pointer
enabled true if enabled

void TextDocumentBridge::setUndoRedoListening ( JNIEnv *  env,
jboolean  listening 
) [slot]

Sets undo/redo listening.

Parameters:
env the JNIEnv pointer
listening true if listening

jboolean TextDocumentBridge::isModified ( JNIEnv *  env  )  [slot]

Returns true if the document is modified.

Parameters:
env the JNIEnv pointer
Returns:
true if the document is modified

void TextDocumentBridge::setModified ( JNIEnv *  env,
jboolean  modified 
) [slot]

Sets whether or not the document is modified.

Parameters:
env the JNIEnv pointer
modified true if modified

void TextDocumentBridge::print ( JNIEnv *  env,
jobject  printer 
) [slot]

Prints the document using the specified printer object.

Parameters:
env the JNIEnv pointer
printer the QSwing printer object

void TextDocumentBridge::setUseHighlighter ( JNIEnv *  env,
jboolean  useHighlighter 
) [slot]

Sets whether or not the document is using the highlighter.

Parameters:
env the JNIEnv pointer
useHighlighter true if using

void TextDocumentBridge::setFormat ( JNIEnv *  env,
jint  start,
jint  length,
jobject  format 
) [slot]

Sets the character format for the specified text segment.

Parameters:
env the JNIEnv pointer
start the start of the segment
length the length of the segment
format the format

void TextDocumentBridge::initialize ( JNIEnv *  env,
jclass  cls 
) [static]

Initializes TextDocumentBridge class.

Parameters:
env the JNIEnv pointer
cls the TextDocument class
Exceptions:
FatalError if failed

Reimplemented from QObjectBridge.

void TextDocumentBridge::undoAvailable ( jboolean  available  ) 

Calls undoAvailable method of the TextDocument object.

Parameters:
available true if available

void TextDocumentBridge::redoAvailable ( jboolean  available  ) 

Calls redoAvailable method of the TextDocument object.

Parameters:
available true if available

void TextDocumentBridge::highlightBlock ( jint  blockStart,
jstring  blockText 
)

Calls highlightDocument method of the TextDocument object.

Parameters:
blockStart the block start
blockText the block text

QTextDocumentAdapter * TextDocumentBridge::qTextDocument (  )  const [inline]

Returns QTextDocumentAdapter adaptee.

Returns:
QTextDocumentAdapter adaptee

QTextDocumentAdapter * TextDocumentBridge::toQDocument ( JNIEnv *  env,
jobject  document 
) [static]

Returns QTextDocumentAdapter object of the specified QSwing TextDocument object.

Parameters:
env the JNIEnv pointer
document the QSwing TextDocumen object
Returns:
QTextDocumentAdapter object of the specified TextDocument object

void TextDocumentBridge::destroy ( JNIEnv *  env  )  [virtual]

jfieldID TextDocumentBridge::bridgePointerFID (  )  const [protected, virtual]

Returns bridge pointer FID.

Returns:
bridge pointer FID

Implements QObjectBridge.

void TextDocumentBridge::undoAvailableSlot ( bool  available  )  [slot]

undoAvailable slot.

Parameters:
available true if available

void TextDocumentBridge::redoAvailableSlot ( bool  available  )  [slot]

redAvailable slot.

Parameters:
available true if available

jmethodID TextDocumentBridge::createMID (  )  [inline, static, protected]

Returns createMID.

Returns:
createMID


Copyright © 2007 ETF and contributors. All Rights Reserved.