public class RangeMarker extends AbstractMarker implements ValueMarker, MarkerChangeListener, java.io.Serializable
RangeMarkerDemo1.java.
DEFAULT_FILL_COLOR, DEFAULT_LABEL_COLOR, DEFAULT_LINE_COLOR, DEFAULT_LINE_STROKE, DEFAULT_MARKER_FONT| Constructor and Description |
|---|
RangeMarker(double lowerBound,
double upperBound)
Creates a new range marker for the given bounds.
|
RangeMarker(double lowerBound,
double upperBound,
java.lang.String label)
Creates a new range marker for the given bounds.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics2D g2,
MarkerData markerData,
boolean reverse)
Draws the marker based on the
markerData which has been
passed to the 3D engine to generate the required 2D projection points. |
boolean |
equals(java.lang.Object obj)
Tests this marker for equality with an arbitrary object.
|
NumberMarker |
getEnd()
Returns the ending point for the range marker.
|
java.awt.Color |
getFillColor()
Returns the color used to fill the band representing the range for
the marker.
|
java.awt.Font |
getFont()
Returns the font for the label.
|
java.lang.String |
getLabel()
Returns the label for the marker (if this is
null then no
label is displayed). |
Anchor2D |
getLabelAnchor()
Returns the anchor for the label.
|
java.awt.Color |
getLabelColor()
Returns the label color.
|
Range |
getRange()
Returns the range of values for the marker.
|
NumberMarker |
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(java.awt.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 |
setFont(java.awt.Font font)
Sets the font for the marker label and sends a change event to all
registered listeners.
|
void |
setLabel(java.lang.String label)
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(java.awt.Color color)
Sets the label color and sends a change event to all registered
listeners.
|
addChangeListener, deriveTextAnchor, deriveTextAnchorForLine, drawMarkerLabel, drawMarkerLabel, fireChangeEvent, receive, removeChangeListenerclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddChangeListener, removeChangeListenerreceivepublic RangeMarker(double lowerBound, double upperBound)
lowerBound - the lower bound.upperBound - the upper bound.public RangeMarker(double lowerBound, double upperBound, java.lang.String label)
lowerBound - the lower bound.upperBound - the upper bound.label - the label (null permitted).public NumberMarker getStart()
public NumberMarker getEnd()
public Range getRange()
getRange in interface ValueMarkerpublic java.lang.String getLabel()
null then no
label is displayed).null).public void setLabel(java.lang.String label)
null then no label is displayed for
the marker.label - the label (null permitted).public java.awt.Font getFont()
Marker.DEFAULT_MARKER_FONT.null).public void setFont(java.awt.Font font)
font - the font (null not permitted).public java.awt.Color getLabelColor()
Marker.DEFAULT_LABEL_COLOR.null).public void setLabelColor(java.awt.Color color)
color - the color (null not permitted).public Anchor2D getLabelAnchor()
Anchor2D.CENTER.public void setLabelAnchor(Anchor2D anchor)
anchor - the anchor (null not permitted).public java.awt.Color getFillColor()
Marker.DEFAULT_FILL_COLOR.null).public void setFillColor(java.awt.Color color)
color - the color (null not permitted).public void draw(java.awt.Graphics2D g2, MarkerData markerData, boolean reverse)
MarkermarkerData which has been
passed to the 3D engine to generate the required 2D projection points.public void markerChanged(MarkerChangeEvent event)
markerChanged in interface MarkerChangeListenerevent - the event (null not permitted).public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to test against (null permitted).