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 TypeMethodDescriptionvoiddraw(Graphics2D g2, MarkerData markerData, boolean reverse) Draws the marker.booleangetFont()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 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).doublegetValue()Returns the value for the marker (the initial value comes from the constructor).inthashCode()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 color for the marker line and sends a change event to all registered listeners.voidsetLineStroke(Stroke stroke) Sets the stroke for the marker line and sends a change event to all registered listeners.voidsetValue(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, removeChangeListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart3d.ChartElement
receiveMethods 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:
getRangein interfaceValueMarker- Returns:
- The range for the marker (never
null).
-
getLabel
Returns the label for the marker (if this isnullthen 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 (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).
-
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 (nullnot 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 (nullnot permitted).
-
draw
Draws the marker. This method is called by the library, you won't normally call it directly. -
hashCode
-
equals
-