axis.html

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

HTML
1,523 行
字号
getPlot</H3><PRE>public <A HREF="../../../../org/jfree/chart/plot/Plot.html">Plot</A> <B>getPlot</B>()</PRE><DL><DD>Returns the plot that the axis is assigned to. <P> This method will return null if the axis is not currently assigned to a plot.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The plot that the axis is assigned to.</DL></DD></DL><HR><A NAME="setPlot(org.jfree.chart.plot.Plot)"><!-- --></A><H3>setPlot</H3><PRE>public void <B>setPlot</B>(<A HREF="../../../../org/jfree/chart/plot/Plot.html">Plot</A>&nbsp;plot)             throws <A HREF="../../../../org/jfree/chart/plot/PlotNotCompatibleException.html">PlotNotCompatibleException</A></PRE><DL><DD>Sets a reference to the plot that the axis is assigned to. <P> This method is used internally, you shouldn't need to call it yourself.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>plot</CODE> - the plot.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jfree/chart/plot/PlotNotCompatibleException.html">PlotNotCompatibleException</A></CODE> - if plot is not compatible.</DL></DD></DL><HR><A NAME="getFixedDimension()"><!-- --></A><H3>getFixedDimension</H3><PRE>public double <B>getFixedDimension</B>()</PRE><DL><DD>Returns the fixed dimension for the axis.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the fixed dimension.</DL></DD></DL><HR><A NAME="setFixedDimension(double)"><!-- --></A><H3>setFixedDimension</H3><PRE>public void <B>setFixedDimension</B>(double&nbsp;dimension)</PRE><DL><DD>Sets the fixed dimension for the axis. <P> This is used when combining more than one plot on a chart.  In this case, there may be several axes that need to have the same height or width so that they are aligned.  This method is used to fix a dimension for the axis (the context determines whether the dimension is horizontal or vertical).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>dimension</CODE> - the fixed dimension.</DL></DD></DL><HR><A NAME="configure()"><!-- --></A><H3>configure</H3><PRE>public abstract void <B>configure</B>()</PRE><DL><DD>Configures the axis to work with the current plot.  Override this method to perform any special processing (such as auto-rescaling).<P><DD><DL></DL></DD><DD><DL></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 abstract <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>Estimates the space (height or width) required to draw the axis.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>plot</CODE> - the plot that the axis belongs to.<DD><CODE>plotArea</CODE> - the area within which the plot (including axes) should be drawn.<DD><CODE>edge</CODE> - the axis location.<DD><CODE>space</CODE> - space already reserved.<DT><B>Returns:</B><DD>the height 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 abstract 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></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>cursor</CODE> - the cursor location (determines where to draw the axis).<DD><CODE>plotArea</CODE> - the area within which the axes and plot should be drawn.<DD><CODE>dataArea</CODE> - the area within which the data should be drawn.<DD><CODE>edge</CODE> - the axis location (TOP, BOTTOM, RIGHT or LEFT).<DT><B>Returns:</B><DD>The new cursor position.</DL></DD></DL><HR><A NAME="refreshTicks(java.awt.Graphics2D, double, java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D, org.jfree.ui.RectangleEdge)"><!-- --></A><H3>refreshTicks</H3><PRE>public abstract void <B>refreshTicks</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>Calculates the positions of the ticks for the axis, storing the results in the tick list (ready for drawing).<P><DD><DL></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 plot should be drawn.<DD><CODE>dataArea</CODE> - the area inside the axes.<DD><CODE>edge</CODE> - the edge on which the axis is located.</DL></DD></DL><HR><A NAME="getMaxTickLabelWidth(java.awt.Graphics2D, java.awt.geom.Rectangle2D)"><!-- --></A><H3>getMaxTickLabelWidth</H3><PRE>protected double <B>getMaxTickLabelWidth</B>(java.awt.Graphics2D&nbsp;g2,                                      java.awt.geom.Rectangle2D&nbsp;plotArea)</PRE><DL><DD>Returns the maximum width of the ticks in the working list (that is set up by refreshTicks()).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>plotArea</CODE> - the area within which the plot is to be drawn.<DT><B>Returns:</B><DD>the maximum width of the ticks in the working list.</DL></DD></DL><HR><A NAME="isCompatiblePlot(org.jfree.chart.plot.Plot)"><!-- --></A><H3>isCompatiblePlot</H3><PRE>protected abstract boolean <B>isCompatiblePlot</B>(<A HREF="../../../../org/jfree/chart/plot/Plot.html">Plot</A>&nbsp;plot)</PRE><DL><DD>Returns true if the plot is compatible with the axis.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>plot</CODE> - the plot.<DT><B>Returns:</B><DD><code>true</code> if the plot is compatible with the axis.</DL></DD></DL><HR><A NAME="addChangeListener(org.jfree.chart.event.AxisChangeListener)"><!-- --></A><H3>addChangeListener</H3><PRE>public void <B>addChangeListener</B>(<A HREF="../../../../org/jfree/chart/event/AxisChangeListener.html">AxisChangeListener</A>&nbsp;listener)</PRE><DL><DD>Registers an object for notification of changes to the axis.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the object that is being registered.</DL></DD></DL><HR><A NAME="removeChangeListener(org.jfree.chart.event.AxisChangeListener)"><!-- --></A><H3>removeChangeListener</H3><PRE>public void <B>removeChangeListener</B>(<A HREF="../../../../org/jfree/chart/event/AxisChangeListener.html">AxisChangeListener</A>&nbsp;listener)</PRE><DL><DD>Deregisters an object for notification of changes to the axis.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the object to deregister.</DL></DD></DL><HR><A NAME="notifyListeners(org.jfree.chart.event.AxisChangeEvent)"><!-- --></A><H3>notifyListeners</H3><PRE>protected void <B>notifyListeners</B>(<A HREF="../../../../org/jfree/chart/event/AxisChangeEvent.html">AxisChangeEvent</A>&nbsp;event)</PRE><DL><DD>Notifies all registered listeners that the axis has changed. The AxisChangeEvent provides information about the change.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>event</CODE> - information about the change to the axis.</DL></DD></DL><HR><A NAME="getLabelEnclosure(java.awt.Graphics2D, org.jfree.ui.RectangleEdge)"><!-- --></A><H3>getLabelEnclosure</H3><PRE>protected java.awt.geom.Rectangle2D <B>getLabelEnclosure</B>(java.awt.Graphics2D&nbsp;g2,                                                      org.jfree.ui.RectangleEdge&nbsp;edge)</PRE><DL><DD>Returns a rectangle that encloses the axis label.  This is typically used for layout purposes (it gives the maximum dimensions of the label).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g2</CODE> - the graphics device.<DD><CODE>edge</CODE> - the edge of the plot area along which the axis is measuring.<DT><B>Returns:</B><DD>The enclosing rectangle.</DL></DD></DL><HR><A NAME="drawLabel(java.lang.String, java.awt.Graphics2D, double, java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D, org.jfree.ui.RectangleEdge)"><!-- --></A><H3>drawLabel</H3><PRE>protected double <B>drawLabel</B>(java.lang.String&nbsp;label,                           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 label.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>label</CODE> - the label text.<DD><CODE>g2</CODE> - the graphics device.<DD><CODE>cursor</CODE> - the cursor value.<DD><CODE>plotArea</CODE> - the plot area.<DD><CODE>dataArea</CODE> - the area inside the axes.<DD><CODE>edge</CODE> - the location of the axis.<DT><B>Returns:</B><DD>The width or height used for the label.</DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()                       throws java.lang.CloneNotSupportedException</PRE><DL><DD>Returns a clone of the axis.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>clone</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A clone.<DT><B>Throws:</B><DD><CODE>java.lang.CloneNotSupportedException</CODE> - if some component of the axis does not support cloning.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(java.lang.Object&nbsp;obj)</PRE><DL><DD>Tests this axis for equality with another object.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object.<DT><B>Returns:</B><DD><code>true</code> or <code>false</code>.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../org/jfree/chart/axis/AxisLocation.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Axis.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT>  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT><A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>

⌨️ 快捷键说明

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