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, messages, resizingEnabled -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSector(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.voidsetMax(BigDecimal maxValue) The maximum dial value.voidsetMin(BigDecimal minValue) The minimum dial value.voidSet the label prefix.voidThe label suffix.voidsetValue(BigDecimal value) The current value on the dial.Methods inherited from class AbstractPortletDto
getLabelOverride, layout, setLabelOverride, setLayout, value, withDragDrop, withError, withHeight, withHeight, withInfo, withLabelOverride, withLayout, withLayout, withLayout, withResizing, withTab, withWarning, 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. IfminValueis 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. IfmaxValueis 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:
getResultTypein interfaceComplexCalculationResult
-