BrightSide Workbench Full Report + Source Code
org.turro.zkoss.input.Percentbox Class Reference
Inheritance diagram for org.turro.zkoss.input.Percentbox:
Collaboration diagram for org.turro.zkoss.input.Percentbox:

Public Member Functions

 Percentbox ()
 
double getMaxPercent ()
 
void setMaxPercent (double maxPercent)
 
Double getValue () throws WrongValueException
 
void setValue (Double value) throws WrongValueException
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 27 of file Percentbox.java.

Constructor & Destructor Documentation

◆ Percentbox()

org.turro.zkoss.input.Percentbox.Percentbox ( )

Definition at line 31 of file Percentbox.java.

31  {
32  setCols(5);
33  setStep(1.0);
34  setFormat("##0.0");
35  }

Member Function Documentation

◆ getMaxPercent()

double org.turro.zkoss.input.Percentbox.getMaxPercent ( )

Definition at line 37 of file Percentbox.java.

37  {
38  return maxPercent;
39  }

◆ getValue()

Double org.turro.zkoss.input.Percentbox.getValue ( ) throws WrongValueException

Definition at line 46 of file Percentbox.java.

46  {
47  Object val = getTargetValue();
48  if(val instanceof Number) {
49  return ((Number) val).doubleValue() / 100.0d;
50  }
51  return 1.0d;
52  }
Here is the caller graph for this function:

◆ setMaxPercent()

void org.turro.zkoss.input.Percentbox.setMaxPercent ( double  maxPercent)

Definition at line 41 of file Percentbox.java.

41  {
42  this.maxPercent = maxPercent;
43  }

◆ setValue()

void org.turro.zkoss.input.Percentbox.setValue ( Double  value) throws WrongValueException

Definition at line 55 of file Percentbox.java.

55  {
56  value = Math.max(Math.min(value, maxPercent), 0.0d);
57  super.setValue(Double.valueOf(value * 100.0d));
58  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: