tablemodel.html
来自「API資料大全」· HTML 代码 · 共 375 行 · 第 1/2 页
HTML
375 行
</TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getRowCount()"><!-- --></A><H3>getRowCount</H3><PRE>public int <B>getRowCount</B>()</PRE><DL><DD>Returns the number of rows in the model. A <code>JTable</code> uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.<DD><DL><DT><B>Returns:</B><DD>the number of rows in the model<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableModel.html#getColumnCount()"><CODE>getColumnCount()</CODE></A></DL></DD></DL><HR><A NAME="getColumnCount()"><!-- --></A><H3>getColumnCount</H3><PRE>public int <B>getColumnCount</B>()</PRE><DL><DD>Returns the number of columns in the model. A <code>JTable</code> uses this method to determine how many columns it should create and display by default.<DD><DL><DT><B>Returns:</B><DD>the number of columns in the model<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableModel.html#getRowCount()"><CODE>getRowCount()</CODE></A></DL></DD></DL><HR><A NAME="getColumnName(int)"><!-- --></A><H3>getColumnName</H3><PRE>public <A HREF="../../../java/lang/String.html">String</A> <B>getColumnName</B>(int columnIndex)</PRE><DL><DD>Returns the name of the column at <code>columnIndex</code>. This is used to initialize the table's column header name. Note: this name does not need to be unique; two columns in a table can have the same name.<DD><DL><DT><B>Parameters:</B><DD><CODE>columnIndex</CODE> - the index of the column<DT><B>Returns:</B><DD>the name of the column</DL></DD></DL><HR><A NAME="getColumnClass(int)"><!-- --></A><H3>getColumnClass</H3><PRE>public <A HREF="../../../java/lang/Class.html">Class</A> <B>getColumnClass</B>(int columnIndex)</PRE><DL><DD>Returns the most specific superclass for all the cell values in the column. This is used by the <code>JTable</code> to set up a default renderer and editor for the column.<DD><DL><DT><B>Parameters:</B><DD><CODE>columnIndex</CODE> - the index of the column<DT><B>Returns:</B><DD>the common ancestor class of the object values in the model.</DL></DD></DL><HR><A NAME="isCellEditable(int, int)"><!-- --></A><H3>isCellEditable</H3><PRE>public boolean <B>isCellEditable</B>(int rowIndex, int columnIndex)</PRE><DL><DD>Returns true if the cell at <code>rowIndex</code> and <code>columnIndex</code> is editable. Otherwise, <code>setValueAt</code> on the cell will not change the value of that cell.<DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row whose value to be queried<DD><CODE>columnIndex</CODE> - the column whose value to be queried<DT><B>Returns:</B><DD>true if the cell is editable<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableModel.html#setValueAt(java.lang.Object, int, int)"><CODE>setValueAt(java.lang.Object, int, int)</CODE></A></DL></DD></DL><HR><A NAME="getValueAt(int, int)"><!-- --></A><H3>getValueAt</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>getValueAt</B>(int rowIndex, int columnIndex)</PRE><DL><DD>Returns the value for the cell at <code>columnIndex</code> and <code>rowIndex</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row whose value is to be queried<DD><CODE>columnIndex</CODE> - the column whose value is to be queried<DT><B>Returns:</B><DD>the value Object at the specified cell</DL></DD></DL><HR><A NAME="setValueAt(java.lang.Object, int, int)"><!-- --></A><H3>setValueAt</H3><PRE>public void <B>setValueAt</B>(<A HREF="../../../java/lang/Object.html">Object</A> aValue, int rowIndex, int columnIndex)</PRE><DL><DD>Sets the value in the cell at <code>columnIndex</code> and <code>rowIndex</code> to <code>aValue</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>aValue</CODE> - the new value<DD><CODE>rowIndex</CODE> - the row whose value is to be changed<DD><CODE>columnIndex</CODE> - the column whose value is to be changed<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableModel.html#getValueAt(int, int)"><CODE>getValueAt(int, int)</CODE></A>, <A HREF="../../../javax/swing/table/TableModel.html#isCellEditable(int, int)"><CODE>isCellEditable(int, int)</CODE></A></DL></DD></DL><HR><A NAME="addTableModelListener(javax.swing.event.TableModelListener)"><!-- --></A><H3>addTableModelListener</H3><PRE>public void <B>addTableModelListener</B>(<A HREF="../../../javax/swing/event/TableModelListener.html">TableModelListener</A> l)</PRE><DL><DD>Adds a listener to the list that is notified each time a change to the data model occurs.<DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the TableModelListener</DL></DD></DL><HR><A NAME="removeTableModelListener(javax.swing.event.TableModelListener)"><!-- --></A><H3>removeTableModelListener</H3><PRE>public void <B>removeTableModelListener</B>(<A HREF="../../../javax/swing/event/TableModelListener.html">TableModelListener</A> l)</PRE><DL><DD>Removes a listener from the list that is notified each time a change to the data model occurs.<DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the TableModelListener</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=2 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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TableModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/swing/table/TableColumnModel.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="TableModel.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?