addNode("InterpolationMode", cgradient.getInterpolationMode());
addNode("NumGradients", cgradient.getNumGradients());
addNode("GradientRecords", cgradient.getGradientRecords());
}
else if (getUserObject() instanceof Gradient3) {
final Gradient3 cgradient = (Gradient3) getUserObject();
addNode("SpreadMode", cgradient.getSpreadMode());
addNode("InterpolationMode", cgradient.getInterpolationMode());
addNode("NumGradients", cgradient.getNumGradients());
addNode("GradientRecords", cgradient.getGradientRecords());
}
else if (getUserObject() instanceof FocalGradient) {
final FocalGradient cgradient = (FocalGradient) getUserObject();
addNode("SpreadMode", cgradient.getSpreadMode());
addNode("InterpolationMode", cgradient.getInterpolationMode());
addNode("NumGradients", cgradient.getNumGradients());
addNode("GradientRecords", cgradient.getGradientRecords());
addNode("FocalPoint", cgradient.getFocalPoint());
}
else {
throw new IllegalStateException("Error: Unknown gradient type");
}
}