Class ResultGauge

Object
AbstractPortletDto
ResultGauge
All Implemented Interfaces:
Serializable, Portlet, ComplexCalculationResult

public class ResultGauge extends AbstractPortletDto implements ComplexCalculationResult
The Gauge widget class implements a graphical speedometer-style gauge for displaying a measurement by means of a needle on a dial. The dial is divided into sectors, each having its own color and value.
See Also:
  • Constructor Details

    • ResultGauge

      public ResultGauge()
  • Method Details

    • getValue

      public BigDecimal getValue()
      The current value on the dial.
      Returns:
      BigDecimal
    • setValue

      public void setValue(BigDecimal value)
      The current value on the dial.
      Parameters:
      value - the new dial value. Must be between minValue and maxValue. Default value is 0
    • getMin

      public BigDecimal getMin()
      The minimum dial value.
      Returns:
      BigDecimal
    • setMin

      public void setMin(BigDecimal minValue)
      The minimum dial value.
      Parameters:
      minValue - the new minimum dial value. Must be at least 1 less than the maximum dial value. If minValue is not at least 1 less than the maximum value, then it is set to maxValue - 1.. Default value is 0
    • getMax

      public BigDecimal getMax()
      The maximum dial value.
      Returns:
      BigDecimal
    • setMax

      public void setMax(BigDecimal maxValue)
      The maximum dial value.
      Parameters:
      maxValue - the new maximum dial value. Must be at least 1 greater than the minimum dial value. If maxValue is not at least 1 greater than the minimum value, then it is set to 1 + minValue.. Default value is 100
    • addSector

      public void addSector(BigDecimal upperBound, String color)
      Add a GaugeSector contained in this Gauge. If this this property is not specified, the gauge will be created with a default sector filling the gauge.
      Parameters:
      upperBound -
      color -
    • getSectors

      public List<Map<String,Object>> getSectors()
    • getSuffix

      public String getSuffix()
    • setSuffix

      public void setSuffix(String suffix)
      The label suffix.
      Parameters:
      suffix - the new label suffix.. Default value is "%"
    • getPrefix

      public String getPrefix()
      The label prefix.
      Returns:
      String
    • setPrefix

      public void setPrefix(String prefix)
      Set the label prefix.
      Parameters:
      prefix - the new label prefix.. Default value is ""
    • getResultType

      public String getResultType()
      Specified by:
      getResultType in interface ComplexCalculationResult