io.qt.gui.QTextBlockFormat Maven / Gradle / Ivy
package io.qt.gui;
/**
* Formatting information for blocks of text in a QTextDocument
* Java wrapper for Qt class QTextBlockFormat
*/
public class QTextBlockFormat extends io.qt.gui.QTextFormat
implements java.lang.Cloneable
{
/**
* Java wrapper for Qt enum QTextBlockFormat::LineHeightTypes
*/
public enum LineHeightTypes implements io.qt.QtEnumerator {
SingleHeight(0),
ProportionalHeight(1),
FixedHeight(2),
MinimumHeight(3),
LineDistanceHeight(4);
private LineHeightTypes(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 LineHeightTypes resolve(int value) {
switch (value) {
case 0: return SingleHeight;
case 1: return ProportionalHeight;
case 2: return FixedHeight;
case 3: return MinimumHeight;
case 4: return LineDistanceHeight;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QTextBlockFormat::MarkerType
*/
public enum MarkerType implements io.qt.QtEnumerator {
NoMarker(0),
Unchecked(1),
Checked(2);
private MarkerType(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 MarkerType resolve(int value) {
switch (value) {
case 0: return NoMarker;
case 1: return Unchecked;
case 2: return Checked;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QTextBlockFormat::QTextBlockFormat()
*/
public QTextBlockFormat(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QTextBlockFormat instance);
protected QTextBlockFormat(io.qt.gui.QTextFormat fmt){
super((QPrivateConstructor)null);
initialize_native(this, fmt);
}
private native static void initialize_native(QTextBlockFormat instance, io.qt.gui.QTextFormat fmt);
/**
* See QTextBlockFormat::alignment()const
*/
@io.qt.QtUninvokable
public final io.qt.core.Qt.Alignment alignment(){
return new io.qt.core.Qt.Alignment(alignment_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int alignment_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::bottomMargin()const
*/
@io.qt.QtUninvokable
public final double bottomMargin(){
return bottomMargin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double bottomMargin_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::headingLevel()const
*/
@io.qt.QtUninvokable
public final int headingLevel(){
return headingLevel_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int headingLevel_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::indent()const
*/
@io.qt.QtUninvokable
public final int indent(){
return indent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int indent_native_constfct(long __this__nativeId);
/**
* See QTextFormat::isValid()const
*/
@io.qt.QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::leftMargin()const
*/
@io.qt.QtUninvokable
public final double leftMargin(){
return leftMargin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double leftMargin_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::lineHeight()const
*/
@io.qt.QtUninvokable
public final double lineHeight(){
return lineHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double lineHeight_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::lineHeight(qreal,qreal)const
*/
@io.qt.QtUninvokable
public final double lineHeight(double scriptLineHeight, double scaling){
return lineHeight_native_qtjambireal_qtjambireal_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), scriptLineHeight, scaling);
}
@io.qt.QtUninvokable
private native double lineHeight_native_qtjambireal_qtjambireal_constfct(long __this__nativeId, double scriptLineHeight, double scaling);
/**
* See QTextBlockFormat::lineHeightType()const
*/
@io.qt.QtUninvokable
public final int lineHeightType(){
return lineHeightType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int lineHeightType_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::marker()const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QTextBlockFormat.MarkerType marker(){
return io.qt.gui.QTextBlockFormat.MarkerType.resolve(marker_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int marker_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::nonBreakableLines()const
*/
@io.qt.QtUninvokable
public final boolean nonBreakableLines(){
return nonBreakableLines_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean nonBreakableLines_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::pageBreakPolicy()const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QTextFormat.PageBreakFlags pageBreakPolicy(){
return new io.qt.gui.QTextFormat.PageBreakFlags(pageBreakPolicy_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int pageBreakPolicy_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::rightMargin()const
*/
@io.qt.QtUninvokable
public final double rightMargin(){
return rightMargin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double rightMargin_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #setAlignment(io.qt.core.Qt.Alignment)}.
*/
@io.qt.QtUninvokable
public final void setAlignment(io.qt.core.Qt.AlignmentFlag ... alignment){
setAlignment(new io.qt.core.Qt.Alignment(alignment));
}
/**
* See QTextBlockFormat::setAlignment(Qt::Alignment)
*/
@io.qt.QtUninvokable
public final void setAlignment(io.qt.core.Qt.Alignment alignment){
setAlignment_native_QFlags_Qt_AlignmentFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), alignment.value());
}
@io.qt.QtUninvokable
private native void setAlignment_native_QFlags_Qt_AlignmentFlag_(long __this__nativeId, int alignment);
/**
* See QTextBlockFormat::setBottomMargin(qreal)
*/
@io.qt.QtUninvokable
public final void setBottomMargin(double margin){
setBottomMargin_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), margin);
}
@io.qt.QtUninvokable
private native void setBottomMargin_native_qtjambireal(long __this__nativeId, double margin);
/**
* See QTextBlockFormat::setHeadingLevel(int)
*/
@io.qt.QtUninvokable
public final void setHeadingLevel(int alevel){
setHeadingLevel_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), alevel);
}
@io.qt.QtUninvokable
private native void setHeadingLevel_native_int(long __this__nativeId, int alevel);
/**
* See QTextBlockFormat::setIndent(int)
*/
@io.qt.QtUninvokable
public final void setIndent(int indent){
setIndent_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), indent);
}
@io.qt.QtUninvokable
private native void setIndent_native_int(long __this__nativeId, int indent);
/**
* See QTextBlockFormat::setLeftMargin(qreal)
*/
@io.qt.QtUninvokable
public final void setLeftMargin(double margin){
setLeftMargin_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), margin);
}
@io.qt.QtUninvokable
private native void setLeftMargin_native_qtjambireal(long __this__nativeId, double margin);
/**
* See QTextBlockFormat::setLineHeight(qreal,int)
*/
@io.qt.QtUninvokable
public final void setLineHeight(double height, int heightType){
setLineHeight_native_qtjambireal_int(QtJambi_LibraryUtilities.internal.nativeId(this), height, heightType);
}
@io.qt.QtUninvokable
private native void setLineHeight_native_qtjambireal_int(long __this__nativeId, double height, int heightType);
/**
* See QTextBlockFormat::setMarker(QTextBlockFormat::MarkerType)
*/
@io.qt.QtUninvokable
public final void setMarker(io.qt.gui.QTextBlockFormat.MarkerType marker){
setMarker_native_QTextBlockFormat_MarkerType(QtJambi_LibraryUtilities.internal.nativeId(this), marker.value());
}
@io.qt.QtUninvokable
private native void setMarker_native_QTextBlockFormat_MarkerType(long __this__nativeId, int marker);
/**
* See QTextBlockFormat::setNonBreakableLines(bool)
*/
@io.qt.QtUninvokable
public final void setNonBreakableLines(boolean b){
setNonBreakableLines_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), b);
}
@io.qt.QtUninvokable
private native void setNonBreakableLines_native_bool(long __this__nativeId, boolean b);
/**
* Overloaded function for {@link #setPageBreakPolicy(io.qt.gui.QTextFormat.PageBreakFlags)}.
*/
@io.qt.QtUninvokable
public final void setPageBreakPolicy(io.qt.gui.QTextFormat.PageBreakFlag ... flags){
setPageBreakPolicy(new io.qt.gui.QTextFormat.PageBreakFlags(flags));
}
/**
* See QTextBlockFormat::setPageBreakPolicy(PageBreakFlags)
*/
@io.qt.QtUninvokable
public final void setPageBreakPolicy(io.qt.gui.QTextFormat.PageBreakFlags flags){
setPageBreakPolicy_native_QFlags_QTextFormat_PageBreakFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value());
}
@io.qt.QtUninvokable
private native void setPageBreakPolicy_native_QFlags_QTextFormat_PageBreakFlag_(long __this__nativeId, int flags);
/**
* See QTextBlockFormat::setRightMargin(qreal)
*/
@io.qt.QtUninvokable
public final void setRightMargin(double margin){
setRightMargin_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), margin);
}
@io.qt.QtUninvokable
private native void setRightMargin_native_qtjambireal(long __this__nativeId, double margin);
/**
* See QTextBlockFormat::setTabPositions(QList<QTextOption::Tab>)
*/
@io.qt.QtUninvokable
public final void setTabPositions(java.util.Collection tabs){
setTabPositions_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), tabs);
}
@io.qt.QtUninvokable
private native void setTabPositions_native_cref_QList(long __this__nativeId, java.util.Collection tabs);
/**
* See QTextBlockFormat::setTextIndent(qreal)
*/
@io.qt.QtUninvokable
public final void setTextIndent(double aindent){
setTextIndent_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), aindent);
}
@io.qt.QtUninvokable
private native void setTextIndent_native_qtjambireal(long __this__nativeId, double aindent);
/**
* See QTextBlockFormat::setTopMargin(qreal)
*/
@io.qt.QtUninvokable
public final void setTopMargin(double margin){
setTopMargin_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), margin);
}
@io.qt.QtUninvokable
private native void setTopMargin_native_qtjambireal(long __this__nativeId, double margin);
/**
* See QTextBlockFormat::tabPositions()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QList tabPositions(){
return tabPositions_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QList tabPositions_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::textIndent()const
*/
@io.qt.QtUninvokable
public final double textIndent(){
return textIndent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double textIndent_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat::topMargin()const
*/
@io.qt.QtUninvokable
public final double topMargin(){
return topMargin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double topMargin_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QTextBlockFormat(QPrivateConstructor p) { super(p); }
@Override
public QTextBlockFormat clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QTextBlockFormat clone_native(long __this_nativeId);
}