public class NumberMarker extends AbstractMarker implements ValueMarker, java.io.Serializable
DEFAULT_FILL_COLOR, DEFAULT_LABEL_COLOR, DEFAULT_LINE_COLOR, DEFAULT_LINE_STROKE, DEFAULT_MARKER_FONT| Constructor and Description |
|---|
NumberMarker(double value)
Creates a new marker.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics2D g2,
MarkerData markerData,
boolean reverse)
Draws the marker.
|
boolean |
equals(java.lang.Object obj) |
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.
|
java.awt.Color |
getLineColor()
Returns the color for the marker line.
|
java.awt.Stroke |
getLineStroke()
Returns the stroke for the marker line.
|
Range |
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 |
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.
|
void |
setLineColor(java.awt.Color color)
Sets the color for the marker line and sends a change event to all
registered listeners.
|
void |
setLineStroke(java.awt.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.
|
addChangeListener, deriveTextAnchor, deriveTextAnchorForLine, drawMarkerLabel, drawMarkerLabel, fireChangeEvent, receive, removeChangeListenerclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddChangeListener, removeChangeListenerreceivepublic NumberMarker(double value)
value - the value.public double getValue()
public void setValue(double value)
value - the value.public Range getRange()
getRange in interface ValueMarkernull).public java.lang.String getLabel()
null then no
label is displayed). The default value is null.null).public void setLabel(java.lang.String label)
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.Stroke getLineStroke()
Marker.DEFAULT_LINE_STROKE.null).public void setLineStroke(java.awt.Stroke stroke)
stroke - the stroke (null not permitted).public java.awt.Color getLineColor()
Marker.DEFAULT_LINE_COLOR.null).public void setLineColor(java.awt.Color color)
color - the color (null not permitted).public void draw(java.awt.Graphics2D g2, MarkerData markerData, boolean reverse)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object