io.qt.gui.QTextFragment Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Holds a piece of text in a QTextDocument with a single QTextCharFormat
* Java wrapper for Qt class QTextFragment
*/
public class QTextFragment extends QtObject
implements java.lang.Comparable,
java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QTextFragment:: QTextFragment()
*/
public QTextFragment(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QTextFragment instance);
/**
* See QTextFragment:: QTextFragment(QTextFragment)
*/
public QTextFragment(io.qt.gui.@NonNull QTextFragment o){
super((QPrivateConstructor)null);
initialize_native(this, o);
}
private native static void initialize_native(QTextFragment instance, io.qt.gui.QTextFragment o);
/**
* See QTextFragment:: charFormat()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QTextCharFormat charFormat(){
return charFormat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextCharFormat charFormat_native_constfct(long __this__nativeId);
/**
* See QTextFragment:: charFormatIndex()const
*/
@QtUninvokable
public final int charFormatIndex(){
return charFormatIndex_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int charFormatIndex_native_constfct(long __this__nativeId);
/**
* See QTextFragment:: contains(int)const
*/
@QtUninvokable
public final boolean contains(int position){
return contains_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), position);
}
@QtUninvokable
private native boolean contains_native_int_constfct(long __this__nativeId, int position);
/**
* See QTextFragment:: glyphRuns(int, int)const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList glyphRuns(int from, int length){
return glyphRuns_native_int_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), from, length);
}
@QtUninvokable
private native io.qt.core.QList glyphRuns_native_int_int_constfct(long __this__nativeId, int from, int length);
/**
* See QTextFragment:: isValid()const
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
* See QTextFragment:: length()const
*/
@QtUninvokable
public final int length(){
return length_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int length_native_constfct(long __this__nativeId);
/**
* See QTextFragment:: operator<(QTextFragment)const
*/
@QtUninvokable
private final boolean operator_less(io.qt.gui.@NonNull QTextFragment o){
return operator_less_native_cref_QTextFragment_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(o));
}
@QtUninvokable
private native boolean operator_less_native_cref_QTextFragment_constfct(long __this__nativeId, long o);
/**
* See QTextFragment:: operator=(QTextFragment)
*/
@QtUninvokable
public final void assign(io.qt.gui.@NonNull QTextFragment o){
assign_native_cref_QTextFragment(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(o));
}
@QtUninvokable
private native void assign_native_cref_QTextFragment(long __this__nativeId, long o);
/**
* See QTextFragment:: operator==(QTextFragment)const
*/
@QtUninvokable
public final boolean equals(io.qt.gui.@NonNull QTextFragment o){
return equals_native_cref_QTextFragment_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(o));
}
@QtUninvokable
private native boolean equals_native_cref_QTextFragment_constfct(long __this__nativeId, long o);
/**
* See QTextFragment:: position()const
*/
@QtUninvokable
public final int position(){
return position_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int position_native_constfct(long __this__nativeId);
/**
* See QTextFragment:: text()const
*/
@QtUninvokable
public final java.lang.@NonNull String text(){
return text_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String text_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QTextFragment(QPrivateConstructor p) { super(p); }
/**
* See QTextFragment:: operator==(QTextFragment)const
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QTextFragment) {
return equals((io.qt.gui.QTextFragment) other);
}
return false;
}
/**
* See QTextFragment:: operator<(QTextFragment)const
*/
/**
* {@inheritDoc}
*/
@QtUninvokable
public int compareTo(io.qt.gui.@StrictNonNull QTextFragment other) {
if (equals(other)) return 0;
else if (operator_less(other)) return -1;
else return 1;
}
/**
* Returns the objects's hash code computed by qHash(QTextFragment)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QTextFragment:: QTextFragment(QTextFragment)
*/
@QtUninvokable
@Override
public QTextFragment clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QTextFragment clone_native(long __this_nativeId);
/**
* Overloaded function for {@link #glyphRuns(int, int)}
* with length = -1
.
*/
@QtUninvokable
public final io.qt.core.@NonNull QList glyphRuns(int from) {
return glyphRuns(from, (int)-1);
}
/**
* Overloaded function for {@link #glyphRuns(int, int)}
* with:
* from = -1
* length = -1
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QList glyphRuns() {
return glyphRuns((int)-1, (int)-1);
}
}