18 package org.turro.zkoss.input;
20 import org.zkoss.zk.ui.WrongValueException;
21 import org.zkoss.zul.Doublespinner;
29 private double maxPercent = 1.0d;
42 this.maxPercent = maxPercent;
46 public Double
getValue() throws WrongValueException {
47 Object val = getTargetValue();
48 if(val instanceof Number) {
49 return ((Number) val).doubleValue() / 100.0d;
55 public void setValue(Double value)
throws WrongValueException {
56 value = Math.max(Math.min(value, maxPercent), 0.0d);
57 super.setValue(Double.valueOf(value * 100.0d));