defaulttablecolumnmodel.html

来自「API資料大全」· HTML 代码 · 共 1,050 行 · 第 1/4 页

HTML
1,050
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:41:47 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  DefaultTableColumnModel</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 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="class-use/DefaultTableColumnModel.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/DefaultTableCellRenderer.UIResource.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/swing/table/DefaultTableModel.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="DefaultTableColumnModel.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;<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">javax.swing.table</FONT><BR>Class  DefaultTableColumnModel</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A>  |  +--<B>javax.swing.table.DefaultTableColumnModel</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/util/EventListener.html">EventListener</A>, <A HREF="../../../javax/swing/event/ListSelectionListener.html">ListSelectionListener</A>, <A HREF="../../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A>, <A HREF="../../../java/io/Serializable.html">Serializable</A>, <A HREF="../../../javax/swing/table/TableColumnModel.html">TableColumnModel</A></DD></DL><HR><DL><DT>public class <B>DefaultTableColumnModel</B><DT>extends <A HREF="../../../java/lang/Object.html">Object</A><DT>implements <A HREF="../../../javax/swing/table/TableColumnModel.html">TableColumnModel</A>, <A HREF="../../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A>, <A HREF="../../../javax/swing/event/ListSelectionListener.html">ListSelectionListener</A>, <A HREF="../../../java/io/Serializable.html">Serializable</A></DL><P>The standard column-handler for a <code>JTable</code>. <p> <strong>Warning:</strong> Serialized objects of this class will not be compatible with future Swing releases.  The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing.  A future release of Swing will provide support for long term persistence.<P><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/swing/JTable.html"><CODE>JTable</CODE></A>, <A HREF="../../../serialized-form.html#javax.swing.table.DefaultTableColumnModel">Serialized Form</A></DL><HR><P><!-- ======== INNER 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>protected &nbsp;<A HREF="../../../javax/swing/event/ChangeEvent.html">ChangeEvent</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#changeEvent">changeEvent</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change event (only one needed)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#columnMargin">columnMargin</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Width margin between each column</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#columnSelectionAllowed">columnSelectionAllowed</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Column selection allowed in this column model</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../javax/swing/event/EventListenerList.html">EventListenerList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#listenerList">listenerList</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List of TableColumnModelListener</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#selectionModel">selectionModel</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Model for keeping track of column selections</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../java/util/Vector.html">Vector</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#tableColumns">tableColumns</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Array of TableColumn objects in this model</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#totalColumnWidth">totalColumnWidth</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A local cache of the combined width of all columns</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="../../../javax/swing/table/DefaultTableColumnModel.html#DefaultTableColumnModel()">DefaultTableColumnModel</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a default table column model.</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="../../../javax/swing/table/DefaultTableColumnModel.html#addColumn(javax.swing.table.TableColumn)">addColumn</A></B>(<A HREF="../../../javax/swing/table/TableColumn.html">TableColumn</A>&nbsp;aColumn)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends <code>aColumn</code> to the end of the  <code>tableColumns</code> array.</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="../../../javax/swing/table/DefaultTableColumnModel.html#addColumnModelListener(javax.swing.event.TableColumnModelListener)">addColumnModelListener</A></B>(<A HREF="../../../javax/swing/event/TableColumnModelListener.html">TableColumnModelListener</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener for table column model events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../javax/swing/ListSelectionModel.html">ListSelectionModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#createSelectionModel()">createSelectionModel</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new default list selection model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#fireColumnAdded(javax.swing.event.TableColumnModelEvent)">fireColumnAdded</A></B>(<A HREF="../../../javax/swing/event/TableColumnModelEvent.html">TableColumnModelEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#fireColumnMarginChanged()">fireColumnMarginChanged</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#fireColumnMoved(javax.swing.event.TableColumnModelEvent)">fireColumnMoved</A></B>(<A HREF="../../../javax/swing/event/TableColumnModelEvent.html">TableColumnModelEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#fireColumnRemoved(javax.swing.event.TableColumnModelEvent)">fireColumnRemoved</A></B>(<A HREF="../../../javax/swing/event/TableColumnModelEvent.html">TableColumnModelEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#fireColumnSelectionChanged(javax.swing.event.ListSelectionEvent)">fireColumnSelectionChanged</A></B>(<A HREF="../../../javax/swing/event/ListSelectionEvent.html">ListSelectionEvent</A>&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../javax/swing/table/TableColumn.html">TableColumn</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/table/DefaultTableColumnModel.html#getColumn(int)">getColumn</A></B>(int&nbsp;columnIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <code>TableColumn</code> object for the column at <code>columnIndex</code>.</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="../../../javax/swing/table/DefaultTableColumnModel.html#getColumnCount()">getColumnCount</A></B>()</CODE>

⌨️ 快捷键说明

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