Package com.inet.report.chart.axis
Class AbstractMarker
- java.lang.Object
-
- com.inet.report.chart.axis.AbstractMarker
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
IntervalMarker
,LineMarker
public abstract class AbstractMarker extends java.lang.Object implements java.io.Serializable
Basic class to create markers in a chart plot.- Since:
- 8.0
- See Also:
LineMarker
,IntervalMarker
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static float
DEFAULT_ALPHA
Default alpha transparency value of the marker.static int
DEFAULT_COLOR
Default line marker color (a ABGR value representation).static int
DEFAULT_LINE_STYLE
Default line style of the marker.static int
DEFAULT_LINE_WIDTH
Default line width of the marker.static double
DEFAULT_VALUE
Default value.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMarker()
Protected constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColor()
Returns the color of the line or area of this marker.int
getLineStyle()
Returns the marker's line style.int
getLineWidth()
Returns the line width in twips.static java.util.List<FormulaField>
getMarkerReferencesIfExist(com.inet.report.chart.axis.MarkerAxis... axis)
Get all references to FormulaFields for all given Marker-Axis.protected java.lang.StringBuilder
getSubProperties(int depth)
Returns the serialized properties of subclasses.void
readProperties(org.w3c.dom.Element element, Chart2 chart)
Loads the XML properties of a marker.void
setColor(int markerColor)
Sets the color of the line or area of this marker.void
setLineStyle(int lineStyle)
Sets the marker's line style.void
setLineWidth(int lineWidth)
Sets the marker line width in twips.
-
-
-
Field Detail
-
DEFAULT_COLOR
public static final int DEFAULT_COLOR
Default line marker color (a ABGR value representation).- See Also:
- Constant Field Values
-
DEFAULT_LINE_STYLE
public static final int DEFAULT_LINE_STYLE
Default line style of the marker.- See Also:
- Constant Field Values
-
DEFAULT_LINE_WIDTH
public static final int DEFAULT_LINE_WIDTH
Default line width of the marker.- See Also:
- Constant Field Values
-
DEFAULT_ALPHA
public static final float DEFAULT_ALPHA
Default alpha transparency value of the marker.- See Also:
- Constant Field Values
-
DEFAULT_VALUE
public static final double DEFAULT_VALUE
Default value. This value has a marker without initializing the value property.- See Also:
- Constant Field Values
-
-
Method Detail
-
getColor
public int getColor()
Returns the color of the line or area of this marker.- Returns:
- the ABGR value representing the marker color
- Since:
- 8.0
- See Also:
setColor(int)
,ColorUtils.toJavaColor(int)
-
setColor
public void setColor(int markerColor)
Sets the color of the line or area of this marker.- Parameters:
markerColor
- the ABGR value representing the marker color- Throws:
java.lang.IllegalArgumentException
- if the color isRDC.COLOR_NO_COLOR
.- Since:
- 8.0
- See Also:
getColor()
,ColorUtils.toCcColor(Color)
-
getLineStyle
public int getLineStyle()
Returns the marker's line style. Has no effect by a interval marker.- Returns:
- the line style of the marker
- Since:
- 8.0
- See Also:
setLineStyle(int)
,BorderPropertiesConstants.LINE_STYLE_DASHED
,BorderPropertiesConstants.LINE_STYLE_DOTTED
,BorderPropertiesConstants.LINE_STYLE_SINGLE
,BorderPropertiesConstants.NO_LINE
,DEFAULT_LINE_STYLE
-
setLineStyle
public void setLineStyle(int lineStyle)
Sets the marker's line style. Has no effect by a interval marker.- Parameters:
lineStyle
- the line style of the marker- Throws:
java.lang.IllegalArgumentException
- by unsupported line style.- Since:
- 8.0
- See Also:
getLineStyle()
,BorderPropertiesConstants.LINE_STYLE_DASHED
,BorderPropertiesConstants.LINE_STYLE_DOTTED
,BorderPropertiesConstants.LINE_STYLE_SINGLE
,BorderPropertiesConstants.NO_LINE
,DEFAULT_LINE_STYLE
-
getLineWidth
public int getLineWidth()
Returns the line width in twips.- Returns:
- the line width.
- Since:
- 8.0
- See Also:
setLineWidth(int)
-
setLineWidth
public void setLineWidth(int lineWidth)
Sets the marker line width in twips.- Parameters:
lineWidth
- the line width- Throws:
java.lang.IllegalArgumentException
- if width is less than 1.- Since:
- 8.0
- See Also:
getLineWidth()
,DEFAULT_LINE_WIDTH
-
getSubProperties
protected java.lang.StringBuilder getSubProperties(int depth)
Returns the serialized properties of subclasses.- Parameters:
depth
- the depth of XML indent- Returns:
- the properties.
- Since:
- 8.0
-
readProperties
public void readProperties(org.w3c.dom.Element element, Chart2 chart)
Loads the XML properties of a marker.- Parameters:
element
- DOM element to read marker properties fromchart
- the Chart this marker belongs to, not null- Since:
- 8.0
-
getMarkerReferencesIfExist
public static java.util.List<FormulaField> getMarkerReferencesIfExist(com.inet.report.chart.axis.MarkerAxis... axis)
Get all references to FormulaFields for all given Marker-Axis.- Parameters:
axis
- all axis to get referenced FormulaFields for- Returns:
- a list with references fields, not null.
- Since:
- 11.2
-
-