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 TypeMethodDescriptionvoiddraw(Graphics2D g2, MarkerData markerData, boolean reverse) Handles drawing of the marker.booleanComparable<?> 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 isnullthen 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.inthashCode()voidsetCategory(Comparable<?> category) Sets the category for the marker and sends a change event to all registered listeners.voidsetFillColor(Color color) Sets the color used to fill the marker band and sends a change event to all registered listeners.voidSets the font for the marker label and sends a change event to all registered listeners.voidSets the label and sends a change event to all registered listeners.voidsetLabelAnchor(Anchor2D anchor) Sets the anchor for the label and sends a change event to all registered listeners.voidsetLabelColor(Color color) Sets the label color and sends a change event to all registered listeners.voidsetLineColor(Color color) Sets the line color for the marker and sends a change event to all registered listeners.voidsetLineStroke(Stroke stroke) Sets the line stroke and sends a change event to all registered listeners.voidsetType(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 (nullnot 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 (nullnot 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 (nullnot permitted).
-
getLabel
Returns the label for the marker (if this isnullthen 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 (nullpermitted).
-
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 (nullnot 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 (nullnot 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 (nullnot 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 (nullnot 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 (nullnot 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 (nullnot permitted).
-
draw
Handles drawing of the marker. This method is called by the library, you won't normally call it directly. -
hashCode
-
equals
-