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
Constructor and Description |
---|
nUITrafficChart(float[] data,
float indicator)
Chart constructor for a default traffic light chart type
(linear, vertical).
|
nUITrafficChart(float[] data,
float indicator,
int type)
Chart constructor for a traffic light chart, either linear or
angular type.
|
nUITrafficChart(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
applyBackground, applyBackground, applyBackground
getBackgroundDrawable, getBottom, getElementIdentifier, getFocusable, getGesturable, getInnerHeight, getInnerY, getLeft, getMaxChildX, getMaxChildY, getProperties, getProperty, getRight, getScreenInnerX, getScreenInnerY, getScreenX, getScreenY, getTop, getTopLevelParentView, getTopLevelParentWindow, getTriggerable, getX, getY, insertAtInternal, isEnabled, isVisible, onRemoved, remove, setBackgroundDrawable, setBottom, setElementIdentifier, setEnabled, setFocusable, setGesturable, setInnerHeight, setInnerWidth, setInnerX, setInnerY, setLeft, setProperties, setProperty, setRight, setTop, setTriggerable, setVisible, setX, setY
add, addEventListener, childElementAt, childIndexOf, getFirstChild, getId, getLastChild, getNextSibling, getParent, getPrevSibling, getTag, insertAfter, insertAt, insertBefore, outputChildHierarchy, remove, removeEventListener, replace, replace, setId, setTag, setUnlinkChildrenOnRemoval
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setBackgroundDrawable
public static final int TYPE_LINEAR
public static final int TYPE_ANGULAR
public nUITrafficChart(float[] data, float indicator) throws java.lang.IllegalArgumentException
data
- The data used to render this chartindicator
- The value to mark with the indicator
'needle'java.lang.IllegalArgumentException
public nUITrafficChart(float[] data, float indicator, int type) throws java.lang.IllegalArgumentException
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(float[] data, float indicator, int type, int orientation) throws java.lang.IllegalArgumentException
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