/** Set the current value. If AST fails then a simple double value is shown. */ public void setDoubleValue(double value) { if (value == AstDouble.BAD) { setText(""); } else { setText(controller.getPlotCurrentFrame().format(axis, value)); } }
/** Get the current value as double precision. If this fails then AstDouble.BAD is returned. */ public double getDoubleValue() { String text = getText(); if (text.equals("") || text.equals("<bad>")) { return AstDouble.BAD; } return controller.getPlotCurrentFrame().unformat(axis, text); }