KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > chart > plot > Zoomable


1 /* ===========================================================
2  * JFreeChart : a free chart library for the Java(tm) platform
3  * ===========================================================
4  *
5  * (C) Copyright 2000-2006, by Object Refinery Limited and Contributors.
6  *
7  * Project Info: http://www.jfree.org/jfreechart/index.html
8  *
9  * This library is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22  * USA.
23  *
24  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
25  * in the United States and other countries.]
26  *
27  * -------------
28  * Zoomable.java
29  * -------------
30  *
31  * (C) Copyright 2004, 2006, by Object Refinery Limited and Contributors.
32  *
33  * Original Author: David Gilbert (for Object Refinery Limited);
34  * Contributor(s): Rune Fauske;
35  *
36  * Changes
37  * -------
38  * 12-Nov-2004 : Version 1 (DG);
39  * 26-Jan-2004 : Added getOrientation() method (DG);
40  * 04-Sep-2006 : Added credit for Rune Fauske, see patch 1050659 (DG);
41  *
42  */

43
44 package org.jfree.chart.plot;
45
46 import java.awt.geom.Point2D JavaDoc;
47
48 import org.jfree.chart.ChartPanel;
49
50 /**
51  * A plot that is zoomable must implement this interface to provide a
52  * mechanism for the {@link ChartPanel} to control the zooming.
53  */

54 public interface Zoomable {
55
56     /**
57      * Returns <code>true</code> if the plot's domain is zoomable, and
58      * <code>false</code> otherwise.
59      *
60      * @return A boolean.
61      */

62     public boolean isDomainZoomable();
63     
64     /**
65      * Returns <code>true</code> if the plot's range is zoomable, and
66      * <code>false</code> otherwise.
67      *
68      * @return A boolean.
69      */

70     public boolean isRangeZoomable();
71
72     /**
73      * Returns the orientation of the plot.
74      *
75      * @return The orientation.
76      */

77     public PlotOrientation getOrientation();
78     
79     /**
80      * Multiplies the range on the domain axis/axes by the specified factor.
81      *
82      * @param factor the zoom factor.
83      * @param state the plot state.
84      * @param source the source point (in Java2D coordinates).
85      */

86     public void zoomDomainAxes(double factor, PlotRenderingInfo state,
87                                Point2D JavaDoc source);
88
89     /**
90      * Zooms in on the domain axes.
91      *
92      * @param lowerPercent the new lower bound.
93      * @param upperPercent the new upper bound.
94      * @param state the plot state.
95      * @param source the source point (in Java2D coordinates).
96      */

97     public void zoomDomainAxes(double lowerPercent, double upperPercent,
98                                PlotRenderingInfo state, Point2D JavaDoc source);
99
100     /**
101      * Multiplies the range on the range axis/axes by the specified factor.
102      *
103      * @param factor the zoom factor.
104      * @param state the plot state.
105      * @param source the source point (in Java2D coordinates).
106      */

107     public void zoomRangeAxes(double factor, PlotRenderingInfo state,
108                               Point2D JavaDoc source);
109
110     /**
111      * Zooms in on the range axes.
112      *
113      * @param lowerPercent the new lower bound.
114      * @param upperPercent the new upper bound.
115      * @param state the plot state.
116      * @param source the source point (in Java2D coordinates).
117      */

118     public void zoomRangeAxes(double lowerPercent, double upperPercent,
119                               PlotRenderingInfo state, Point2D JavaDoc source);
120
121 }
122
Popular Tags