public void setCurveType(int mode) {
    // Change the curve display type
	switch (mode) {
	  case POLY:
	  case NAT_SPL:
	    this.mode = mode;
	    break;
	  default:
	    throw new IllegalArgumentException();
	}
    }