/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.31 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package hep.aida.swig; import hep.aida.jni.AIDAJNIUtil; public class ITextStyle extends IBrushStyle implements hep.aida.ITextStyle { private long swigCPtr; public ITextStyle(long cPtr, boolean cMemoryOwn) { super(AIDAJNI.SWIGITextStyleUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } protected static long getCPtr(hep.aida.ITextStyle obj) { if (obj instanceof ITextStyle) { return (obj == null) ? 0 : ((ITextStyle)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_ITextStyle(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.ITextStyle_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_ITextStyle(swigCPtr); } swigCPtr = 0; super.delete(); } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.ITextStyle_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.ITextStyle_change_ownership(this, swigCPtr, true); } public String[] availableFonts() { return AIDAJNIUtil.toStringArray(AIDAJNI.ITextStyle_availableFonts(swigCPtr, this)); } public double fontSize() { return AIDAJNI.ITextStyle_fontSize(swigCPtr, this); } public boolean setFontSize(double size) { return AIDAJNI.ITextStyle_setFontSize(swigCPtr, this, size); } public String font() { return AIDAJNI.ITextStyle_font(swigCPtr, this); } public boolean setFont(String font) { return AIDAJNI.ITextStyle_setFont(swigCPtr, this, font); } public boolean isBold() { return AIDAJNI.ITextStyle_isBold(swigCPtr, this); } public boolean isItalic() { return AIDAJNI.ITextStyle_isItalic(swigCPtr, this); } public boolean isUnderlined() { return AIDAJNI.ITextStyle_isUnderlined(swigCPtr, this); } public boolean setBold(boolean bold) { return AIDAJNI.ITextStyle_setBold__SWIG_0(swigCPtr, this, bold); } public boolean setBold() { return AIDAJNI.ITextStyle_setBold__SWIG_1(swigCPtr, this); } public boolean setItalic(boolean italic) { return AIDAJNI.ITextStyle_setItalic__SWIG_0(swigCPtr, this, italic); } public boolean setItalic() { return AIDAJNI.ITextStyle_setItalic__SWIG_1(swigCPtr, this); } public boolean setUnderlined(boolean underlined) { return AIDAJNI.ITextStyle_setUnderlined__SWIG_0(swigCPtr, this, underlined); } public boolean setUnderlined() { return AIDAJNI.ITextStyle_setUnderlined__SWIG_1(swigCPtr, this); } public ITextStyle() { this(AIDAJNI.new_ITextStyle(), true); AIDAJNI.ITextStyle_director_connect(this, swigCPtr, swigCMemOwn, true); } }