tablecolumn.html
来自「API資料大全」· HTML 代码 · 共 1,325 行 · 第 1/4 页
HTML
1,325 行
<CODE> <A HREF="../../../javax/swing/table/TableCellEditor.html">TableCellEditor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getCellEditor()">getCellEditor</A></B>()</CODE><BR> Returns the <code>TableCellEditor</code> used by the <code>JTable</code> to edit values for this column.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/table/TableCellRenderer.html">TableCellRenderer</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getCellRenderer()">getCellRenderer</A></B>()</CODE><BR> Returns the <code>TableCellRenderer</code> used by the <code>JTable</code> to draw values for this column.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/table/TableCellRenderer.html">TableCellRenderer</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getHeaderRenderer()">getHeaderRenderer</A></B>()</CODE><BR> Returns the <code>TableCellRenderer</code> used to draw the header of the <code>TableColumn</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getHeaderValue()">getHeaderValue</A></B>()</CODE><BR> Returns the <code>Object</code> used as the value for the header renderer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getIdentifier()">getIdentifier</A></B>()</CODE><BR> Returns the <code>identifier</code> object for this column.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getMaxWidth()">getMaxWidth</A></B>()</CODE><BR> Returns the maximum width for the <code>TableColumn</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getMinWidth()">getMinWidth</A></B>()</CODE><BR> Returns the minimum width for the <code>TableColumn</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getModelIndex()">getModelIndex</A></B>()</CODE><BR> Returns the model index for this column.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getPreferredWidth()">getPreferredWidth</A></B>()</CODE><BR> Returns the preferred width of the <code>TableColumn</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getResizable()">getResizable</A></B>()</CODE><BR> Returns true if the user is allowed to resize the <code>TableColumn</code>'s width, false otherwise.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#getWidth()">getWidth</A></B>()</CODE><BR> Returns the width of the <code>TableColumn</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#removePropertyChangeListener(java.beans.PropertyChangeListener)">removePropertyChangeListener</A></B>(<A HREF="../../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A> listener)</CODE><BR> Removes a <code>PropertyChangeListener</code> from the listener list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setCellEditor(javax.swing.table.TableCellEditor)">setCellEditor</A></B>(<A HREF="../../../javax/swing/table/TableCellEditor.html">TableCellEditor</A> cellEditor)</CODE><BR> Sets the editor to used by when a cell in this column is edited.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setCellRenderer(javax.swing.table.TableCellRenderer)">setCellRenderer</A></B>(<A HREF="../../../javax/swing/table/TableCellRenderer.html">TableCellRenderer</A> cellRenderer)</CODE><BR> Sets the <code>TableCellRenderer</code> used by <code>JTable</code> to draw individual values for this column.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setHeaderRenderer(javax.swing.table.TableCellRenderer)">setHeaderRenderer</A></B>(<A HREF="../../../javax/swing/table/TableCellRenderer.html">TableCellRenderer</A> headerRenderer)</CODE><BR> Sets the <code>TableCellRenderer</code> used to draw the <code>TableColumn</code>'s header to <code>headerRenderer</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setHeaderValue(java.lang.Object)">setHeaderValue</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> headerValue)</CODE><BR> Sets the <code>Object</code> whose string representation will be used as the value for the <code>headerRenderer</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setIdentifier(java.lang.Object)">setIdentifier</A></B>(<A HREF="../../../java/lang/Object.html">Object</A> identifier)</CODE><BR> Sets the <code>TableColumn</code>'s identifier to <code>anIdentifier</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setMaxWidth(int)">setMaxWidth</A></B>(int maxWidth)</CODE><BR> Sets the <code>TableColumn</code>'s maximum width to <code>maxWidth</code>; also adjusts the width and preferred width if they are greater than this value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setMinWidth(int)">setMinWidth</A></B>(int minWidth)</CODE><BR> Sets the <code>TableColumn</code>'s minimum width to <code>minWidth</code>; also adjusts the current width and preferred width if they are less than this value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setModelIndex(int)">setModelIndex</A></B>(int modelIndex)</CODE><BR> Sets the model index for this column.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setPreferredWidth(int)">setPreferredWidth</A></B>(int preferredWidth)</CODE><BR> Sets this column's preferred width to <code>preferredWidth</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setResizable(boolean)">setResizable</A></B>(boolean isResizable)</CODE><BR> Sets whether this column can be resized.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#setWidth(int)">setWidth</A></B>(int width)</CODE><BR> This method should not be used to set the widths of columns in the <code>JTable</code>, use <code>setPreferredWidth</code> instead.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/TableColumn.html#sizeWidthToFit()">sizeWidthToFit</A></B>()</CODE><BR> Resizes the <code>TableColumn</code> to fit the width of its header cell.</TD></TR></TABLE> <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.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <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="COLUMN_WIDTH_PROPERTY"><!-- --></A><H3>COLUMN_WIDTH_PROPERTY</H3><PRE>public static final <A HREF="../../../java/lang/String.html">String</A> <B>COLUMN_WIDTH_PROPERTY</B></PRE><DL><DD>Obsolete as of Java 2 platform v1.3. Please use string literals to identify properties.</DL><HR><A NAME="HEADER_VALUE_PROPERTY"><!-- --></A><H3>HEADER_VALUE_PROPERTY</H3><PRE>public static final <A HREF="../../../java/lang/String.html">String</A> <B>HEADER_VALUE_PROPERTY</B></PRE><DL><DD>Obsolete as of Java 2 platform v1.3. Please use string literals to identify properties.</DL><HR><A NAME="HEADER_RENDERER_PROPERTY"><!-- --></A><H3>HEADER_RENDERER_PROPERTY</H3><PRE>public static final <A HREF="../../../java/lang/String.html">String</A> <B>HEADER_RENDERER_PROPERTY</B></PRE><DL><DD>Obsolete as of Java 2 platform v1.3. Please use string literals to identify properties.</DL><HR><A NAME="CELL_RENDERER_PROPERTY"><!-- --></A><H3>CELL_RENDERER_PROPERTY</H3><PRE>public static final <A HREF="../../../java/lang/String.html">String</A> <B>CELL_RENDERER_PROPERTY</B></PRE><DL><DD>Obsolete as of Java 2 platform v1.3. Please use string literals to identify properties.</DL><HR><A NAME="modelIndex"><!-- --></A><H3>modelIndex</H3><PRE>protected int <B>modelIndex</B></PRE><DL><DD>The index of the column in the model which is to be displayed by this <code>TableColumn</code>. As columns are moved around in the view <code>modelIndex</code> remains constant.</DL><HR><A NAME="identifier"><!-- --></A><H3>identifier</H3><PRE>protected <A HREF="../../../java/lang/Object.html">Object</A> <B>identifier</B></PRE><DL><DD>This object is not used internally by the drawing machinery of the <code>JTable</code>; identifiers may be set in the <code>TableColumn</code> as as an optional way to tag and locate table columns. The table package does not modify or invoke any methods in these identifer objects other than the <code>equals</code> method which is used in the <code>getColumnIndex()</code> method in the <code>DefaultTableColumnModel</code>.</DL><HR><A NAME="width"><!-- --></A><H3>width</H3><PRE>protected int <B>width</B></PRE><DL><DD>The width of the column.</DL><HR><A NAME="minWidth"><!-- --></A><H3>minWidth</H3><PRE>protected int <B>minWidth</B></PRE><DL><DD>The minimum width of the column.</DL><HR><A NAME="maxWidth"><!-- --></A><H3>maxWidth</H3><PRE>protected int <B>maxWidth</B></PRE><DL><DD>The maximum width of the column.</DL><HR><A NAME="headerRenderer"><!-- --></A><H3>headerRenderer</H3><PRE>protected <A HREF="../../../javax/swing/table/TableCellRenderer.html">TableCellRenderer</A> <B>headerRenderer</B></PRE><DL><DD>The renderer used to draw the header of the column.</DL><HR><A NAME="headerValue"><!-- --></A><H3>headerValue</H3><PRE>protected <A HREF="../../../java/lang/Object.html">Object</A> <B>headerValue</B></PRE><DL><DD>The header value of the column.</DL><HR><A NAME="cellRenderer"><!-- --></A><H3>cellRenderer</H3>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?