java.lang.Object
org.jfree.chart3d.marker.AbstractMarker
org.jfree.chart3d.marker.NumberMarker
- All Implemented Interfaces:
Serializable
,ChartElement
,Marker
,ValueMarker
A marker used to mark one value on an axis.
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.
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D g2, MarkerData markerData, boolean reverse) Draws the marker.boolean
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 color for the marker line.Returns the stroke for the marker line.getRange()
Returns the range for the marker (in this case, a single value range).double
getValue()
Returns the value for the marker (the initial value comes from the constructor).int
hashCode()
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 color for the marker line and sends a change event to all registered listeners.void
setLineStroke
(Stroke stroke) Sets the stroke for the marker line and sends a change event to all registered listeners.void
setValue
(double value) Sets the value for the marker 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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.chart3d.ChartElement
receive
Methods inherited from interface org.jfree.chart3d.marker.Marker
addChangeListener, removeChangeListener
-
Constructor Details
-
NumberMarker
Creates a new marker.- Parameters:
value
- the value.
-
-
Method Details
-
getValue
Returns the value for the marker (the initial value comes from the constructor).- Returns:
- The value.
-
setValue
Sets the value for the marker and sends a change event to all registered listeners.- Parameters:
value
- the value.
-
getRange
Returns the range for the marker (in this case, a single value range). This method is used by the axis to filter out markers that do not touch the current axis range.- Specified by:
getRange
in interfaceValueMarker
- Returns:
- The range for the marker (never
null
).
-
getLabel
Returns the label for the marker (if this isnull
then no label is displayed). The default value isnull
.- 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).
-
getLineStroke
Returns the stroke for the marker line. The default value isMarker.DEFAULT_LINE_STROKE
.- Returns:
- The stroke for the marker line (never
null
).
-
setLineStroke
Sets the stroke for the marker line and sends a change event to all registered listeners.- Parameters:
stroke
- the stroke (null
not permitted).
-
getLineColor
Returns the color for the marker line. The default value isMarker.DEFAULT_LINE_COLOR
.- Returns:
- The color for the marker line (never
null
).
-
setLineColor
Sets the color for the marker line and sends a change event to all registered listeners.- Parameters:
color
- the color (null
not permitted).
-
draw
Draws the marker. This method is called by the library, you won't normally call it directly. -
hashCode
-
equals
-