JQTreeBridge Class Reference

JQTree Bridge. More...

#include <JQTreeBridge.h>

Inheritance diagram for JQTreeBridge:

JQComponentBridge QObjectBridge

List of all members.

Public Member Functions

void createIcon (JNIEnv *env, jobject iconSet)
 Creates icon.
void setUseModel (JNIEnv *env, jboolean useModel)
 Sets whether or not the tree is using tree model.
jobject getRootNode ()
 Returns root node.
void nodeSelected (jobject node)
 Calls nodeSelected method of the tree object.
jboolean setNodeIcon (jobject node)
 Calls setNodeIcon method of the tree object.
QIcon * getNodeIcon (jobject node)
 Returns the icon for the specified node.
QTreeViewAdapterqTreeView () const
 Returns QTreeViewAdapter adaptee.
virtual jobject getBackground (JNIEnv *env, jclass colorClass)
virtual void setBackground (JNIEnv *env, jint argb)
virtual void setNullBackground (JNIEnv *env)
virtual jint getCursor (JNIEnv *env)
virtual void setCursor (JNIEnv *env, jint type)

Static Public Member Functions

static void initialize (JNIEnv *env, jclass cls, jclass treeNodeClass)
 Initializes the JQTreeBridge class.
static jlong newInstance (JNIEnv *env, jobject obj)
 Returns new instance of the bridge object.

Protected Slots

void selectionChangedSlot (const QItemSelection &selected, const QItemSelection &deselected)
 selectionChanged slot.

Protected Member Functions

 JQTreeBridge (JNIEnv *env, jobject obj)
 Constructs new JQTreeBridge object.
virtual ~JQTreeBridge ()
 Destructs JQTreeBridge object.


Detailed Description

JQTree Bridge.

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

Constructor & Destructor Documentation

JQTreeBridge::JQTreeBridge ( JNIEnv *  env,
jobject  obj 
) [protected]

Constructs new JQTreeBridge object.

Parameters:
env the JNIEnv pointer
obj the JQTree object


Member Function Documentation

void JQTreeBridge::createIcon ( JNIEnv *  env,
jobject  iconSet 
)

Creates icon.

Parameters:
env the JNIEnv pointer
iconSet the icon set

void JQTreeBridge::setUseModel ( JNIEnv *  env,
jboolean  useModel 
)

Sets whether or not the tree is using tree model.

Parameters:
env the JNIEnv pointer
useModel true if using

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

Initializes the JQTreeBridge class.

Parameters:
env the JNIEnv pointer
cls the JQTree class
treeNodeClass the ThreeNode class
Exceptions:
FatalError if failed

jlong JQTreeBridge::newInstance ( JNIEnv *  env,
jobject  obj 
) [static]

Returns new instance of the bridge object.

Parameters:
env the JNIEnv pointer
obj the QSwing object
Returns:
new instance of the bridge object

Reimplemented from JQComponentBridge.

jobject JQTreeBridge::getRootNode (  ) 

Returns root node.

Returns:
root node

void JQTreeBridge::nodeSelected ( jobject  node  ) 

Calls nodeSelected method of the tree object.

Parameters:
node the node

jboolean JQTreeBridge::setNodeIcon ( jobject  node  ) 

Calls setNodeIcon method of the tree object.

Parameters:
node the node

QIcon * JQTreeBridge::getNodeIcon ( jobject  node  ) 

Returns the icon for the specified node.

Parameters:
node the node
Returns:
the icon for the specified node.

QTreeViewAdapter * JQTreeBridge::qTreeView (  )  const [inline]

Returns QTreeViewAdapter adaptee.

Returns:
QTreeViewAdapter adaptee

jobject JQTreeBridge::getBackground ( JNIEnv *  env,
jclass  colorClass 
) [virtual]

Returns background color.

Parameters:
env the JNIEnv pointer
colorClass the java color class
Returns:
background color

Reimplemented from JQComponentBridge.

void JQTreeBridge::setBackground ( JNIEnv *  env,
jint  argb 
) [virtual]

Sets the background color.

Parameters:
env the JNIEnv pointer
argb the argb value of the color

Reimplemented from JQComponentBridge.

void JQTreeBridge::setNullBackground ( JNIEnv *  env  )  [virtual]

Sets the application default background color.

Parameters:
env the JNIEnv pointer

Reimplemented from JQComponentBridge.

jint JQTreeBridge::getCursor ( JNIEnv *  env  )  [virtual]

Returns current cursor.

Parameters:
env the JNIEnv pointer
Returns:
current cursor

Reimplemented from JQComponentBridge.

void JQTreeBridge::setCursor ( JNIEnv *  env,
jint  type 
) [virtual]

Sets cursor.

Parameters:
env the JNIEnv pointer
type the type of the cursor

Reimplemented from JQComponentBridge.

void JQTreeBridge::selectionChangedSlot ( const QItemSelection &  selected,
const QItemSelection &  deselected 
) [protected, slot]

selectionChanged slot.

Parameters:
selected the selected item
deselected the deselected item


Copyright © 2007 ETF and contributors. All Rights Reserved.