jdbcxydataset.html

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

HTML
733
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Sep 11 11:26:54 BST 2003 --><TITLE>JDBCXYDataset (JFreeChart Class Library (version 0.9.12))</TITLE><META NAME="keywords" CONTENT="org.jfree.data.JDBCXYDataset,JDBCXYDataset class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="JDBCXYDataset (JFreeChart Class Library (version 0.9.12))";}</SCRIPT><BODY BGCOLOR="white" onload="asd();"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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;<A HREF="../../../org/jfree/data/JDBCPieDataset.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/jfree/data/KeyedObject.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="JDBCXYDataset.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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.jfree.data</FONT><BR>Class JDBCXYDataset</H2><PRE>java.lang.Object  |  +--<A HREF="../../../org/jfree/data/AbstractDataset.html">org.jfree.data.AbstractDataset</A>        |        +--<B>org.jfree.data.JDBCXYDataset</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, <A HREF="../../../org/jfree/data/Dataset.html">Dataset</A>, java.io.ObjectInputValidation, <A HREF="../../../org/jfree/data/RangeInfo.html">RangeInfo</A>, java.io.Serializable, <A HREF="../../../org/jfree/data/SeriesDataset.html">SeriesDataset</A>, <A HREF="../../../org/jfree/data/XYDataset.html">XYDataset</A></DD></DL><HR><DL><DT>public class <B>JDBCXYDataset</B><DT>extends <A HREF="../../../org/jfree/data/AbstractDataset.html">AbstractDataset</A><DT>implements <A HREF="../../../org/jfree/data/XYDataset.html">XYDataset</A>, <A HREF="../../../org/jfree/data/RangeInfo.html">RangeInfo</A></DL><P>This class provides an <A HREF="../../../org/jfree/data/XYDataset.html"><CODE>XYDataset</CODE></A> implementation over a database JDBC result set.  The dataset is populated via a call to executeQuery with the string sql query.  The sql query must return at least two columns.  The first column will be  the x-axis and remaining columns y-axis values.  executeQuery can be called a number of times.  The database connection is read-only and no write back facility exists.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html" TARGET="org.jfree.data.JDBCXYDataset">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#isTimeSeries">isTimeSeries</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is this dataset a timeseries ?</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#maxValue">maxValue</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum y value of the returned result set</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#minValue">minValue</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The minimum y value of the returned result set</TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#JDBCXYDataset()">JDBCXYDataset</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new JDBCXYDataset (initially empty) with no database connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#JDBCXYDataset(java.sql.Connection)">JDBCXYDataset</A></B>(java.sql.Connection&nbsp;con)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new JDBCXYDataset (initially empty) using the specified database connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#JDBCXYDataset(java.sql.Connection, java.lang.String)">JDBCXYDataset</A></B>(java.sql.Connection&nbsp;con,              java.lang.String&nbsp;query)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new JDBCXYDataset using the specified database connection, and populates it using data obtained with the supplied query.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#JDBCXYDataset(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">JDBCXYDataset</A></B>(java.lang.String&nbsp;url,              java.lang.String&nbsp;driverName,              java.lang.String&nbsp;user,              java.lang.String&nbsp;passwd)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new JDBCXYDataset (initially empty) and establishes a new database connection.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#close()">close</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close the database connection</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#executeQuery(java.sql.Connection, java.lang.String)">executeQuery</A></B>(java.sql.Connection&nbsp;con,             java.lang.String&nbsp;query)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ExecuteQuery will attempt execute the query passed to it against the provided database connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#executeQuery(java.lang.String)">executeQuery</A></B>(java.lang.String&nbsp;query)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ExecuteQuery will attempt execute the query passed to it against the existing database connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getItemCount(int)">getItemCount</A></B>(int&nbsp;seriesIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of items in the specified series.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getLegendItemCount()">getLegendItemCount</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of items that should be displayed in the legend.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getLegendItemLabels()">getLegendItemLabels</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the legend item labels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Number</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getMaximumRangeValue()">getMaximumRangeValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum data value in the dataset's range.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Number</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getMinimumRangeValue()">getMinimumRangeValue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the minimum data value in the dataset's range.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getSeriesCount()">getSeriesCount</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of series in the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getSeriesName(int)">getSeriesName</A></B>(int&nbsp;seriesIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of the specified series.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../org/jfree/data/Range.html">Range</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getValueRange()">getValueRange</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the range of the values in this dataset's range (y-values).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Number</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getXValue(int, int)">getXValue</A></B>(int&nbsp;seriesIndex,          int&nbsp;itemIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the x-value for the specified series and item.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Number</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jfree/data/JDBCXYDataset.html#getYValue(int, int)">getYValue</A></B>(int&nbsp;seriesIndex,          int&nbsp;itemIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the y-value for the specified series and item.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_org.jfree.data.AbstractDataset"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class org.jfree.data.<A HREF="../../../org/jfree/data/AbstractDataset.html">AbstractDataset</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../org/jfree/data/AbstractDataset.html#addChangeListener(org.jfree.data.DatasetChangeListener)">addChangeListener</A>, <A HREF="../../../org/jfree/data/AbstractDataset.html#clone()">clone</A>, <A HREF="../../../org/jfree/data/AbstractDataset.html#fireDatasetChanged()">fireDatasetChanged</A>, <A HREF="../../../org/jfree/data/AbstractDataset.html#getGroup()">getGroup</A>, <A HREF="../../../org/jfree/data/AbstractDataset.html#notifyListeners(org.jfree.data.DatasetChangeEvent)">notifyListeners</A>, <A HREF="../../../org/jfree/data/AbstractDataset.html#removeChangeListener(org.jfree.data.DatasetChangeListener)">removeChangeListener</A>, <A HREF="../../../org/jfree/data/AbstractDataset.html#setGroup(org.jfree.data.DatasetGroup)">setGroup</A>, <A HREF="../../../org/jfree/data/AbstractDataset.html#validateObject()">validateObject</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_org.jfree.data.Dataset"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface org.jfree.data.<A HREF="../../../org/jfree/data/Dataset.html">Dataset</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../org/jfree/data/Dataset.html#addChangeListener(org.jfree.data.DatasetChangeListener)">addChangeListener</A>, <A HREF="../../../org/jfree/data/Dataset.html#getGroup()">getGroup</A>, <A HREF="../../../org/jfree/data/Dataset.html#removeChangeListener(org.jfree.data.DatasetChangeListener)">removeChangeListener</A>, <A HREF="../../../org/jfree/data/Dataset.html#setGroup(org.jfree.data.DatasetGroup)">setGroup</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="maxValue"><!-- --></A><H3>maxValue</H3><PRE>protected double <B>maxValue</B></PRE><DL><DD>The maximum y value of the returned result set<P><DL></DL></DL><HR><A NAME="minValue"><!-- --></A><H3>minValue</H3><PRE>protected double <B>minValue</B></PRE><DL><DD>The minimum y value of the returned result set<P><DL></DL></DL><HR><A NAME="isTimeSeries"><!-- --></A><H3>

⌨️ 快捷键说明

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