use of maspack.geometry.Rectangle2d in project artisynth_core by artisynth.
the class RectangleField method textToValue.
public Object textToValue(String text, BooleanHolder corrected, StringHolder errMsg) {
corrected.value = false;
Object value = super.textToValue(text, corrected, errMsg);
if (value == Property.IllegalValue) {
return Property.IllegalValue;
}
if (value instanceof VectorNd) {
VectorNd tmp = (VectorNd) value;
value = new Rectangle2d(tmp.get(0), tmp.get(1), tmp.get(2), tmp.get(3));
}
return validValue(value, errMsg);
}
use of maspack.geometry.Rectangle2d in project artisynth_core by artisynth.
the class ColorBar method setDefaults.
@Override
protected void setDefaults() {
setFont(new Font(defaultFontName, 0, defaultFontSize));
myRenderProps = createDefaultRenderProps();
hAlignment = defaultHAlignment;
vAlignment = defaultVAlignment;
myTextSize = defaultTextSize;
myFontSize = defaultFontSize;
myLoc = new Rectangle2d(defaultLoc);
myColorMap = defaultColorMap;
myValueRange = new DoubleInterval(defaultInterval);
nBarDivisions = defaultBarDivisions;
myTickFractions = new Vector2d(defaultTickFraction);
myLabelPos = new VectorNd(0);
myLabelText = new ArrayList<String>();
myTextOffset = new Vector2d(defaultTextOffset);
myNumberFormat = new NumberFormat(defaultNumberFormat);
myRenderObject = null;
myRenderObjectRebuildRequest = true;
}
Aggregations