|
jfreechart example source code file (XYDrawableAnnotation.java)
The jfreechart XYDrawableAnnotation.java source code
/* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2008, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/index.html
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* -------------------------
* XYDrawableAnnotation.java
* -------------------------
* (C) Copyright 2003-2008, by Object Refinery Limited.
*
* Original Author: David Gilbert (for Object Refinery Limited);
* Contributor(s): -;
*
* Changes:
* --------
* 21-May-2003 : Version 1 (DG);
* 21-Jan-2004 : Update for renamed method in ValueAxis (DG);
* 30-Sep-2004 : Added support for tool tips and URLs (DG);
* 18-Jun-2008 : Added scaling factor (DG);
*
*/
package org.jfree.chart.annotations;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.PlotRenderingInfo;
import org.jfree.chart.plot.XYPlot;
import org.jfree.ui.Drawable;
import org.jfree.ui.RectangleEdge;
import org.jfree.util.ObjectUtilities;
import org.jfree.util.PublicCloneable;
/**
* A general annotation that can be placed on an {@link XYPlot}.
*/
public class XYDrawableAnnotation extends AbstractXYAnnotation
implements Cloneable, PublicCloneable, Serializable {
/** For serialization. */
private static final long serialVersionUID = -6540812859722691020L;
/** The scaling factor. */
private double drawScaleFactor;
/** The x-coordinate. */
private double x;
/** The y-coordinate. */
private double y;
/** The width. */
private double displayWidth;
/** The height. */
private double displayHeight;
/** The drawable object. */
private Drawable drawable;
/**
* Creates a new annotation to be displayed within the given area.
*
* @param x the x-coordinate for the area.
* @param y the y-coordinate for the area.
* @param width the width of the area.
* @param height the height of the area.
* @param drawable the drawable object (<code>null not permitted).
*/
public XYDrawableAnnotation(double x, double y, double width, double height,
Drawable drawable) {
this(x, y, width, height, 1.0, drawable);
}
/**
* Creates a new annotation to be displayed within the given area. If you
* specify a <code>drawScaleFactor of 2.0, the
Other jfreechart examples (source code examples)Here is a short list of links related to this jfreechart XYDrawableAnnotation.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.