Package com.uc4.api.objects
Class CockpitValueControl
- java.lang.Object
-
- com.uc4.api.objects.CockpitControl
-
- com.uc4.api.objects.CockpitValueControl
-
- Direct Known Subclasses:
CockpitBar
,CockpitBox
,CockpitLamp
,CockpitPie
,CockpitTrafficLights
public abstract class CockpitValueControl extends CockpitControl
Basis for all Cockpit control with values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CockpitValueControl.ValueFormat
Format of the 2nd caption of theCockpitControl
.
-
Field Summary
Fields Modifier and Type Field Description protected CockpitControlDataSource
dataSource
protected boolean
minColorRed
protected CockpitThresholds
thresholds
protected CockpitValueControl.ValueFormat
valueFormat
-
Constructor Summary
Constructors Modifier Constructor Description protected
CockpitValueControl(com.uc4.util.XMLDocument doc, org.w3c.dom.Element control)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CockpitControlDataSource
dataSource()
Returns theCockpitControlDataSource
of theCockpitControl
.CockpitValueControl.ValueFormat
getValueFormat()
Returns the format of the 2nd caption.boolean
isMinColorRed()
Returnstrue
if the color for the minimum value is red,false
if the color for the minimum value is green.void
setMinColorRed(boolean minColorRed)
Sets the color for the minimum value to red.void
setValueFormat(CockpitValueControl.ValueFormat valueFormat)
Sets the format of the 2nd caption.CockpitThresholds
thresholds()
Returns theCockpitThresholds
of theCockpitControl
.-
Methods inherited from class com.uc4.api.objects.CockpitControl
getCaption, getHeight, getId, getLeft, getTop, getWidth, setCaption, setHeight, setLeft, setTop, setWidth, store
-
-
-
-
Field Detail
-
valueFormat
protected CockpitValueControl.ValueFormat valueFormat
-
minColorRed
protected boolean minColorRed
-
thresholds
protected final CockpitThresholds thresholds
-
dataSource
protected CockpitControlDataSource dataSource
-
-
Method Detail
-
thresholds
public CockpitThresholds thresholds()
Returns theCockpitThresholds
of theCockpitControl
.- Returns:
- use thresholds
-
dataSource
public CockpitControlDataSource dataSource()
Returns theCockpitControlDataSource
of theCockpitControl
.- Returns:
- CockpitControlDataSource
-
getValueFormat
public CockpitValueControl.ValueFormat getValueFormat()
Returns the format of the 2nd caption.- Returns:
- ValueFormat
-
setValueFormat
public void setValueFormat(CockpitValueControl.ValueFormat valueFormat)
Sets the format of the 2nd caption.- Parameters:
valueFormat
- ValueFormat
-
setMinColorRed
public void setMinColorRed(boolean minColorRed)
Sets the color for the minimum value to red.- Parameters:
minColorRed
- Minimum color is red
-
isMinColorRed
public boolean isMinColorRed()
Returnstrue
if the color for the minimum value is red,false
if the color for the minimum value is green.- Returns:
- color red
-
-