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:
-
Field Summary
Fields inherited from class AbstractPortletDto
dragDropEnabled, layout, resizingEnabled
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSector
(BigDecimal upperBound, String color) Add a GaugeSector contained in this Gauge.getMax()
The maximum dial value.getMin()
The minimum dial value.The label prefix.getValue()
The current value on the dial.void
setMax
(BigDecimal maxValue) The maximum dial value.void
setMin
(BigDecimal minValue) The minimum dial value.void
Set the label prefix.void
The label suffix.void
setValue
(BigDecimal value) The current value on the dial.Methods inherited from class AbstractPortletDto
layout, setLayout, value, withDragDrop, withHeight, withHeight, withLayout, withLayout, withLayout, withResizing, withWidth, withWidth
-
Constructor Details
-
ResultGauge
public ResultGauge()
-
-
Method Details
-
getValue
The current value on the dial.- Returns:
- BigDecimal
-
setValue
The current value on the dial.- Parameters:
value
- the new dial value. Must be between minValue and maxValue. Default value is 0
-
getMin
The minimum dial value.- Returns:
- BigDecimal
-
setMin
The minimum dial value.- Parameters:
minValue
- the new minimum dial value. Must be at least 1 less than the maximum dial value. IfminValue
is not at least 1 less than the maximum value, then it is set tomaxValue - 1
.. Default value is 0
-
getMax
The maximum dial value.- Returns:
- BigDecimal
-
setMax
The maximum dial value.- Parameters:
maxValue
- the new maximum dial value. Must be at least 1 greater than the minimum dial value. IfmaxValue
is not at least 1 greater than the minimum value, then it is set to1 + minValue
.. Default value is 100
-
addSector
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
-
getSuffix
-
setSuffix
The label suffix.- Parameters:
suffix
- the new label suffix.. Default value is "%"
-
getPrefix
The label prefix.- Returns:
- String
-
setPrefix
Set the label prefix.- Parameters:
prefix
- the new label prefix.. Default value is ""
-
getResultType
- Specified by:
getResultType
in interfaceComplexCalculationResult
-