io.qt.core.QRunnable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qtjambi Show documentation
Show all versions of qtjambi Show documentation
QtJambi base module containing QtCore, QtGui and QtWidgets.
package io.qt.core;
import io.qt.*;
/**
* The base class for all runnable objects
* Java wrapper for Qt class QRunnable
*/
public interface QRunnable extends QtObjectInterface,
Runnable
{
/**
* @hidden
* Implementor class for interface {@link io.qt.core.QRunnable}
*/
public static abstract class Impl extends QtObject
implements io.qt.core.QRunnable,
Runnable
{
static {
QtJambi_LibraryUtilities.initialize();
}
@NativeAccess
private static final class ConcreteWrapper extends QRunnable.Impl {
@NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
@QtUninvokable
public void run(){
run_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static void run_native(long __this__nativeId);
}
/**
*
*/
public Impl(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QRunnable instance);
/**
* See QRunnable:: autoDelete()const
*/
@QtUninvokable
public final boolean autoDelete(){
return autoDelete_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native static boolean autoDelete_native_constfct(long __this__nativeId);
/**
* See QRunnable:: setAutoDelete(bool)
*/
@QtUninvokable
public final void setAutoDelete(boolean autoDelete){
setAutoDelete_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), autoDelete);
}
private native static void setAutoDelete_native_bool(long __this__nativeId, boolean autoDelete);
/**
* See QRunnable:: run()
*/
@QtUninvokable
public abstract void run();
private native static void run_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected Impl(QPrivateConstructor p) { super(p); }
}
/**
* See QRunnable:: autoDelete()const
*/
@QtDeclaredFinal
@QtUninvokable
public default boolean autoDelete(){
return Impl.autoDelete_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
/**
* See QRunnable:: setAutoDelete(bool)
*/
@QtDeclaredFinal
@QtUninvokable
public default void setAutoDelete(boolean autoDelete){
Impl.setAutoDelete_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), autoDelete);
}
/**
* See QRunnable:: run()
*/
@QtUninvokable
public void run();
public static QRunnable of(Runnable runnable) {
if(runnable instanceof QRunnable) {
return (QRunnable)runnable;
}else if(runnable==null){
return null;
}else {
return runnable::run;
}
}
}