/* ---------------------------------------------------------------------------- * 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 IDataStyle extends IBaseStyle implements hep.aida.IDataStyle { private long swigCPtr; public IDataStyle(long cPtr, boolean cMemoryOwn) { super(AIDAJNI.SWIGIDataStyleUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IDataStyle obj) { if (obj instanceof IDataStyle) { return (obj == null) ? 0 : ((IDataStyle)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IDataStyle(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IDataStyle_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IDataStyle(swigCPtr); } swigCPtr = 0; super.delete(); } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IDataStyle_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IDataStyle_change_ownership(this, swigCPtr, true); } public hep.aida.ILineStyle lineStyle() { return new ILineStyle(AIDAJNI.IDataStyle_lineStyle(swigCPtr, this), false); } public hep.aida.IMarkerStyle markerStyle() { return new IMarkerStyle(AIDAJNI.IDataStyle_markerStyle(swigCPtr, this), false); } public hep.aida.IFillStyle fillStyle() { return new IFillStyle(AIDAJNI.IDataStyle_fillStyle(swigCPtr, this), false); } public boolean setLineStyle(hep.aida.ILineStyle lineStyle) { return AIDAJNI.IDataStyle_setLineStyle(swigCPtr, this, ILineStyle.getCPtr(lineStyle), (hep.aida.ILineStyle)lineStyle); } public boolean setMarkerStyle(hep.aida.IMarkerStyle markerStyle) { return AIDAJNI.IDataStyle_setMarkerStyle(swigCPtr, this, IMarkerStyle.getCPtr(markerStyle), (hep.aida.IMarkerStyle)markerStyle); } public boolean setFillStyle(hep.aida.IFillStyle fillStyle) { return AIDAJNI.IDataStyle_setFillStyle(swigCPtr, this, IFillStyle.getCPtr(fillStyle), (hep.aida.IFillStyle)fillStyle); } public IDataStyle() { this(AIDAJNI.new_IDataStyle(), true); AIDAJNI.IDataStyle_director_connect(this, swigCPtr, swigCMemOwn, true); } }