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 TypeMethodDescriptionvoiddraw(Graphics2D g2, MarkerData markerData, boolean reverse) Draws the marker based on themarkerDatawhich has been passed to the 3D engine to generate the required 2D projection points.booleanTests 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 isnullthen 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.inthashCode()voidmarkerChanged(MarkerChangeEvent event) Receives notification of a change to the start or end marker for the range.voidsetFillColor(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.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.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
-
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 (nullpermitted).
-
-
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:
getRangein interfaceValueMarker- Returns:
- The range of values for the marker.
-
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. If the label is set tonullthen no label is displayed for the marker.- 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).
-
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 (nullnot permitted).
-
draw
Description copied from interface:MarkerDraws the marker based on themarkerDatawhich 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:
markerChangedin interfaceMarkerChangeListener- Parameters:
event- the event (nullnot permitted).
-
hashCode
-
equals
Tests this marker for equality with an arbitrary object.
-