public class MetricLabel extends BaseLabel
a_aboveGauge, a_belowGauge, a_insideGauge, a_insideGaugeLeft, a_insideGaugeRight, a_none, a_withBottomLabel, lp_abovegauge, lp_belowgauge, lp_insidegauge, lp_insidegauge_left, lp_insidegauge_right, lp_none, lp_withbottomlabel, m_defaultPosition, m_positionKey
m_defaultFont, m_defaultFontColor, m_fontColorKey, m_fontKey, m_isGaugeSetComponent
m_commonGauge, m_compType
Constructor and Description |
---|
MetricLabel(CommonGauge gauge) |
Modifier and Type | Method and Description |
---|---|
int |
getNumberType()
Gets the type of number displayed in metric label.
|
int |
getPosition()
Returns the position of the label.
|
ViewFormat |
getViewFormat()
Retrieves a
ViewFormat object for tick labels. |
void |
setNumberType(int type)
Sets the type of number to be displayed in metric label.
|
void |
setPosition(int position)
Specifies the position of the label.
|
void |
setViewFormat(ViewFormat viewFormat)
Specifies a
ViewFormat object for tick labels. |
convertLabelPositionToInt, convertLabelPositionToString
getFont, getFontColor, setFont, setFontColor
getComponentName, getComponentType, selectObject
public MetricLabel(CommonGauge gauge)
public ViewFormat getViewFormat()
ViewFormat
object for tick labels.
The ViewFormat
objects allow you to format numbers.ViewFormat
object for tick labels.public void setViewFormat(ViewFormat viewFormat)
ViewFormat
object for tick labels.
The ViewFormat
objects allow you to format numbers.viewFormat
- A ViewFormat
object for this label.public int getNumberType()
Gauge
beginning with
NT_
public void setNumberType(int type)
type
- Integer representing the type of number intended
for display in this gauge; valid values are constants
in the Gauge
class beginning with
NT_
public int getPosition()
getPosition
in class BaseLabel
GaugeAttributes.LP_NONE
,
GaugeAttributes.LP_BELOW_GAUGE
,
GaugeAttributes.LP_WITH_BOTTOM_LABEL
,
GaugeAttributes.LP_INSIDE_GAUGE
.
For statusmeter gauges, the following values are also supported:
GaugeAttributes.LP_INSIDE_GAUGE_LEFT
,
GaugeAttributes.LP_INSIDE_GAUGE_RIGHT
.public void setPosition(int position)
setPosition
in class BaseLabel
position
- the integer constant that represents where the label is placed. The following values
are supported for all gauge types:
GaugeAttributes.LP_NONE
,
GaugeAttributes.LP_BELOW_GAUGE
,
GaugeAttributes.LP_WITH_BOTTOM_LABEL
,
GaugeAttributes.LP_INSIDE_GAUGE
.
For statusmeter gauges, the following values are also supported:
GaugeAttributes.LP_INSIDE_GAUGE_LEFT
,
GaugeAttributes.LP_INSIDE_GAUGE_RIGHT
.