Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /* 2 * This file is part of the Echo Web Application Framework (hereinafter "Echo").3 * Copyright (C) 2002-2005 NextApp, Inc.4 *5 * Version: MPL 1.1/GPL 2.0/LGPL 2.16 *7 * The contents of this file are subject to the Mozilla Public License Version8 * 1.1 (the "License"); you may not use this file except in compliance with9 * the License. You may obtain a copy of the License at10 * http://www.mozilla.org/MPL/11 *12 * Software distributed under the License is distributed on an "AS IS" basis,13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License14 * for the specific language governing rights and limitations under the15 * License.16 *17 * Alternatively, the contents of this file may be used under the terms of18 * either the GNU General Public License Version 2 or later (the "GPL"), or19 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),20 * in which case the provisions of the GPL or the LGPL are applicable instead21 * of those above. If you wish to allow use of your version of this file only22 * under the terms of either the GPL or the LGPL, and not to allow others to23 * use your version of this file under the terms of the MPL, indicate your24 * decision by deleting the provisions above and replace them with the notice25 * and other provisions required by the GPL or the LGPL. If you do not delete26 * the provisions above, a recipient may use your version of this file under27 * the terms of any one of the MPL, the GPL or the LGPL.28 */29 30 package nextapp.echo2.app.table;31 32 importjava.io.Serializable;33 importjava.util.Iterator;34 35 importnextapp.echo2.app.event.TableColumnModelListener;36 37 /**38 * A representation of the collection of <code>TableColumn</code>s of a39 * <code>Table</code>.40 */41 publicinterface TableColumnModel42 extendsSerializable {43 44 /**45 * Adds a table column to the end of the model.46 *47 * @param column the column to add48 */49 publicvoid addColumn(TableColumn column);50 51 /**52 * Adds a listener to be notified of updates to this53 * <code>TableColumnModel</code>.54 *55 * @param l the listener to add56 */57 publicvoid addColumnModelListener(TableColumnModelListener l);58 59 /**60 * Returns the <code>TableColumn</code> at the specified index.61 *62 * @param columnIndex the index63 * @return the column64 */65 publicTableColumn getColumn(int columnIndex);66 67 /**68 * Returns the number of columns in the column model.69 *70 * @return the number of columns71 */72 publicint getColumnCount();73 74 /**75 * Returns the index of the table column with the given identifier.76 *77 * @param identifier the identifier 78 * @return the index79 * @throws IllegalArgumentException if the value of <code>identifier</code>80 * is null or if the no column was found with the given identifier81 */82 publicint getColumnIndex(Object identifier);83 84 /**85 * Returns an <code>Iterator</code> over the columns of the column model.86 *87 * @return the <code>Iterator</code>88 */89 publicIterator getColumns();90 91 /**92 * Moves a table column to a new index within the model.93 *94 * @param columnIndex the index of the column to move95 * @param newIndex the new index of the specified column96 */97 publicvoid moveColumn(int columnIndex, int newIndex);98 99 /**100 * Remove a table column from the model.101 *102 * @param column the column to remove103 */104 publicvoid removeColumn(TableColumn column);105 106 /**107 * Removes a listener from being notified of updates to this108 * <code>TableColumnModel</code>.109 *110 * @param l the listener to remove111 */112 publicvoid removeColumnModelListener(TableColumnModelListener l);113 }114