public class Crosshair extends java.lang.Object implements java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
| Constructor and Description |
|---|
Crosshair()
Creates a new crosshair with value 0.0.
|
Crosshair(double value)
Creates a new crosshair with the specified value.
|
Crosshair(double value,
java.awt.Paint paint,
java.awt.Stroke stroke)
Creates a new crosshair value with the specified value and line style.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener.
|
java.lang.Object |
clone()
Returns an independent copy of this instance.
|
boolean |
equals(java.lang.Object obj)
Tests this crosshair for equality with an arbitrary object.
|
org.jfree.ui.RectangleAnchor |
getLabelAnchor()
Returns the label anchor point.
|
java.awt.Paint |
getLabelBackgroundPaint()
Returns the label background paint.
|
java.awt.Font |
getLabelFont()
Returns the label font.
|
CrosshairLabelGenerator |
getLabelGenerator()
Returns the crosshair label generator.
|
java.awt.Paint |
getLabelOutlinePaint()
Returns the label outline paint.
|
java.awt.Stroke |
getLabelOutlineStroke()
Returns the label outline stroke.
|
java.awt.Paint |
getLabelPaint()
Returns the label paint.
|
double |
getLabelXOffset()
Returns the x-offset for the label (in Java2D units).
|
double |
getLabelYOffset()
Returns the y-offset for the label (in Java2D units).
|
java.awt.Paint |
getPaint()
Returns the paint for the crosshair line.
|
java.awt.Stroke |
getStroke()
Returns the stroke for the crosshair line.
|
double |
getValue()
Returns the crosshair value.
|
int |
hashCode()
Returns a hash code for this instance.
|
boolean |
isLabelOutlineVisible()
Returns the flag that controls the visibility of the label outline.
|
boolean |
isLabelVisible()
Returns the flag that controls whether or not a label is drawn for
this crosshair.
|
boolean |
isVisible()
Returns the flag that indicates whether or not the crosshair is
currently visible.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener.
|
void |
setLabelAnchor(org.jfree.ui.RectangleAnchor anchor)
Sets the label anchor point and sends a property change event (with the
name 'labelAnchor') to all registered listeners.
|
void |
setLabelBackgroundPaint(java.awt.Paint paint)
Sets the label background paint and sends a property change event with
the name 'labelBackgroundPaint') to all registered listeners.
|
void |
setLabelFont(java.awt.Font font)
Sets the label font and sends a property change event (with the name
'labelFont') to all registered listeners.
|
void |
setLabelGenerator(CrosshairLabelGenerator generator)
Sets the crosshair label generator and sends a property change event
(with the name 'labelGenerator') to all registered listeners.
|
void |
setLabelOutlinePaint(java.awt.Paint paint)
Sets the label outline paint and sends a property change event (with the
name "labelOutlinePaint") to all registered listeners.
|
void |
setLabelOutlineStroke(java.awt.Stroke stroke)
Sets the label outline stroke and sends a property change event (with
the name 'labelOutlineStroke') to all registered listeners.
|
void |
setLabelOutlineVisible(boolean visible)
Sets the flag that controls the visibility of the label outlines and
sends a property change event (with the name "labelOutlineVisible") to
all registered listeners.
|
void |
setLabelPaint(java.awt.Paint paint)
Sets the label paint and sends a property change event (with the name
'labelPaint') to all registered listeners.
|
void |
setLabelVisible(boolean visible)
Sets the flag that controls whether or not a label is drawn for the
crosshair and sends a property change event (with the name
'labelVisible') to all registered listeners.
|
void |
setLabelXOffset(double offset)
Sets the x-offset and sends a property change event (with the name
'labelXOffset') to all registered listeners.
|
void |
setLabelYOffset(double offset)
Sets the y-offset and sends a property change event (with the name
'labelYOffset') to all registered listeners.
|
void |
setPaint(java.awt.Paint paint)
Sets the paint for the crosshair line and sends a property change event
with the name "paint" to all registered listeners.
|
void |
setStroke(java.awt.Stroke stroke)
Sets the stroke for the crosshair line and sends a property change event
with the name "stroke" to all registered listeners.
|
void |
setValue(double value)
Sets the crosshair value and sends a property change event with the name
'value' to all registered listeners.
|
void |
setVisible(boolean visible)
Sets the flag that controls the visibility of the crosshair and sends
a proerty change event (with the name 'visible') to all registered
listeners.
|
public Crosshair()
public Crosshair(double value)
value - the value.public Crosshair(double value, java.awt.Paint paint, java.awt.Stroke stroke)
value - the value.paint - the line paint (null not permitted).stroke - the line stroke (null not permitted).public boolean isVisible()
setVisible(boolean)public void setVisible(boolean visible)
visible - the new flag value.isVisible()public double getValue()
setValue(double)public void setValue(double value)
value - the value.getValue()public java.awt.Paint getPaint()
null).setPaint(java.awt.Paint)public void setPaint(java.awt.Paint paint)
paint - the paint (null not permitted).getPaint()public java.awt.Stroke getStroke()
null).setStroke(java.awt.Stroke)public void setStroke(java.awt.Stroke stroke)
stroke - the stroke (null not permitted).getStroke()public boolean isLabelVisible()
setLabelVisible(boolean)public void setLabelVisible(boolean visible)
visible - the new flag value.isLabelVisible()public CrosshairLabelGenerator getLabelGenerator()
null).setLabelGenerator(org.jfree.chart.labels.CrosshairLabelGenerator)public void setLabelGenerator(CrosshairLabelGenerator generator)
generator - the new generator (null not permitted).getLabelGenerator()public org.jfree.ui.RectangleAnchor getLabelAnchor()
null.setLabelAnchor(org.jfree.ui.RectangleAnchor)public void setLabelAnchor(org.jfree.ui.RectangleAnchor anchor)
anchor - the anchor (null not permitted).getLabelAnchor()public double getLabelXOffset()
setLabelXOffset(double)public void setLabelXOffset(double offset)
offset - the new offset.getLabelXOffset()public double getLabelYOffset()
setLabelYOffset(double)public void setLabelYOffset(double offset)
offset - the new offset.getLabelYOffset()public java.awt.Font getLabelFont()
null).setLabelFont(java.awt.Font)public void setLabelFont(java.awt.Font font)
font - the font (null not permitted).getLabelFont()public java.awt.Paint getLabelPaint()
null).setLabelPaint(java.awt.Paint)public void setLabelPaint(java.awt.Paint paint)
paint - the paint (null not permitted).getLabelPaint()public java.awt.Paint getLabelBackgroundPaint()
null).setLabelBackgroundPaint(java.awt.Paint)public void setLabelBackgroundPaint(java.awt.Paint paint)
paint - the paint (null permitted).getLabelBackgroundPaint()public boolean isLabelOutlineVisible()
setLabelOutlineVisible(boolean)public void setLabelOutlineVisible(boolean visible)
visible - the new flag value.isLabelOutlineVisible()public java.awt.Paint getLabelOutlinePaint()
null).setLabelOutlinePaint(java.awt.Paint)public void setLabelOutlinePaint(java.awt.Paint paint)
paint - the paint (null not permitted).getLabelOutlinePaint()public java.awt.Stroke getLabelOutlineStroke()
null).setLabelOutlineStroke(java.awt.Stroke)public void setLabelOutlineStroke(java.awt.Stroke stroke)
stroke - the stroke (null not permitted).getLabelOutlineStroke()public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if there is a problem with
cloning.public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l - the listener.removePropertyChangeListener(java.beans.PropertyChangeListener)public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l - the listener.addPropertyChangeListener(java.beans.PropertyChangeListener)