/* ----------------------------------------------------------------------------
* 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 ILineStyle extends IBrushStyle implements hep.aida.ILineStyle {
private long swigCPtr;
public ILineStyle(long cPtr, boolean cMemoryOwn) {
super(AIDAJNI.SWIGILineStyleUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(hep.aida.ILineStyle obj) {
if (obj instanceof ILineStyle) {
return (obj == null) ? 0 : ((ILineStyle)obj).swigCPtr;
} else {
long cPtr = AIDAJNI.new_ILineStyle();
// FIXME, memory leak if Java class gets finalized, since C++ director is not freed.
AIDAJNI.ILineStyle_director_connect(obj, cPtr, true, true);
return cPtr;
}
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
AIDAJNI.delete_ILineStyle(swigCPtr);
}
swigCPtr = 0;
super.delete();
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
AIDAJNI.ILineStyle_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
AIDAJNI.ILineStyle_change_ownership(this, swigCPtr, true);
}
public String[] availableLineTypes() {
return AIDAJNIUtil.toStringArray(AIDAJNI.ILineStyle_availableLineTypes(swigCPtr, this));
}
public String lineType() {
return AIDAJNI.ILineStyle_lineType(swigCPtr, this);
}
public int thickness() {
return AIDAJNI.ILineStyle_thickness(swigCPtr, this);
}
public boolean setLineType(String newLineType) {
return AIDAJNI.ILineStyle_setLineType(swigCPtr, this, newLineType);
}
public boolean setThickness(int newThickness) {
return AIDAJNI.ILineStyle_setThickness(swigCPtr, this, newThickness);
}
public ILineStyle() {
this(AIDAJNI.new_ILineStyle(), true);
AIDAJNI.ILineStyle_director_connect(this, swigCPtr, swigCMemOwn, true);
}
}