public abstract class AbstractXYAnnotation extends AbstractAnnotation implements XYAnnotation
XYPlot
.Modifier | Constructor and Description |
---|---|
protected |
AbstractXYAnnotation()
Creates a new instance that has no tool tip or URL specified.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addEntity(PlotRenderingInfo info,
java.awt.Shape hotspot,
int rendererIndex,
java.lang.String toolTipText,
java.lang.String urlText)
A utility method for adding an
XYAnnotationEntity to
a PlotRenderingInfo instance. |
abstract void |
draw(java.awt.Graphics2D g2,
XYPlot plot,
java.awt.geom.Rectangle2D dataArea,
ValueAxis domainAxis,
ValueAxis rangeAxis,
int rendererIndex,
PlotRenderingInfo info)
Draws the annotation.
|
boolean |
equals(java.lang.Object obj)
Tests this annotation for equality with an arbitrary object.
|
java.lang.String |
getToolTipText()
Returns the tool tip text for the annotation.
|
java.lang.String |
getURL()
Returns the URL for the annotation.
|
int |
hashCode()
Returns a hash code for this instance.
|
void |
setToolTipText(java.lang.String text)
Sets the tool tip text for the annotation.
|
void |
setURL(java.lang.String url)
Sets the URL for the annotation.
|
addChangeListener, clone, fireAnnotationChanged, getNotify, hasListener, notifyListeners, removeChangeListener, setNotify
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addChangeListener, removeChangeListener
protected AbstractXYAnnotation()
public java.lang.String getToolTipText()
ChartPanel
when the mouse pointer hovers over
the annotation.null
).setToolTipText(String)
public void setToolTipText(java.lang.String text)
text
- the tool tip text (null
permitted).getToolTipText()
public java.lang.String getURL()
null
).setURL(String)
public void setURL(java.lang.String url)
url
- the URL (null
permitted).getURL()
public abstract void draw(java.awt.Graphics2D g2, XYPlot plot, java.awt.geom.Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info)
draw
in interface XYAnnotation
g2
- the graphics device.plot
- the plot.dataArea
- the data area.domainAxis
- the domain axis.rangeAxis
- the range axis.rendererIndex
- the renderer index.info
- if supplied, this info object will be populated with
entity information.protected void addEntity(PlotRenderingInfo info, java.awt.Shape hotspot, int rendererIndex, java.lang.String toolTipText, java.lang.String urlText)
XYAnnotationEntity
to
a PlotRenderingInfo
instance.info
- the plot rendering info (null
permitted).hotspot
- the hotspot area.rendererIndex
- the renderer index.toolTipText
- the tool tip text.urlText
- the URL text.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object (null
permitted).public int hashCode()
hashCode
in class java.lang.Object