double percentage = -1.0;
if (getDataModel() instanceof DoubleModel) {
percentage = ((DoubleModel) getDataModel()).getDouble();
} else if (getDataModel() instanceof LimitIntModel) {
LimitIntModel lim = (LimitIntModel) getDataModel();
percentage = (double) (lim.getInt() - lim.getLowLimit()) / (double) (lim.getHighLimit() - lim.getLowLimit());
} else if (getDataModel() instanceof IntModel) {
percentage = ((IntModel) getDataModel()).getInt() / 100.0;
}
if (percentage < 0.0) {