JQAbstractButtonBridge Class Reference

JQAbstractButton Bridge. More...

#include <JQAbstractButtonBridge.h>

Inheritance diagram for JQAbstractButtonBridge:

JQComponentBridge QObjectBridge JQButtonBridge JQToggleButtonBridge JQToolButtonBridge JQCheckBoxBridge JQRadioButtonBridge JQToggleToolButtonBridge

List of all members.

Public Slots

void setPressed (JNIEnv *env, jboolean pressed)
 Pressed/unpressed the button.
void setText (JNIEnv *env, jstring text)
 Sets button text.
void setIcon (JNIEnv *env, jobject iconSet)
 Sets the icon set.
void setIconSize (JNIEnv *env, jint width, jint height)
 Sets icon size.

Public Member Functions

jboolean buttonPressed ()
 Calls buttonPressed method of the JQAbstractButton object.
jboolean buttonReleased ()
 Calls buttonReleased method of the JQAbstractButton object.
void buttonClicked (jint modifiers)
 Calls buttonClicked method of the JQAbstractButton object.
QAbstractButton * qAbstractButton () const
 Returns QAbstractButton adaptee.
virtual jobject getBackground (JNIEnv *env, jclass colorClass)
virtual void setBackground (JNIEnv *env, jint argb)
virtual void setNullBackground (JNIEnv *env)
virtual jobject getForeground (JNIEnv *env, jclass colorClass)
virtual void setForeground (JNIEnv *env, jint argb)
virtual void setNullForeground (JNIEnv *env)

Static Public Member Functions

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

Protected Slots

void pressedSlot ()
 Pressed slot.
void releasedSlot ()
 Released slot.
void clickedSlot ()
 clicked slot.

Protected Member Functions

 JQAbstractButtonBridge (JNIEnv *env, jobject obj, QAbstractButton *button)
 Constructs new JQAbstractButtonBridge object.
 JQAbstractButtonBridge (JNIEnv *env, jobject obj)
 Constructs new JQAbstractButtonBridge object.
void setIconType (QIconAdapter::IconType iconType)
 Sets current icon type.
virtual bool filterKeyPressedEvent (QObject *obj, QKeyEvent *e)
virtual bool filterKeyReleasedEvent (QObject *obj, QKeyEvent *e)
virtual bool filterMouseEnterEvent (QObject *obj, QMouseEvent *e)
virtual bool filterMouseLeaveEvent (QObject *obj, QMouseEvent *e)


Detailed Description

JQAbstractButton Bridge.

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

Constructor & Destructor Documentation

JQAbstractButtonBridge::JQAbstractButtonBridge ( JNIEnv *  env,
jobject  obj,
QAbstractButton *  button 
) [protected]

Constructs new JQAbstractButtonBridge object.

Parameters:
env the JNIEnv pointer
obj the JQAbstractButton object
button the QAbstractButton object

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

Constructs new JQAbstractButtonBridge object.

Parameters:
env the JNIEnv pointer
obj the JQAbstractButton object


Member Function Documentation

void JQAbstractButtonBridge::setPressed ( JNIEnv *  env,
jboolean  pressed 
) [slot]

Pressed/unpressed the button.

Parameters:
env the JNIEnv pointer
pressed true if pressed

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

Sets button text.

Parameters:
env the JNIEnv pointer
text the text

void JQAbstractButtonBridge::setIcon ( JNIEnv *  env,
jobject  iconSet 
) [slot]

Sets the icon set.

Parameters:
env the JNIEnv pointer
iconSet the icon set

void JQAbstractButtonBridge::setIconSize ( JNIEnv *  env,
jint  width,
jint  height 
) [slot]

Sets icon size.

Parameters:
env the JNIEnv pointer
width the icon width
height the icon height

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

Initializes JQAbstractButtonBridge class.

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

Reimplemented from JQComponentBridge.

jlong JQAbstractButtonBridge::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.

Reimplemented in JQButtonBridge, JQCheckBoxBridge, JQRadioButtonBridge, JQToggleButtonBridge, JQToggleToolButtonBridge, and JQToolButtonBridge.

jboolean JQAbstractButtonBridge::buttonPressed (  ) 

Calls buttonPressed method of the JQAbstractButton object.

Returns:
true if the button is pressed

jboolean JQAbstractButtonBridge::buttonReleased (  ) 

Calls buttonReleased method of the JQAbstractButton object.

Returns:
true if the button is released

QAbstractButton * JQAbstractButtonBridge::qAbstractButton (  )  const [inline]

Returns QAbstractButton adaptee.

Returns:
QAbstractButton adaptee

jobject JQAbstractButtonBridge::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 JQAbstractButtonBridge::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 JQAbstractButtonBridge::setNullBackground ( JNIEnv *  env  )  [virtual]

Sets the application default background color.

Parameters:
env the JNIEnv pointer

Reimplemented from JQComponentBridge.

jobject JQAbstractButtonBridge::getForeground ( JNIEnv *  env,
jclass  colorClass 
) [virtual]

Returns foreground color.

Parameters:
env the JNIEnv pointer
colorClass the QSwing color class
Returns:
foreground color

Reimplemented from JQComponentBridge.

void JQAbstractButtonBridge::setForeground ( JNIEnv *  env,
jint  argb 
) [virtual]

Sets the foreground color.

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

Reimplemented from JQComponentBridge.

void JQAbstractButtonBridge::setNullForeground ( JNIEnv *  env  )  [virtual]

Sets the application default foreground color.

Parameters:
env the JNIEnv pointer

Reimplemented from JQComponentBridge.

void JQAbstractButtonBridge::setIconType ( QIconAdapter::IconType  iconType  )  [inline, protected]

Sets current icon type.

Parameters:
iconType the icon type

bool JQAbstractButtonBridge::filterKeyPressedEvent ( QObject *  obj,
QKeyEvent *  e 
) [protected, virtual]

Filters key pressed event.

Parameters:
obj the object
e the key event

Reimplemented from JQComponentBridge.

bool JQAbstractButtonBridge::filterKeyReleasedEvent ( QObject *  obj,
QKeyEvent *  e 
) [protected, virtual]

Filters key released event.

Parameters:
obj the object
e the key event

Reimplemented from JQComponentBridge.

bool JQAbstractButtonBridge::filterMouseEnterEvent ( QObject *  obj,
QMouseEvent *  e 
) [protected, virtual]

Filters mouse enter event.

Parameters:
obj the object
e the mouse event

Reimplemented from JQComponentBridge.

bool JQAbstractButtonBridge::filterMouseLeaveEvent ( QObject *  obj,
QMouseEvent *  e 
) [protected, virtual]

Filters mouse leave event.

Parameters:
obj the object
e the mouse event

Reimplemented from JQComponentBridge.


Copyright © 2007 ETF and contributors. All Rights Reserved.