use of javax.media.jai.InterpolationBicubic in project sldeditor by robward-scisys.
the class InterpolationValues method setValue.
/*
* (non-Javadoc)
*
* @see
* com.sldeditor.rendertransformation.types.RenderTransformValueInterface#setValue(java.lang.
* Object)
*/
@Override
public void setValue(Object aValue) {
this.value = null;
this.expression = null;
if (aValue instanceof LiteralExpressionImpl) {
String displayName = ((Expression) aValue).toString();
if (InterpolationNearest.class.getSimpleName().compareTo(displayName) == 0) {
value = new InterpolationNearest();
} else if (InterpolationBilinear.class.getSimpleName().compareTo(displayName) == 0) {
value = new InterpolationBilinear();
} else if (displayName.startsWith(InterpolationBicubic2.class.getSimpleName())) {
sampleBits = extractSampleBits(INTERPOLATION_BICUBIC2_PATTERN_MATCH, displayName);
value = new InterpolationBicubic2(sampleBits);
} else if (displayName.startsWith(InterpolationBicubic.class.getSimpleName())) {
sampleBits = extractSampleBits(INTERPOLATION_BICUBIC_PATTERN_MATCH, displayName);
value = new InterpolationBicubic(sampleBits);
}
} else if ((aValue instanceof AttributeExpressionImpl) || (aValue instanceof FunctionExpressionImpl) || (aValue instanceof MathExpressionImpl)) {
this.expression = (Expression) aValue;
}
}
Aggregations