/* ----------------------------------------------------------------------------
* 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 IAxisStyle extends IBaseStyle implements hep.aida.IAxisStyle {
private long swigCPtr;
public IAxisStyle(long cPtr, boolean cMemoryOwn) {
super(AIDAJNI.SWIGIAxisStyleUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(hep.aida.IAxisStyle obj) {
if (obj instanceof IAxisStyle) {
return (obj == null) ? 0 : ((IAxisStyle)obj).swigCPtr;
} else {
long cPtr = AIDAJNI.new_IAxisStyle();
// FIXME, memory leak if Java class gets finalized, since C++ director is not freed.
AIDAJNI.IAxisStyle_director_connect(obj, cPtr, true, true);
return cPtr;
}
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
AIDAJNI.delete_IAxisStyle(swigCPtr);
}
swigCPtr = 0;
super.delete();
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
AIDAJNI.IAxisStyle_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
AIDAJNI.IAxisStyle_change_ownership(this, swigCPtr, true);
}
public hep.aida.ILineStyle lineStyle() {
return new ILineStyle(AIDAJNI.IAxisStyle_lineStyle(swigCPtr, this), false);
}
public hep.aida.ITextStyle tickLabelStyle() {
return new ITextStyle(AIDAJNI.IAxisStyle_tickLabelStyle(swigCPtr, this), false);
}
public hep.aida.ITextStyle labelStyle() {
return new ITextStyle(AIDAJNI.IAxisStyle_labelStyle(swigCPtr, this), false);
}
public boolean setlineStyle(hep.aida.ILineStyle lineStyle) {
return AIDAJNI.IAxisStyle_setlineStyle(swigCPtr, this, ILineStyle.getCPtr(lineStyle), (hep.aida.ILineStyle)lineStyle);
}
public boolean setTickLabelStyle(hep.aida.ITextStyle tickLabelStyle) {
return AIDAJNI.IAxisStyle_setTickLabelStyle(swigCPtr, this, ITextStyle.getCPtr(tickLabelStyle), (hep.aida.ITextStyle)tickLabelStyle);
}
public boolean setLabelStyle(hep.aida.ITextStyle labelStyle) {
return AIDAJNI.IAxisStyle_setLabelStyle(swigCPtr, this, ITextStyle.getCPtr(labelStyle), (hep.aida.ITextStyle)labelStyle);
}
public void setLabel(String label) {
AIDAJNI.IAxisStyle_setLabel(swigCPtr, this, label);
}
public IAxisStyle() {
this(AIDAJNI.new_IAxisStyle(), true);
AIDAJNI.IAxisStyle_director_connect(this, swigCPtr, swigCMemOwn, true);
}
}