/**
* Returns a flag indicating whether or not the domain crosshair is visible.
*
* @return The flag.
*
* @see #setDomainCrosshairVisible(boolean)
*/
/**
* Returns a flag indicating whether or not the domain crosshair is visible.
*
* @return The flag.
*/
public boolean isDomainCrosshairVisible() {
return this.domainCrosshairVisible;
}
/**
* Sets the flag indicating whether or not the domain crosshair is visible
* and, if the flag changes, sends a {@link PlotChangeEvent} to all
* registered listeners.
*
* @param flag the new value of the flag.
*
* @see #isDomainCrosshairVisible()
*/
/**
* Sets the flag indicating whether or not the domain crosshair is visible.
*
* @param flag the new value of the flag.
*/
public void setDomainCrosshairVisible(boolean flag) {
if (this.domainCrosshairVisible != flag) {
this.domainCrosshairVisible = flag;
fireChangeEvent();
}
}
/**
* Returns a flag indicating whether or not the crosshair should "lock-on"
* to actual data values.
*
* @return The flag.
*
* @see #setDomainCrosshairLockedOnData(boolean)
*/
/**
* Returns a flag indicating whether or not the crosshair should "lock-on"
* to actual data values.
*
* @return The flag.
*/
public boolean isDomainCrosshairLockedOnData() {
return this.domainCrosshairLockedOnData;
}
/**
* Sets the flag indicating whether or not the domain crosshair should
* "lock-on" to actual data values. If the flag value changes, this
* method sends a {@link PlotChangeEvent} to all registered listeners.
*
* @param flag the flag.
*
* @see #isDomainCrosshairLockedOnData()
*/
/**
* Sets the flag indicating whether or not the domain crosshair should
* "lock-on" to actual data values.
*
* @param flag the flag.
*/
public void setDomainCrosshairLockedOnData(boolean flag) {
if (this.domainCrosshairLockedOnData != flag) {
this.domainCrosshairLockedOnData = flag;
fireChangeEvent();
}
}
/**
* Returns the domain crosshair value.
*
* @return The value.
*
* @see #setDomainCrosshairValue(double)
*/
/**
* Returns the domain crosshair value.
*
* @return The value.
*/
public double getDomainCrosshairValue() {
return this.domainCrosshairValue;
}
/**
* Sets the domain crosshair value and sends a {@link PlotChangeEvent} to
* all registered listeners (provided that the domain crosshair is visible).
*
* @param value the value.
*
* @see #getDomainCrosshairValue()
*/
/**
* Sets the domain crosshair value.
* <P>
* Registered listeners are notified that the plot has been modified, but
* only if the crosshair is visible.
*
* @param value the new value.
*/
public void setDomainCrosshairValue(double value) {
setDomainCrosshairValue(value, true);
}
/**
* Sets the domain crosshair value and, if requested, sends a
* {@link PlotChangeEvent} to all registered listeners (provided that the
* domain crosshair is visible).
*
* @param value the new value.
* @param notify notify listeners?
*
* @see #getDomainCrosshairValue()
*/
/**
* Sets the domain crosshair value.
* <P>
* Registered listeners are notified that the axis has been modified, but
* only if the crosshair is visible.
*
* @param value the new value.
* @param notify a flag that controls whether or not listeners are
* notified.
*/
public void setDomainCrosshairValue(double value, boolean notify) {
this.domainCrosshairValue = value;
if (isDomainCrosshairVisible() && notify) {
fireChangeEvent();
}
}
/**
* Returns the {@link Stroke} used to draw the crosshair (if visible).
*
* @return The crosshair stroke (never <code>null</code>).
*
* @see #setDomainCrosshairStroke(Stroke)
* @see #isDomainCrosshairVisible()
* @see #getDomainCrosshairPaint()
*/
/**
* Returns the Stroke used to draw the crosshair (if visible).
*
* @return The crosshair stroke.
*/
public Stroke getDomainCrosshairStroke() {
return this.domainCrosshairStroke;
}
|