Package org.jfree.chart.plot
Class CategoryMarker
java.lang.Object
org.jfree.chart.plot.Marker
org.jfree.chart.plot.CategoryMarker
- All Implemented Interfaces:
Serializable
,Cloneable
A marker for a category.
Note that for serialization to work correctly, the category key must be an instance of a serializable class.
Note that for serialization to work correctly, the category key must be an instance of a serializable class.
-
Constructor Summary
ConstructorDescriptionCategoryMarker
(Comparable key) Creates a new category marker for the specified category.CategoryMarker
(Comparable key, Paint paint, Stroke stroke) Creates a new category marker.CategoryMarker
(Comparable key, Paint paint, Stroke stroke, Paint outlinePaint, Stroke outlineStroke, float alpha) Creates a new category marker. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Ensures symmetry between super/subclass implementations of equals.boolean
Tests the marker for equality with an arbitrary object.boolean
Returns the flag that controls whether the marker is drawn as a region or a line.getKey()
Returns the key.int
hashCode()
void
setDrawAsLine
(boolean drawAsLine) Sets the flag that controls whether the marker is drawn as a region or as a line, and sends aMarkerChangeEvent
to all registered listeners.void
setKey
(Comparable key) Sets the key and sends aMarkerChangeEvent
to all registered listeners.Methods inherited from class org.jfree.chart.plot.Marker
addChangeListener, clone, getAlpha, getLabel, getLabelAnchor, getLabelBackgroundColor, getLabelFont, getLabelOffset, getLabelOffsetType, getLabelPaint, getLabelTextAnchor, getListeners, getOutlinePaint, getOutlineStroke, getPaint, getStroke, notifyListeners, removeChangeListener, setAlpha, setLabel, setLabelAnchor, setLabelBackgroundColor, setLabelFont, setLabelOffset, setLabelOffsetType, setLabelPaint, setLabelTextAnchor, setOutlinePaint, setOutlineStroke, setPaint, setStroke
-
Constructor Details
-
CategoryMarker
Creates a new category marker for the specified category.- Parameters:
key
- the category key.
-
CategoryMarker
Creates a new category marker.- Parameters:
key
- the key.paint
- the paint (null
not permitted).stroke
- the stroke (null
not permitted).
-
CategoryMarker
public CategoryMarker(Comparable key, Paint paint, Stroke stroke, Paint outlinePaint, Stroke outlineStroke, float alpha) Creates a new category marker.- Parameters:
key
- the key.paint
- the paint (null
not permitted).stroke
- the stroke (null
not permitted).outlinePaint
- the outline paint (null
permitted).outlineStroke
- the outline stroke (null
permitted).alpha
- the alpha transparency.
-
-
Method Details
-
getKey
Returns the key.- Returns:
- The key.
-
setKey
Sets the key and sends aMarkerChangeEvent
to all registered listeners.- Parameters:
key
- the key (null
not permitted).
-
getDrawAsLine
Returns the flag that controls whether the marker is drawn as a region or a line.- Returns:
- A line.
-
setDrawAsLine
Sets the flag that controls whether the marker is drawn as a region or as a line, and sends aMarkerChangeEvent
to all registered listeners.- Parameters:
drawAsLine
- the flag.
-
equals
Tests the marker for equality with an arbitrary object. -
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance. -
hashCode
-