org.kde.koala
Class KDCOPPropertyProxy

java.lang.Object
  extended by org.kde.koala.KDCOPPropertyProxy
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KDCOPPropertyProxy
extends java.lang.Object
implements org.kde.qt.QtSupport

The KDCOPPropertyProxy class provides an easy way to publish Qt properties of a QObject through DCOP. The class provides DCOP equivalents for the Qt property methods setProperty() , property() and propertyNames() and also provides automatic set/get methods for the properties of a QObject. That means for example if your object provides a String property called foo , then KDCOPPropertyProxy translates DCOP calls "setFoo( String )" and "String foo()" automatically into the corresponding setProperty/property calls.


Constructor Summary
protected KDCOPPropertyProxy(java.lang.Class dummy)
           
  KDCOPPropertyProxy(org.kde.qt.QObject object)
          Convenience constructor.
 
Method Summary
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 boolean isPropertyRequest(java.lang.String fun)
          Convenience method, when using this class as object.
static boolean isPropertyRequest(java.lang.String fun, org.kde.qt.QObject object)
          Returns true if the method request in the fun argument matches the signature of the three standard property methods or set/get methods for the properties of the object argument.
 boolean processPropertyRequest(java.lang.String fun, byte[] data, java.lang.StringBuffer replyType, byte[] replyData)
          Convenience method, when using this class as object.
static boolean processPropertyRequest(java.lang.String fun, byte[] data, java.lang.StringBuffer replyType, byte[] replyData, org.kde.qt.QObject object)
          Processes the given DCOP method request by translating the request into a setProperty/property call on the given QObject argument.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KDCOPPropertyProxy

protected KDCOPPropertyProxy(java.lang.Class dummy)

KDCOPPropertyProxy

public KDCOPPropertyProxy(org.kde.qt.QObject object)
Convenience constructor. Use it if you want to use this class as object, in contrary to using the static methods of this class and providing a QObject argument for each call.

Method Detail

isPropertyRequest

public boolean isPropertyRequest(java.lang.String fun)
Convenience method, when using this class as object. See documentation of the constructor and static isPropertyRequest method.


processPropertyRequest

public boolean processPropertyRequest(java.lang.String fun,
                                      byte[] data,
                                      java.lang.StringBuffer replyType,
                                      byte[] replyData)
Convenience method, when using this class as object. See documentation of the constructor and static processPropertyRequest method.


isPropertyRequest

public static boolean isPropertyRequest(java.lang.String fun,
                                        org.kde.qt.QObject object)
Returns true if the method request in the fun argument matches the signature of the three standard property methods or set/get methods for the properties of the object argument. Use this method in your own DCOPObject dispatcher to check if the DCOP request is a property request which can be handled by this class.


processPropertyRequest

public static boolean processPropertyRequest(java.lang.String fun,
                                             byte[] data,
                                             java.lang.StringBuffer replyType,
                                             byte[] replyData,
                                             org.kde.qt.QObject object)
Processes the given DCOP method request by translating the request into a setProperty/property call on the given QObject argument.


finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()


isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?