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

All Implemented Interfaces:
    PublicCloneable, Cloneable, Serializable, XYAnnotation

A polygon annotation that can be placed on an XYPlot . The polygon coordinates are specified in data space.
Constructor:
 public XYPolygonAnnotation(double[] polygon) 
 public XYPolygonAnnotation(double[] polygon,
    Stroke stroke,
    Paint outlinePaint) 
    Creates a new annotation where the box is drawn as an outline using the specified stroke and outlinePaint. The array of polygon coordinates must contain an even number of coordinates (each pair is an (x, y) location on the plot) and the last point is automatically joined back to the first point.
    Parameters:
    polygon - the coordinates of the polygon's vertices (null not permitted).
    stroke - the shape stroke (null permitted).
    outlinePaint - the shape color (null permitted).
 public XYPolygonAnnotation(double[] polygon,
    Stroke stroke,
    Paint outlinePaint,
    Paint fillPaint) 
    Creates a new annotation. The array of polygon coordinates must contain an even number of coordinates (each pair is an (x, y) location on the plot) and the last point is automatically joined back to the first point.
    Parameters:
    polygon - the coordinates of the polygon's vertices (null not permitted).
    stroke - the shape stroke (null permitted).
    outlinePaint - the shape color (null permitted).
    fillPaint - the paint used to fill the shape (null permitted).
Method from org.jfree.chart.annotations.XYPolygonAnnotation Summary:
clone,   draw,   equals,   getFillPaint,   getOutlinePaint,   getOutlineStroke,   getPolygonCoordinates,   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.XYPolygonAnnotation Detail:
 public Object clone() throws CloneNotSupportedException 
    Returns a clone.
 public  void draw(Graphics2D g2,
    XYPlot plot,
    Rectangle2D dataArea,
    ValueAxis domainAxis,
    ValueAxis rangeAxis,
    int rendererIndex,
    PlotRenderingInfo info) 
    Draws the annotation. This method is usually called by the XYPlot class, you shouldn't need to call it directly.
 public boolean equals(Object obj) 
    Tests this annotation for equality with an arbitrary object.
 public Paint getFillPaint() 
    Returns the fill paint.
 public Paint getOutlinePaint() 
    Returns the outline paint.
 public Stroke getOutlineStroke() 
    Returns the outline stroke.
 public double[] getPolygonCoordinates() 
    Returns the coordinates of the polygon's vertices. The returned array is a copy, so it is safe to modify without altering the annotation's state.
 public int hashCode() 
    Returns a hash code for this instance.