|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.chart.panel.AbstractOverlay
org.jfree.chart.panel.CrosshairOverlay
public class CrosshairOverlay
An overlay for a ChartPanel that draws crosshairs on a plot.
| Constructor Summary | |
|---|---|
CrosshairOverlay()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addDomainCrosshair(Crosshair crosshair)
Adds a crosshair against the domain axis and sends an OverlayChangeEvent to all registered listeners. |
void |
addRangeCrosshair(Crosshair crosshair)
Adds a crosshair against the range axis and sends an OverlayChangeEvent to all registered listeners. |
void |
clearDomainCrosshairs()
Clears all the domain crosshairs from the overlay and sends an OverlayChangeEvent to all registered listeners. |
void |
clearRangeCrosshairs()
Clears all the range crosshairs from the overlay and sends an OverlayChangeEvent to all registered listeners. |
Object |
clone()
Returns a clone of this instance. |
protected void |
drawHorizontalCrosshair(Graphics2D g2,
Rectangle2D dataArea,
double y,
Crosshair crosshair)
Draws a crosshair horizontally across the plot. |
protected void |
drawVerticalCrosshair(Graphics2D g2,
Rectangle2D dataArea,
double x,
Crosshair crosshair)
Draws a crosshair vertically on the plot. |
boolean |
equals(Object obj)
Tests this overlay for equality with an arbitrary object. |
List |
getDomainCrosshairs()
Returns a new list containing the domain crosshairs for this overlay. |
List |
getRangeCrosshairs()
Returns a new list containing the range crosshairs for this overlay. |
void |
paintOverlay(Graphics2D g2,
ChartPanel chartPanel)
Paints the crosshairs in the layer. |
void |
propertyChange(PropertyChangeEvent e)
Receives a property change event (typically a change in one of the crosshairs). |
void |
removeDomainCrosshair(Crosshair crosshair)
Removes a domain axis crosshair and sends an OverlayChangeEvent
to all registered listeners. |
void |
removeRangeCrosshair(Crosshair crosshair)
Removes a range axis crosshair and sends an OverlayChangeEvent
to all registered listeners. |
| Methods inherited from class org.jfree.chart.panel.AbstractOverlay |
|---|
addChangeListener, fireOverlayChanged, notifyListeners, removeChangeListener |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jfree.chart.panel.Overlay |
|---|
addChangeListener, removeChangeListener |
| Constructor Detail |
|---|
public CrosshairOverlay()
| Method Detail |
|---|
public void addDomainCrosshair(Crosshair crosshair)
OverlayChangeEvent to all registered listeners.
crosshair - the crosshair (null not permitted).removeDomainCrosshair(org.jfree.chart.plot.Crosshair),
addRangeCrosshair(org.jfree.chart.plot.Crosshair)public void removeDomainCrosshair(Crosshair crosshair)
OverlayChangeEvent
to all registered listeners.
crosshair - the crosshair (null not permitted).addDomainCrosshair(org.jfree.chart.plot.Crosshair)public void clearDomainCrosshairs()
OverlayChangeEvent to all registered listeners.
public List getDomainCrosshairs()
public void addRangeCrosshair(Crosshair crosshair)
OverlayChangeEvent to all registered listeners.
crosshair - the crosshair (null not permitted).public void removeRangeCrosshair(Crosshair crosshair)
OverlayChangeEvent
to all registered listeners.
crosshair - the crosshair (null not permitted).addRangeCrosshair(org.jfree.chart.plot.Crosshair)public void clearRangeCrosshairs()
OverlayChangeEvent to all registered listeners.
public List getRangeCrosshairs()
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenere - the event.
public void paintOverlay(Graphics2D g2,
ChartPanel chartPanel)
paintOverlay in interface Overlayg2 - the graphics target.chartPanel - the chart panel.
protected void drawHorizontalCrosshair(Graphics2D g2,
Rectangle2D dataArea,
double y,
Crosshair crosshair)
g2 - the graphics target.dataArea - the data area.y - the y-value in Java2D space.crosshair - the crosshair.
protected void drawVerticalCrosshair(Graphics2D g2,
Rectangle2D dataArea,
double x,
Crosshair crosshair)
g2 - the graphics target.dataArea - the data area.x - the x-value in Java2D space.crosshair - the crosshair.public boolean equals(Object obj)
equals in class Objectobj - the object (null permitted).
public Object clone()
throws CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class ObjectCloneNotSupportedException - if there is some problem
with the cloning.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||