1 /* DefaultTableColumnModel.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package javax
.swing
.table
;
41 import java
.beans
.PropertyChangeEvent
;
42 import java
.beans
.PropertyChangeListener
;
43 import java
.io
.Serializable
;
44 import java
.util
.Enumeration
;
45 import java
.util
.EventListener
;
46 import java
.util
.Vector
;
47 import javax
.swing
.ListSelectionModel
;
48 import javax
.swing
.event
.ChangeEvent
;
49 import javax
.swing
.event
.EventListenerList
;
50 import javax
.swing
.event
.ListSelectionEvent
;
51 import javax
.swing
.event
.ListSelectionListener
;
52 import javax
.swing
.event
.TableColumnModelEvent
;
53 import javax
.swing
.event
.TableColumnModelListener
;
56 * DefaultTableColumnModel
57 * @author Andrew Selkirk
60 public class DefaultTableColumnModel
61 implements TableColumnModel
, PropertyChangeListener
,
62 ListSelectionListener
, Serializable
64 static final long serialVersionUID
= 6580012493508960512L;
66 //-------------------------------------------------------------
67 // Variables --------------------------------------------------
68 //-------------------------------------------------------------
73 protected Vector tableColumns
;
78 protected ListSelectionModel selectionModel
;
83 protected int columnMargin
;
88 protected EventListenerList listenerList
;
93 protected transient ChangeEvent changeEvent
;
96 * columnSelectionAllowed
98 protected boolean columnSelectionAllowed
;
103 protected int totalColumnWidth
;
106 //-------------------------------------------------------------
107 // Initialization ---------------------------------------------
108 //-------------------------------------------------------------
111 * Constructor DefaultTableColumnModel
113 public DefaultTableColumnModel() {
115 } // DefaultTableColumnModel()
118 //-------------------------------------------------------------
119 // Methods ----------------------------------------------------
120 //-------------------------------------------------------------
126 public void addColumn(TableColumn value0
) {
134 public void removeColumn(TableColumn value0
) {
143 public void moveColumn(int value0
, int value1
) {
151 public void setColumnMargin(int value0
) {
153 } // setColumnMargin()
159 public int getColumnCount() {
161 } // getColumnCount()
165 * @returns Enumeration
167 public Enumeration
getColumns() {
176 public int getColumnIndex(Object value0
) {
178 } // getColumnIndex()
183 * @returns TableColumn
185 public TableColumn
getColumn(int value0
) {
193 public int getColumnMargin() {
195 } // getColumnMargin()
202 public int getColumnIndexAtX(int value0
) {
204 } // getColumnIndexAtX()
207 * getTotalColumnWidth
210 public int getTotalColumnWidth() {
212 } // getTotalColumnWidth()
218 public void setSelectionModel(ListSelectionModel value0
) {
220 } // setSelectionModel()
224 * @returns ListSelectionModel
226 public ListSelectionModel
getSelectionModel() {
228 } // getSelectionModel()
231 * setColumnSelectionAllowed
234 public void setColumnSelectionAllowed(boolean value0
) {
236 } // setColumnSelectionAllowed()
239 * getColumnSelectionAllowed
242 public boolean getColumnSelectionAllowed() {
243 return false; // TODO
244 } // getColumnSelectionAllowed()
250 public int[] getSelectedColumns() {
252 } // getSelectedColumns()
255 * getSelectedColumnCount
258 public int getSelectedColumnCount() {
260 } // getSelectedColumnCount()
263 * addColumnModelListener
266 public void addColumnModelListener(TableColumnModelListener value0
) {
268 } // addColumnModelListener()
271 * removeColumnModelListener
274 public void removeColumnModelListener(TableColumnModelListener value0
) {
276 } // removeColumnModelListener()
282 protected void fireColumnAdded(TableColumnModelEvent value0
) {
284 } // fireColumnAdded()
290 protected void fireColumnRemoved(TableColumnModelEvent value0
) {
292 } // fireColumnRemoved()
298 protected void fireColumnMoved(TableColumnModelEvent value0
) {
300 } // fireColumnMoved()
303 * fireColumnSelectionChanged
306 protected void fireColumnSelectionChanged(ListSelectionEvent value0
) {
308 } // fireColumnSelectionChanged()
311 * fireColumnMarginChanged
313 protected void fireColumnMarginChanged() {
315 } // fireColumnMarginChanged()
320 * @returns EventListener[]
322 public EventListener
[] getListeners(Class value0
) {
330 public void propertyChange(PropertyChangeEvent value0
) {
332 } // propertyChange()
338 public void valueChanged(ListSelectionEvent value0
) {
343 * createSelectionModel
344 * @returns ListSelectionModel
346 protected ListSelectionModel
createSelectionModel() {
348 } // createSelectionModel()
353 protected void recalcWidthCache() {
355 } // recalcWidthCache()
358 * invalidateWidthCache
360 private void invalidateWidthCache() {
362 } // invalidateWidthCache()
365 } // DefaultTableColumnModel