Save This Page
Home » jcommon-1.0.13 » org.jfree » chart » annotations » [javadoc | source]
org.jfree.chart.annotations
public class: XYImageAnnotation [javadoc | source]
java.lang.Object
   org.jfree.chart.annotations.AbstractXYAnnotation
      org.jfree.chart.annotations.XYImageAnnotation

All Implemented Interfaces:
    PublicCloneable, Cloneable, Serializable, XYAnnotation

An annotation that allows an image to be placed at some location on an XYPlot . TODO: implement serialization properly (image is not serializable).
Constructor:
 public XYImageAnnotation(double x,
    double y,
    Image image) 
    Creates a new annotation to be displayed at the specified (x, y) location.
    Parameters:
    x - the x-coordinate (in data space).
    y - the y-coordinate (in data space).
    image - the image (null not permitted).
 public XYImageAnnotation(double x,
    double y,
    Image image,
    RectangleAnchor anchor) 
    Creates a new annotation to be displayed at the specified (x, y) location.
    Parameters:
    x - the x-coordinate (in data space).
    y - the y-coordinate (in data space).
    image - the image (null not permitted).
    anchor - the image anchor (null not permitted).
    since: 1.0.4 -
Method from org.jfree.chart.annotations.XYImageAnnotation Summary:
clone,   draw,   equals,   getImage,   getImageAnchor,   getX,   getY,   hashCode
Methods from org.jfree.chart.annotations.AbstractXYAnnotation:
addEntity,   draw,   equals,   getToolTipText,   getURL,   hashCode,   setToolTipText,   setURL
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.chart.annotations.XYImageAnnotation Detail:
 public Object clone() throws CloneNotSupportedException 
    Returns a clone of the annotation.
 public  void draw(Graphics2D g2,
    XYPlot plot,
    Rectangle2D dataArea,
    ValueAxis domainAxis,
    ValueAxis rangeAxis,
    int rendererIndex,
    PlotRenderingInfo info) 
    Draws the annotation. This method is called by the drawing code in the XYPlot class, you don't normally need to call this method directly.
 public boolean equals(Object obj) 
    Tests this object for equality with an arbitrary object.
 public Image getImage() 
    Returns the image for the annotation.
 public RectangleAnchor getImageAnchor() 
    Returns the image anchor for the annotation.
 public double getX() 
    Returns the x-coordinate (in data space) for the annotation.
 public double getY() 
    Returns the y-coordinate (in data space) for the annotation.
 public int hashCode() 
    Returns a hash code for this object.