java.lang.Object
org.jfree.chart3d.marker.AbstractMarker
org.jfree.chart3d.marker.CategoryMarker
- All Implemented Interfaces:
Serializable
,ChartElement
,Marker
A marker for a category on a
For an example, please refer to the demo
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
CategoryAxis3D
. This marker could be
used to highlight one selected category.
For an example, please refer to the demo
CategoryMarkerDemo1.java
.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- Since:
- 1.2
- See Also:
-
Field Summary
Fields inherited from interface org.jfree.chart3d.marker.Marker
DEFAULT_FILL_COLOR, DEFAULT_LABEL_COLOR, DEFAULT_LINE_COLOR, DEFAULT_LINE_STROKE, DEFAULT_MARKER_FONT
-
Constructor Summary
ConstructorsConstructorDescriptionCategoryMarker
(Comparable<?> category) Creates a marker for the specified category. -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D g2, MarkerData markerData, boolean reverse) Handles drawing of the marker.boolean
Comparable
<?> Returns the category.Returns the color used to fill the marker band.getFont()
Returns the font for the label.getLabel()
Returns the label for the marker (if this isnull
then no label is displayed).Returns the anchor for the label.Returns the label color.Returns the line color for the marker.Returns the line stroke.getType()
Returns the marker type which determines whether the marker is drawn as a band (the default) or a line.int
hashCode()
void
setCategory
(Comparable<?> category) Sets the category for the marker and sends a change event to all registered listeners.void
setFillColor
(Color color) Sets the color used to fill the marker band and sends a change event to all registered listeners.void
Sets the font for the marker label and sends a change event to all registered listeners.void
Sets the label and sends a change event to all registered listeners.void
setLabelAnchor
(Anchor2D anchor) Sets the anchor for the label and sends a change event to all registered listeners.void
setLabelColor
(Color color) Sets the label color and sends a change event to all registered listeners.void
setLineColor
(Color color) Sets the line color for the marker and sends a change event to all registered listeners.void
setLineStroke
(Stroke stroke) Sets the line stroke and sends a change event to all registered listeners.void
setType
(CategoryMarkerType type) Sets the marker type and sends a change event to all registered listeners.Methods inherited from class org.jfree.chart3d.marker.AbstractMarker
addChangeListener, deriveTextAnchor, deriveTextAnchorForLine, drawMarkerLabel, drawMarkerLabel, fireChangeEvent, receive, removeChangeListener
-
Constructor Details
-
CategoryMarker
Creates a marker for the specified category.- Parameters:
category
- the category key (null
not permitted).
-
-
Method Details
-
getCategory
Returns the category.- Returns:
- The category (never
null
).
-
setCategory
Sets the category for the marker and sends a change event to all registered listeners.- Parameters:
category
- the new category (null
not permitted).
-
getType
Returns the marker type which determines whether the marker is drawn as a band (the default) or a line.- Returns:
- The type (never
null
).
-
setType
Sets the marker type and sends a change event to all registered listeners.- Parameters:
type
- the type (null
not permitted).
-
getLabel
Returns the label for the marker (if this isnull
then no label is displayed).- Returns:
- The label (possibly
null
).
-
setLabel
Sets the label and sends a change event to all registered listeners.- Parameters:
label
- the label (null
permitted).
-
getFont
Returns the font for the label. The default value isMarker.DEFAULT_MARKER_FONT
.- Returns:
- The font (never
null
).
-
setFont
Sets the font for the marker label and sends a change event to all registered listeners.- Parameters:
font
- the font (null
not permitted).
-
getLabelColor
Returns the label color. The default value isMarker.DEFAULT_LABEL_COLOR
.- Returns:
- The label color (never
null
).
-
setLabelColor
Sets the label color and sends a change event to all registered listeners.- Parameters:
color
- the color (null
not permitted).
-
getLabelAnchor
Returns the anchor for the label. The default value isAnchor2D.CENTER
.- Returns:
- The anchor for the label.
-
setLabelAnchor
Sets the anchor for the label and sends a change event to all registered listeners.- Parameters:
anchor
- the anchor (null
not permitted).
-
getLineColor
Returns the line color for the marker.- Returns:
- The line color (never
null
).
-
setLineColor
Sets the line color for the marker and sends a change event to all registered listeners.- Parameters:
color
- the color (null
not permitted).
-
getLineStroke
Returns the line stroke. The default value isMarker.DEFAULT_LINE_STROKE
.- Returns:
- The line stroke (never
null
).
-
setLineStroke
Sets the line stroke and sends a change event to all registered listeners.- Parameters:
stroke
- the stroke (null
not permitted).
-
getFillColor
Returns the color used to fill the marker band.- Returns:
- The color (never
null
).
-
setFillColor
Sets the color used to fill the marker band and sends a change event to all registered listeners.- Parameters:
color
- the color (null
not permitted).
-
draw
Handles drawing of the marker. This method is called by the library, you won't normally call it directly. -
hashCode
-
equals
-