Merge from the pain train
[official-gcc.git] / libjava / javax / swing / table / TableColumnModel.java
blob1c036d8a11e0a4e9e4a5948f06bb85bc0a21b148
1 /* TableColumnModel.java --
2 Copyright (C) 2002, 2004 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)
9 any later version.
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
19 02111-1307 USA.
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
24 combination.
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.util.Enumeration;
43 import javax.swing.ListSelectionModel;
44 import javax.swing.event.TableColumnModelListener;
46 /**
47 * TableColumnModel public interface
48 * @author Andrew Selkirk
50 public interface TableColumnModel
52 /**
53 * addColumn
54 * @param column TableColumn
56 void addColumn(TableColumn column);
58 /**
59 * removeColumn
60 * @param column TableColumn
62 void removeColumn(TableColumn column);
64 /**
65 * moveColumn
66 * @param columnIndex Index of column to move
67 * @param newIndex New index of column
69 void moveColumn(int columnIndex, int newIndex);
71 /**
72 * setColumnMargin
73 * @param margin Margin of column
75 void setColumnMargin(int margin);
77 /**
78 * getColumnCount
79 * @return Column count
81 int getColumnCount();
83 /**
84 * getColumns
85 * @return Enumeration of columns
87 Enumeration getColumns();
89 /**
90 * getColumnIndex
91 * @param columnIdentifier Column id
93 int getColumnIndex(Object columnIdentifier);
95 /**
96 * getColumn
97 * @param columnIndex Index of column
99 TableColumn getColumn(int columnIndex);
102 * getColumnMargin
103 * @return Column margin
105 int getColumnMargin();
108 * getColumnIndexAtX
109 * @return Column index as position x
111 int getColumnIndexAtX(int xPosition);
114 * getTotalColumnWidth
115 * @return Total column width
117 int getTotalColumnWidth();
120 * setColumnSelectionAllowed
121 * @param value Set column selection
123 void setColumnSelectionAllowed(boolean value);
126 * getColumnSelectionAllowed
127 * @return true if column selection allowed, false otherwise
129 boolean getColumnSelectionAllowed();
132 * getSelectedColumns
133 * @return Selected columns
135 int[] getSelectedColumns();
138 * getSelectedColumnCount
139 * @return Count of selected columns
141 int getSelectedColumnCount();
144 * setSelectionModel
145 * @param model ListSelectionModel
147 void setSelectionModel(ListSelectionModel model);
150 * getSelectionModel
151 * @param column TableColumn
153 ListSelectionModel getSelectionModel();
156 * addColumnModelListener
157 * @param listener TableColumnModelListener
159 void addColumnModelListener(TableColumnModelListener listener);
162 * removeColumnModelListener
163 * @param listener TableColumnModelListener
165 void removeColumnModelListener(TableColumnModelListener listener);