public class nUITrafficChart extends nUIDataSeriesChart
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_ANGULAR
Traffic chart types
|
static int |
TYPE_LINEAR
Traffic chart types
|
DEFAULT_BORDER_THICKNESS, NUM_RENDER_STYLES, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL, RENDER_STYLE_FLAT, RENDER_STYLE_GRADIENT
Y_IDENTIFIER_PREV_BOTTOM
COLOR_BACKGROUND_NORMAL, COLOR_BLACK, COLOR_FOREGROUND_DARK, COLOR_FOREGROUND_LIGHT, COLOR_FOREGROUND_NORMAL, COLOR_TRANSPARENT, COLOR_WHITE, DIMENSIONS_IDENTIFIER_PARENT_DIMENSIONS
event_listener, event_listener_exclusive, first_child, last_child, next_sibling, nuiid, parent, prev_sibling, unlink_children_on_removal_from_parent
Constructor and Description |
---|
nUITrafficChart(int nuiid,
float[] data,
float indicator)
Chart constructor for a default traffic light chart type
(linear, vertical).
|
nUITrafficChart(int nuiid,
float[] data,
float indicator,
int type)
Chart constructor for a traffic light chart, either linear or
angular type.
|
nUITrafficChart(int nuiid,
float[] data,
float indicator,
int type,
int orientation)
Chart constructor for a traffic light chart, either linear or
angular type.
|
Modifier and Type | Method and Description |
---|---|
int |
getDefaultNumColors()
Gets the default number of colours that would be used to render this chart.
|
float |
getIndicator()
Gets the current indicator value.
|
int |
getIndicatorColor()
Gets the current color for the indicator
|
int |
getOrientation()
Gets the orientation of the chart.
|
int |
getType()
Gets the current chart type (linear or angular).
|
void |
renderImage()
Render the chart data, creating the
image for
the nUIImageElement |
void |
setDefaults()
Sets all default values for this chart type.
|
void |
setIndicator(float indicator)
Sets the value for the chart indicator (the 'needle' or bar)
that appears to highlight a certain position.
|
void |
setIndicatorColor(int indicator_color)
Sets the color for the indicator
|
void |
setOrientation(int orientation)
Sets the orientation of the chart to vertical or horizontal.
|
void |
setType(int type)
Sets the type of the chart to linear or angular.
|
getDataLabels, getTickFrequency, renderDataLabels, setDataLabels, setDataLabelStrings, setTickFrequency
clearChartBodyPadding, getAxisLabelTextColor, getBackgroundColor, getBestGuessScale, getBorderColor, getBorderThickness, getData, getDataColor, getDataColors, getHeight, getImage, getNumColors, getOutlineColor, getOutlineThickness, getTickLabelTextColor, getWidth, setAxisLabelTextColor, setBackgroundColor, setBestGuessScale, setBorderColor, setBorderThickness, setChartBodyPadding, setChartBodyPadding, setData, setData, setData, setDataColors, setHeight, setImage, setOutlineColor, setOutlineThickness, setRenderStyle, setSize, setTickLabelTextColor, setWidth, suggestLineThickness
getAlign, getInnerWidth, getInnerX, setAlign
getY, insertAt
getBackgroundDrawable, getBgcolor, getBottom, getFocus, getFocusable, getGesturable, getInnerHeight, getInnerY, getLeft, getMaxChildX, getMaxChildY, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getX, insertAtInternal, isEnabled, onRemoved, remove, setBackgroundDrawable, setBgcolor, setBottom, setChildFocus, setEnabled, setFocus, setFocusable, setGesturable, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setRight, setTop, setTriggerable, setX, setY
add, addEventListener, childElementAt, childIndexOf, getTag, insertAfter, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace, setTag
public static final int TYPE_LINEAR
public static final int TYPE_ANGULAR
public nUITrafficChart(int nuiid, float[] data, float indicator) throws java.lang.IllegalArgumentException
nuiid
- Unique Native UI ID (or -1 if unidentified)data
- The data used to render this chartindicator
- The value to mark with the indicator
'needle'java.lang.IllegalArgumentException
public nUITrafficChart(int nuiid, float[] data, float indicator, int type) throws java.lang.IllegalArgumentException
nuiid
- Unique Native UI ID (or -1 if unidentified)data
- The data used to render this chartindicator
- The value to mark with the indicator
'needle'type
- Either TYPE_LINEAR
or
TYPE_ANGULAR
java.lang.IllegalArgumentException
public nUITrafficChart(int nuiid, float[] data, float indicator, int type, int orientation) throws java.lang.IllegalArgumentException
nuiid
- Unique Native UI ID (or -1 if unidentified)data
- The data used to render this chartindicator
- The value to mark with the indicator
'needle'type
- Either TYPE_LINEAR
or
TYPE_ANGULAR
orientation
- Either nUIChartImage.ORIENTATION_VERTICAL
or
nUIChartImage.ORIENTATION_HORIZONTAL
java.lang.IllegalArgumentException
public void setDefaults()
nUIChartImage
setDefaults
in class nUIDataSeriesChart
public void setIndicator(float indicator)
indicator
- floating point value in the same range as
the data valuespublic float getIndicator()
public void setIndicatorColor(int indicator_color)
indicator_color
- AARRGGBB colorpublic int getIndicatorColor()
public void setType(int type)
type
- Either TYPE_LINEAR or
TYPE_ANGULARpublic int getType()
public void setOrientation(int orientation)
nUIChartImage
.orientation
- Either nUIChartImage.ORIENTATION_VERTICAL or
nUIChartImage.ORIENTATION_HORIZONTALpublic int getOrientation()
public int getDefaultNumColors()
nUIChartImage
getDefaultNumColors
in class nUIChartImage
public void renderImage()
image
for
the nUIImageElement