Package org.netxms.client.datacollection
Class GraphItem
java.lang.Object
org.netxms.client.datacollection.GraphItem
This class represents single graph item (DCI)
-
Constructor Summary
ConstructorDescriptionCreate graph item object with default valuesGraphItem
(long nodeId, long dciId, String name, String description, String displayFormat, int lineChartType, int color) Constructor for ITEM typeGraphItem
(long nodeId, long dciId, String name, String description, String instance, String dataColumn, String displayFormat) Constructor for TABLE typeConstructor for ad-hoc ITEM type (without related server-side DCI)GraphItem
(ChartDciConfig dciConfig) Constructor for ITEM type from chart DCI configurationConstructor for ITEM type from existing DCI valueConstructor for ITEM type from existing DCI value and applied styling -
Method Summary
Modifier and TypeMethodDescriptionint
getColor()
long
getDciId()
int
int
Get configured measurement unit.getName()
long
int
getType()
boolean
isArea
(boolean defaultIsArea) Check if display type set to "area".boolean
boolean
void
setColor
(int color) void
setDataColumn
(String dataColumn) void
setDciId
(long dciId) void
setDescription
(String description) void
setDisplayFormat
(String displayFormat) void
setInstance
(String instance) void
setInverted
(boolean inverted) void
setLineChartType
(int lineChartType) void
setLineWidth
(int lineWidth) void
setMeasurementUnit
(MeasurementUnit measurementUnit) Set measurement unit to use.void
void
setNodeId
(long nodeId) void
setShowThresholds
(boolean showThresholds) void
setType
(int type) toString()
-
Constructor Details
-
GraphItem
public GraphItem()Create graph item object with default values -
GraphItem
public GraphItem(long nodeId, long dciId, String name, String description, String displayFormat, int lineChartType, int color) Constructor for ITEM type- Parameters:
nodeId
- The node IDdciId
- The dci IDname
- The namedescription
- The descriptiondisplayFormat
- The display formatlineChartType
- item line chart type (line or area)color
- item color (-1 to use palette default)
-
GraphItem
Constructor for ad-hoc ITEM type (without related server-side DCI)- Parameters:
name
- The namedescription
- The descriptiondisplayFormat
- The display format
-
GraphItem
Constructor for ITEM type from existing DCI value- Parameters:
dciValue
- DCI valuedisplayFormat
- The display format
-
GraphItem
Constructor for ITEM type from existing DCI value and applied styling- Parameters:
dciValue
- DCI valuedisplayFormat
- The display formatlineChartType
- item line chart type (line or area)color
- item color (-1 to use palette default)
-
GraphItem
Constructor for ITEM type from chart DCI configuration- Parameters:
dciConfig
- DCI configuration
-
GraphItem
public GraphItem(long nodeId, long dciId, String name, String description, String instance, String dataColumn, String displayFormat) Constructor for TABLE type- Parameters:
nodeId
- The node IDdciId
- The dci IDname
- The namedescription
- The descriptioninstance
- The instancedataColumn
- The data columndisplayFormat
- The display format
-
-
Method Details
-
getNodeId
public long getNodeId()- Returns:
- the nodeId
-
setNodeId
public void setNodeId(long nodeId) - Parameters:
nodeId
- the nodeId to set
-
getDciId
public long getDciId()- Returns:
- the dciId
-
setDciId
public void setDciId(long dciId) - Parameters:
dciId
- the dciId to set
-
getName
- Returns:
- the name
-
setName
- Parameters:
name
- the name to set
-
getDescription
- Returns:
- the description
-
setDescription
- Parameters:
description
- the description to set
-
getType
public int getType()- Returns:
- the type
-
setType
public void setType(int type) - Parameters:
type
- the type to set
-
getDataColumn
- Returns:
- the dataColumn
-
setDataColumn
- Parameters:
dataColumn
- the dataColumn to set
-
getInstance
- Returns:
- the instance
-
setInstance
- Parameters:
instance
- the instance to set
-
getDisplayFormat
- Returns:
- the displayFormat
-
setDisplayFormat
- Parameters:
displayFormat
- the displayFormat to set
-
getLineChartType
public int getLineChartType()- Returns:
- the displayType
-
setLineChartType
public void setLineChartType(int lineChartType) - Parameters:
lineChartType
- new line chart type
-
isArea
public boolean isArea(boolean defaultIsArea) Check if display type set to "area".- Parameters:
defaultIsArea
- true if chart's default line chart type is AREA- Returns:
- true if display type set to "area".
-
getColor
public int getColor()- Returns:
- the color
-
setColor
public void setColor(int color) - Parameters:
color
- the color to set
-
getLineWidth
public int getLineWidth()- Returns:
- the lineWidth
-
setLineWidth
public void setLineWidth(int lineWidth) - Parameters:
lineWidth
- the lineWidth to set
-
isShowThresholds
public boolean isShowThresholds()- Returns:
- the showThresholds
-
setShowThresholds
public void setShowThresholds(boolean showThresholds) - Parameters:
showThresholds
- the showThresholds to set
-
isInverted
public boolean isInverted()- Returns:
- the inverted
-
setInverted
public void setInverted(boolean inverted) - Parameters:
inverted
- the inverted to set
-
getMeasurementUnit
Get configured measurement unit.- Returns:
- measurement unit or null
-
setMeasurementUnit
Set measurement unit to use.- Parameters:
measurementUnit
- new measurement unit
-
toString
-