io.qt.gui.QStaticText Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Enables optimized drawing of text when the text and its layout is updated rarely
* Java wrapper for Qt class QStaticText
*/
public class QStaticText extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QStaticText::PerformanceHint
*/
public enum PerformanceHint implements QtEnumerator {
/**
* Representing QStaticText:: ModerateCaching
*/
ModerateCaching(0),
/**
* Representing QStaticText:: AggressiveCaching
*/
AggressiveCaching(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private PerformanceHint(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull PerformanceHint resolve(int value) {
switch (value) {
case 0: return ModerateCaching;
case 1: return AggressiveCaching;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QStaticText:: QStaticText()
*/
public QStaticText(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QStaticText instance);
/**
* See QStaticText:: QStaticText(QStaticText)
*/
public QStaticText(io.qt.gui.@NonNull QStaticText other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QStaticText instance, io.qt.gui.QStaticText other);
/**
* See QStaticText:: QStaticText(QString)
*/
public QStaticText(java.lang.@NonNull String text){
super((QPrivateConstructor)null);
initialize_native(this, text);
}
private native static void initialize_native(QStaticText instance, java.lang.String text);
/**
* See QStaticText:: operator=(QStaticText)
*/
@QtUninvokable
public final void assign(io.qt.gui.@NonNull QStaticText arg__1){
assign_native_cref_QStaticText(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void assign_native_cref_QStaticText(long __this__nativeId, long arg__1);
/**
* See QStaticText:: operator==(QStaticText)const
*/
@QtUninvokable
public final boolean equals(io.qt.gui.@NonNull QStaticText arg__1){
return equals_native_cref_QStaticText_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native boolean equals_native_cref_QStaticText_constfct(long __this__nativeId, long arg__1);
/**
* See QStaticText:: performanceHint()const
*/
@QtUninvokable
public final io.qt.gui.QStaticText.@NonNull PerformanceHint performanceHint(){
return io.qt.gui.QStaticText.PerformanceHint.resolve(performanceHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int performanceHint_native_constfct(long __this__nativeId);
/**
* See QStaticText:: prepare(QTransform, QFont)
*/
@QtUninvokable
public final void prepare(io.qt.gui.@NonNull QTransform matrix, io.qt.gui.@NonNull QFont font){
prepare_native_cref_QTransform_cref_QFont(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(matrix), QtJambi_LibraryUtilities.internal.checkedNativeId(font));
}
@QtUninvokable
private native void prepare_native_cref_QTransform_cref_QFont(long __this__nativeId, long matrix, long font);
/**
* See QStaticText:: setPerformanceHint(QStaticText::PerformanceHint)
*/
@QtUninvokable
public final void setPerformanceHint(io.qt.gui.QStaticText.@NonNull PerformanceHint performanceHint){
setPerformanceHint_native_QStaticText_PerformanceHint(QtJambi_LibraryUtilities.internal.nativeId(this), performanceHint.value());
}
@QtUninvokable
private native void setPerformanceHint_native_QStaticText_PerformanceHint(long __this__nativeId, int performanceHint);
/**
* See QStaticText:: setText(QString)
*/
@QtUninvokable
public final void setText(java.lang.@NonNull String text){
setText_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), text);
}
@QtUninvokable
private native void setText_native_cref_QString(long __this__nativeId, java.lang.String text);
/**
* See QStaticText:: setTextFormat(Qt::TextFormat)
*/
@QtUninvokable
public final void setTextFormat(io.qt.core.Qt.@NonNull TextFormat textFormat){
setTextFormat_native_Qt_TextFormat(QtJambi_LibraryUtilities.internal.nativeId(this), textFormat.value());
}
@QtUninvokable
private native void setTextFormat_native_Qt_TextFormat(long __this__nativeId, int textFormat);
/**
* See QStaticText:: setTextOption(QTextOption)
*/
@QtUninvokable
public final void setTextOption(io.qt.gui.@NonNull QTextOption textOption){
setTextOption_native_cref_QTextOption(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(textOption));
}
@QtUninvokable
private native void setTextOption_native_cref_QTextOption(long __this__nativeId, long textOption);
/**
* See QStaticText:: setTextWidth(qreal)
*/
@QtUninvokable
public final void setTextWidth(double textWidth){
setTextWidth_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), textWidth);
}
@QtUninvokable
private native void setTextWidth_native_qreal(long __this__nativeId, double textWidth);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QSizeF size(){
return size_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSizeF size_native_constfct(long __this__nativeId);
/**
* See QStaticText:: swap(QStaticText&)
*/
@QtUninvokable
public final void swap(io.qt.gui.@StrictNonNull QStaticText other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QStaticText(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QStaticText(long __this__nativeId, long other);
/**
*
*/
@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);
/**
* See QStaticText:: textFormat()const
*/
@QtUninvokable
public final io.qt.core.Qt.@NonNull TextFormat textFormat(){
return io.qt.core.Qt.TextFormat.resolve(textFormat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int textFormat_native_constfct(long __this__nativeId);
/**
* See QStaticText:: textOption()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QTextOption textOption(){
return textOption_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextOption textOption_native_constfct(long __this__nativeId);
/**
* See QStaticText:: textWidth()const
*/
@QtUninvokable
public final double textWidth(){
return textWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double textWidth_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QStaticText(QPrivateConstructor p) { super(p); }
/**
* See QStaticText:: operator==(QStaticText)const
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QStaticText) {
return equals((io.qt.gui.QStaticText) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QStaticText)
.
*/
@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 QStaticText:: QStaticText(QStaticText)
*/
@QtUninvokable
@Override
public QStaticText clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QStaticText clone_native(long __this_nativeId);
/**
* Overloaded function for {@link #prepare(io.qt.gui.QTransform, io.qt.gui.QFont)}
* with font = new io.qt.gui.QFont()
.
*/
@QtUninvokable
public final void prepare(io.qt.gui.@NonNull QTransform matrix) {
prepare(matrix, new io.qt.gui.QFont());
}
/**
* Overloaded function for {@link #prepare(io.qt.gui.QTransform, io.qt.gui.QFont)}
* with:
* matrix = new io.qt.gui.QTransform()
* font = new io.qt.gui.QFont()
*
*/
@QtUninvokable
public final void prepare() {
prepare(new io.qt.gui.QTransform(), new io.qt.gui.QFont());
}
/**
* Overloaded function for {@link #prepare(io.qt.gui.QTransform, io.qt.gui.QFont)}.
*/
@QtUninvokable
public final void prepare(io.qt.gui.@NonNull QTransform matrix, java.lang.@NonNull String font) {
prepare(matrix, new io.qt.gui.QFont(font));
}
/**
* Overloaded function for {@link #setTextOption(io.qt.gui.QTextOption)}.
*/
@QtUninvokable
public final void setTextOption(io.qt.core.Qt.@NonNull Alignment textOption) {
setTextOption(new io.qt.gui.QTextOption(textOption));
}
}