numberaxis.html

来自「JFreeChart的帮助文档」· HTML 代码 · 共 1,220 行 · 第 1/5 页

HTML
1,220 行
字号
calculateLowestVisibleTickValue</H3><PRE>public double <B>calculateLowestVisibleTickValue</B>()</PRE><DL><DD>Calculates the value of the lowest visible tick on the axis.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the value of the lowest visible tick on the axis.</DL></DD></DL><HR><A NAME="calculateHighestVisibleTickValue()"><!-- --></A><H3>calculateHighestVisibleTickValue</H3><PRE>public double <B>calculateHighestVisibleTickValue</B>()</PRE><DL><DD>Calculates the value of the highest visible tick on the axis.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the value of the highest visible tick on the axis.</DL></DD></DL><HR><A NAME="calculateVisibleTickCount()"><!-- --></A><H3>calculateVisibleTickCount</H3><PRE>public int <B>calculateVisibleTickCount</B>()</PRE><DL><DD>Calculates the number of visible ticks.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of visible ticks on the axis.</DL></DD></DL><HR><A NAME="reserveSpace(java.awt.Graphics2D, org.jfree.chart.plot.Plot, java.awt.geom.Rectangle2D, org.jfree.ui.RectangleEdge, org.jfree.chart.axis.AxisSpace)"><!-- --></A><H3>reserveSpace</H3><PRE>public <A HREF="../../../../org/jfree/chart/axis/AxisSpace.html">AxisSpace</A> <B>reserveSpace</B>(java.awt.Graphics2D&nbsp;g2,                              <A HREF="../../../../org/jfree/chart/plot/Plot.html">Plot</A>&nbsp;plot,                              java.awt.geom.Rectangle2D&nbsp;plotArea,                              org.jfree.ui.RectangleEdge&nbsp;edge,                              <A HREF="../../../../org/jfree/chart/axis/AxisSpace.html">AxisSpace</A>&nbsp;space)</PRE><DL><DD>Returns the space required to draw the axis.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jfree/chart/axis/Axis.html#reserveSpace(java.awt.Graphics2D, org.jfree.chart.plot.Plot, java.awt.geom.Rectangle2D, org.jfree.ui.RectangleEdge, org.jfree.chart.axis.AxisSpace)">reserveSpace</A></CODE> in class <CODE><A HREF="../../../../org/jfree/chart/axis/Axis.html">Axis</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>plot</CODE> - a reference to the plot;<DD><CODE>plotArea</CODE> - the area within which the plot should be drawn.<DD><CODE>edge</CODE> - the axis location.<DD><CODE>space</CODE> - the space already reserved.<DT><B>Returns:</B><DD>Space required to draw the axis.</DL></DD></DL><HR><A NAME="draw(java.awt.Graphics2D, double, java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D, org.jfree.ui.RectangleEdge)"><!-- --></A><H3>draw</H3><PRE>public double <B>draw</B>(java.awt.Graphics2D&nbsp;g2,                   double&nbsp;cursor,                   java.awt.geom.Rectangle2D&nbsp;plotArea,                   java.awt.geom.Rectangle2D&nbsp;dataArea,                   org.jfree.ui.RectangleEdge&nbsp;edge)</PRE><DL><DD>Draws the axis on a Java 2D graphics device (such as the screen or a printer).<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jfree/chart/axis/Axis.html#draw(java.awt.Graphics2D, double, java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D, org.jfree.ui.RectangleEdge)">draw</A></CODE> in class <CODE><A HREF="../../../../org/jfree/chart/axis/Axis.html">Axis</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>cursor</CODE> - the cursor location.<DD><CODE>plotArea</CODE> - the area within which the axes and data should be drawn.<DD><CODE>dataArea</CODE> - the area within which the data should be drawn.<DD><CODE>edge</CODE> - the location of the axis.<DT><B>Returns:</B><DD>The width or height used by the axis.</DL></DD></DL><HR><A NAME="drawTickMarksAndLabels(java.awt.Graphics2D, double, java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D, org.jfree.ui.RectangleEdge)"><!-- --></A><H3>drawTickMarksAndLabels</H3><PRE>protected double <B>drawTickMarksAndLabels</B>(java.awt.Graphics2D&nbsp;g2,                                        double&nbsp;cursor,                                        java.awt.geom.Rectangle2D&nbsp;plotArea,                                        java.awt.geom.Rectangle2D&nbsp;dataArea,                                        org.jfree.ui.RectangleEdge&nbsp;edge)</PRE><DL><DD>Draws the axis line, tick marks and tick mark labels.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>cursor</CODE> - the cursor.<DD><CODE>plotArea</CODE> - the plot area.<DD><CODE>dataArea</CODE> - the data area.<DD><CODE>edge</CODE> - the edge that the axis is aligned with.<DT><B>Returns:</B><DD>The width or height used to draw the axis.</DL></DD></DL><HR><A NAME="createStandardTickUnits()"><!-- --></A><H3>createStandardTickUnits</H3><PRE>public static <A HREF="../../../../org/jfree/chart/axis/TickUnits.html">TickUnits</A> <B>createStandardTickUnits</B>()</PRE><DL><DD>Creates the standard tick units. <P> If you don't like these defaults, create your own instance of TickUnits and then pass it to the setStandardTickUnits(...) method in the NumberAxis class.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the standard tick units.</DL></DD></DL><HR><A NAME="createIntegerTickUnits()"><!-- --></A><H3>createIntegerTickUnits</H3><PRE>public static <A HREF="../../../../org/jfree/chart/axis/TickUnits.html">TickUnits</A> <B>createIntegerTickUnits</B>()</PRE><DL><DD>Returns a collection of tick units for integer values.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a collection of tick units for integer values.</DL></DD></DL><HR><A NAME="createStandardTickUnits(java.util.Locale)"><!-- --></A><H3>createStandardTickUnits</H3><PRE>public static <A HREF="../../../../org/jfree/chart/axis/TickUnits.html">TickUnits</A> <B>createStandardTickUnits</B>(java.util.Locale&nbsp;locale)</PRE><DL><DD>Creates a collection of standard tick units.  The supplied locale is used to create the number formatter (a localised instance of <code>NumberFormat</code>). <P> If you don't like these defaults, create your own instance of <A HREF="../../../../org/jfree/chart/axis/TickUnits.html"><CODE>TickUnits</CODE></A> and then pass it to the <code>setStandardTickUnits(...)</code> method.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>locale</CODE> - the locale.<DT><B>Returns:</B><DD>a tick unit collection.</DL></DD></DL><HR><A NAME="createIntegerTickUnits(java.util.Locale)"><!-- --></A><H3>createIntegerTickUnits</H3><PRE>public static <A HREF="../../../../org/jfree/chart/axis/TickUnits.html">TickUnits</A> <B>createIntegerTickUnits</B>(java.util.Locale&nbsp;locale)</PRE><DL><DD>Returns a collection of tick units for integer values. Uses a given Locale to create the DecimalFormats.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>locale</CODE> - the locale to use to represent Numbers.<DT><B>Returns:</B><DD>a collection of tick units for integer values.</DL></DD></DL><HR><A NAME="getMaxTickLabelHeight(java.awt.Graphics2D, java.awt.geom.Rectangle2D, boolean)"><!-- --></A><H3>getMaxTickLabelHeight</H3><PRE>protected double <B>getMaxTickLabelHeight</B>(java.awt.Graphics2D&nbsp;g2,                                       java.awt.geom.Rectangle2D&nbsp;drawArea,                                       boolean&nbsp;vertical)</PRE><DL><DD>A utility method for determining the height of the tallest tick label.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>drawArea</CODE> - the area within which the plot and axes should be drawn.<DD><CODE>vertical</CODE> - a flag that indicates whether or not the tick labels are 'vertical'.<DT><B>Returns:</B><DD>the height of the tallest tick label.</DL></DD></DL><HR><A NAME="estimateMaximumTickLabelHeight(java.awt.Graphics2D)"><!-- --></A><H3>estimateMaximumTickLabelHeight</H3><PRE>protected double <B>estimateMaximumTickLabelHeight</B>(java.awt.Graphics2D&nbsp;g2)</PRE><DL><DD>Estimates the maximum tick label height.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DT><B>Returns:</B><DD>The maximum height.</DL></DD></DL><HR><A NAME="estimateMaximumTickLabelWidth(java.awt.Graphics2D, org.jfree.chart.axis.TickUnit)"><!-- --></A><H3>estimateMaximumTickLabelWidth</H3><PRE>protected double <B>estimateMaximumTickLabelWidth</B>(java.awt.Graphics2D&nbsp;g2,                                               <A HREF="../../../../org/jfree/chart/axis/TickUnit.html">TickUnit</A>&nbsp;tickUnit)</PRE><DL><DD>Estimates the maximum width of the tick labels, assuming the specified tick unit is used. <P> Rather than computing the string bounds of every tick on the axis, we just look at two values: the lower bound and the upper bound for the axis.  These two values will usually be representative.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>tickUnit</CODE> - the tick unit to use for calculation.<DT><B>Returns:</B><DD>the 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?