tablecolumnmodel.html

来自「API資料大全」· HTML 代码 · 共 560 行 · 第 1/2 页

HTML
560
字号
<DD>Appends <code>aColumn</code> to the end of the  <code>tableColumns</code> array.  This method posts a <code>columnAdded</code>  event to its listeners.<DD><DL><DT><B>Parameters:</B><DD><CODE>aColumn</CODE> - the <code>TableColumn</code> to be added<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableColumnModel.html#removeColumn(javax.swing.table.TableColumn)"><CODE>removeColumn(javax.swing.table.TableColumn)</CODE></A></DL></DD></DL><HR><A NAME="removeColumn(javax.swing.table.TableColumn)"><!-- --></A><H3>removeColumn</H3><PRE>public void <B>removeColumn</B>(<A HREF="../../../javax/swing/table/TableColumn.html">TableColumn</A>&nbsp;column)</PRE><DL><DD>Deletes the <code>TableColumn</code> <code>column</code> from the   <code>tableColumns</code> array.  This method will do nothing if   <code>column</code> is not in the table's column list.  This method posts a <code>columnRemoved</code>  event to its listeners.<DD><DL><DT><B>Parameters:</B><DD><CODE>column</CODE> - the <code>TableColumn</code> to be removed<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableColumnModel.html#addColumn(javax.swing.table.TableColumn)"><CODE>addColumn(javax.swing.table.TableColumn)</CODE></A></DL></DD></DL><HR><A NAME="moveColumn(int, int)"><!-- --></A><H3>moveColumn</H3><PRE>public void <B>moveColumn</B>(int&nbsp;columnIndex,                       int&nbsp;newIndex)</PRE><DL><DD>Moves the column and its header at <code>columnIndex</code> to <code>newIndex</code>.  The old column at <code>columnIndex</code> will now be found at <code>newIndex</code>.  The column that used to be at <code>newIndex</code> is shifted left or right to make room.  This will not move any columns if <code>columnIndex</code> equals <code>newIndex</code>.  This method  posts a <code>columnMoved</code> event to its listeners.<DD><DL><DT><B>Parameters:</B><DD><CODE>columnIndex</CODE> - the index of column to be moved<DD><CODE>newIndex</CODE> - index of the column's new location<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>columnIndex</code> or                                           <code>newIndex</code>                                          are not in the valid range</DL></DD></DL><HR><A NAME="setColumnMargin(int)"><!-- --></A><H3>setColumnMargin</H3><PRE>public void <B>setColumnMargin</B>(int&nbsp;newMargin)</PRE><DL><DD>Sets the <code>TableColumn</code>'s column margin to <code>newMargin</code>.  This method posts a <code>columnMarginChanged</code> event to its listeners.<DD><DL><DT><B>Parameters:</B><DD><CODE>newMargin</CODE> - the width, in pixels, of the new column margins<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableColumnModel.html#getColumnMargin()"><CODE>getColumnMargin()</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.<DD><DL><DT><B>Returns:</B><DD>the number of columns in the model</DL></DD></DL><HR><A NAME="getColumns()"><!-- --></A><H3>getColumns</H3><PRE>public <A HREF="../../../java/util/Enumeration.html">Enumeration</A> <B>getColumns</B>()</PRE><DL><DD>Returns an <code>Enumeration</code> of all the columns in the model.<DD><DL><DT><B>Returns:</B><DD>an <code>Enumeration</code> of all the columns in the model</DL></DD></DL><HR><A NAME="getColumnIndex(java.lang.Object)"><!-- --></A><H3>getColumnIndex</H3><PRE>public int <B>getColumnIndex</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;columnIdentifier)</PRE><DL><DD>Returns the index of the first column in the table whose identifier is equal to <code>identifier</code>, when compared using <code>equals</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>columnIdentifier</CODE> - the identifier object<DT><B>Returns:</B><DD>the index of the first table column                  whose identifier is equal to <code>identifier</code><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>identifier</code>				is <code>null</code>, or no				<code>TableColumn</code> has this				<code>identifier</code><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableColumnModel.html#getColumn(int)"><CODE>getColumn(int)</CODE></A></DL></DD></DL><HR><A NAME="getColumn(int)"><!-- --></A><H3>getColumn</H3><PRE>public <A HREF="../../../javax/swing/table/TableColumn.html">TableColumn</A> <B>getColumn</B>(int&nbsp;columnIndex)</PRE><DL><DD>Returns the <code>TableColumn</code> object for the column at <code>columnIndex</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>columnIndex</CODE> - the index of the desired column<DT><B>Returns:</B><DD>the <code>TableColumn</code> object for				the column at <code>columnIndex</code></DL></DD></DL><HR><A NAME="getColumnMargin()"><!-- --></A><H3>getColumnMargin</H3><PRE>public int <B>getColumnMargin</B>()</PRE><DL><DD>Returns the width between the cells in each column.<DD><DL><DT><B>Returns:</B><DD>the margin, in pixels, between the cells</DL></DD></DL><HR><A NAME="getColumnIndexAtX(int)"><!-- --></A><H3>getColumnIndexAtX</H3><PRE>public int <B>getColumnIndexAtX</B>(int&nbsp;xPosition)</PRE><DL><DD>Returns the index of the column that lies on the  horizontal point, <code>xPosition</code>; or -1 if it lies outside the any of the column's bounds.<DD><DL><DT><B>Returns:</B><DD>the index of the column; or -1 if no column is found</DL></DD></DL><HR><A NAME="getTotalColumnWidth()"><!-- --></A><H3>getTotalColumnWidth</H3><PRE>public int <B>getTotalColumnWidth</B>()</PRE><DL><DD>Returns the total width of all the columns.<DD><DL><DT><B>Returns:</B><DD>the total computed width of all columns</DL></DD></DL><HR><A NAME="setColumnSelectionAllowed(boolean)"><!-- --></A><H3>setColumnSelectionAllowed</H3><PRE>public void <B>setColumnSelectionAllowed</B>(boolean&nbsp;flag)</PRE><DL><DD>Sets whether the columns in this model may be selected.<DD><DL><DT><B>Parameters:</B><DD><CODE>flag</CODE> - true if columns may be selected; otherwise false<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableColumnModel.html#getColumnSelectionAllowed()"><CODE>getColumnSelectionAllowed()</CODE></A></DL></DD></DL><HR><A NAME="getColumnSelectionAllowed()"><!-- --></A><H3>getColumnSelectionAllowed</H3><PRE>public boolean <B>getColumnSelectionAllowed</B>()</PRE><DL><DD>Returns true if columns may be selected.<DD><DL><DT><B>Returns:</B><DD>true if columns may be selected<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableColumnModel.html#setColumnSelectionAllowed(boolean)"><CODE>setColumnSelectionAllowed(boolean)</CODE></A></DL></DD></DL><HR><A NAME="getSelectedColumns()"><!-- --></A><H3>getSelectedColumns</H3><PRE>public int[] <B>getSelectedColumns</B>()</PRE><DL><DD>Returns an array of indicies of all selected columns.<DD><DL><DT><B>Returns:</B><DD>an array of integers containing the indicies of all		selected columns; or an empty array if nothing is selected</DL></DD></DL><HR><A NAME="getSelectedColumnCount()"><!-- --></A><H3>getSelectedColumnCount</H3><PRE>public int <B>getSelectedColumnCount</B>()</PRE><DL><DD>Returns the number of selected columns.<DD><DL><DT><B>Returns:</B><DD>the number of selected columns; or 0 if no columns are selected</DL></DD></DL><HR><A NAME="setSelectionModel(javax.swing.ListSelectionModel)"><!-- --></A><H3>setSelectionModel</H3><PRE>public void <B>setSelectionModel</B>(<A HREF="../../../javax/swing/ListSelectionModel.html">ListSelectionModel</A>&nbsp;newModel)</PRE><DL><DD>Sets the selection model.<DD><DL><DT><B>Parameters:</B><DD><CODE>newModel</CODE> - a <code>ListSelectionModel</code> object<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableColumnModel.html#getSelectionModel()"><CODE>getSelectionModel()</CODE></A></DL></DD></DL><HR><A NAME="getSelectionModel()"><!-- --></A><H3>getSelectionModel</H3><PRE>public <A HREF="../../../javax/swing/ListSelectionModel.html">ListSelectionModel</A> <B>getSelectionModel</B>()</PRE><DL><DD>Returns the current selection model.<DD><DL><DT><B>Returns:</B><DD>a <code>ListSelectionModel</code> object<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/table/TableColumnModel.html#setSelectionModel(javax.swing.ListSelectionModel)"><CODE>setSelectionModel(javax.swing.ListSelectionModel)</CODE></A></DL></DD></DL><HR><A NAME="addColumnModelListener(javax.swing.event.TableColumnModelListener)"><!-- --></A><H3>addColumnModelListener</H3><PRE>public void <B>addColumnModelListener</B>(<A HREF="../../../javax/swing/event/TableColumnModelListener.html">TableColumnModelListener</A>&nbsp;x)</PRE><DL><DD>Adds a listener for table column model events.<DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - a <code>TableColumnModelListener</code> object</DL></DD></DL><HR><A NAME="removeColumnModelListener(javax.swing.event.TableColumnModelListener)"><!-- --></A><H3>removeColumnModelListener</H3><PRE>public void <B>removeColumnModelListener</B>(<A HREF="../../../javax/swing/event/TableColumnModelListener.html">TableColumnModelListener</A>&nbsp;x)</PRE><DL><DD>Removes a listener for table column model events.<DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - a <code>TableColumnModelListener</code> object</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>&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="class-use/TableColumnModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/swing/table/TableCellRenderer.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/swing/table/TableModel.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="TableColumnModel.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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 + -
显示快捷键?