/* ---------------------------------------------------------------------------- * 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 IBrushStyle extends IBaseStyle implements hep.aida.IBrushStyle { private long swigCPtr; public IBrushStyle(long cPtr, boolean cMemoryOwn) { super(AIDAJNI.SWIGIBrushStyleUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IBrushStyle obj) { if (obj instanceof IBrushStyle) { return (obj == null) ? 0 : ((IBrushStyle)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IBrushStyle(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IBrushStyle_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IBrushStyle(swigCPtr); } swigCPtr = 0; super.delete(); } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IBrushStyle_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IBrushStyle_change_ownership(this, swigCPtr, true); } public String[] availableColors() { return AIDAJNIUtil.toStringArray(AIDAJNI.IBrushStyle_availableColors(swigCPtr, this)); } public String color() { return AIDAJNI.IBrushStyle_color(swigCPtr, this); } public double opacity() { return AIDAJNI.IBrushStyle_opacity(swigCPtr, this); } public boolean setColor(String newColor) { return AIDAJNI.IBrushStyle_setColor(swigCPtr, this, newColor); } public boolean setOpacity(double newOpacity) { return AIDAJNI.IBrushStyle_setOpacity(swigCPtr, this, newOpacity); } public IBrushStyle() { this(AIDAJNI.new_IBrushStyle(), true); AIDAJNI.IBrushStyle_director_connect(this, swigCPtr, swigCMemOwn, true); } }