java.lang.Object
org.jfree.chart3d.marker.AbstractMarker
org.jfree.chart3d.marker.RangeMarker
- All Implemented Interfaces:
Serializable
,EventListener
,ChartElement
,Marker
,MarkerChangeListener
,ValueMarker
public class RangeMarker
extends AbstractMarker
implements ValueMarker, MarkerChangeListener, Serializable
A marker that marks a range of values on an axis.
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.
For an example, please refer to the demo
RangeMarkerDemo1.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
ConstructorsConstructorDescriptionRangeMarker
(double lowerBound, double upperBound) Creates a new range marker for the given bounds.RangeMarker
(double lowerBound, double upperBound, String label) Creates a new range marker for the given bounds. -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D g2, MarkerData markerData, boolean reverse) Draws the marker based on themarkerData
which has been passed to the 3D engine to generate the required 2D projection points.boolean
Tests this marker for equality with an arbitrary object.getEnd()
Returns the ending point for the range marker.Returns the color used to fill the band representing the range for the marker.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.getRange()
Returns the range of values for the marker.getStart()
Returns the starting point for the range marker.int
hashCode()
void
markerChanged
(MarkerChangeEvent event) Receives notification of a change to the start or end marker for the range.void
setFillColor
(Color color) Sets the color used to fill the band representing the range for the marker 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.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
-
RangeMarker
Creates a new range marker for the given bounds.- Parameters:
lowerBound
- the lower bound.upperBound
- the upper bound.
-
RangeMarker
Creates a new range marker for the given bounds.- Parameters:
lowerBound
- the lower bound.upperBound
- the upper bound.label
- the label (null
permitted).
-
-
Method Details
-
getStart
Returns the starting point for the range marker.- Returns:
- The starting point.
-
getEnd
Returns the ending point for the range marker.- Returns:
- The ending point.
-
getRange
Returns the range of values for the marker.- Specified by:
getRange
in interfaceValueMarker
- Returns:
- The range of values for the marker.
-
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. If the label is set tonull
then no label is displayed for the marker.- 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).
-
getFillColor
Returns the color used to fill the band representing the range for the marker. The default value isMarker.DEFAULT_FILL_COLOR
.- Returns:
- The fill color (never
null
).
-
setFillColor
Sets the color used to fill the band representing the range for the marker and sends a change event to all registered listeners.- Parameters:
color
- the color (null
not permitted).
-
draw
Description copied from interface:Marker
Draws the marker based on themarkerData
which has been passed to the 3D engine to generate the required 2D projection points. -
markerChanged
Receives notification of a change to the start or end marker for the range.- Specified by:
markerChanged
in interfaceMarkerChangeListener
- Parameters:
event
- the event (null
not permitted).
-
hashCode
-
equals
Tests this marker for equality with an arbitrary object.
-