001 package de.mospace.swing.table;
002
003 /* Mp3dings - manage mp3 meta-information
004 * Copyright (C) 2003 Moritz Ringler
005 * $Id: FieldAssociatedTableModel.java 12 2007-07-27 09:48:53Z ringler $
006 *
007 * This program is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU General Public License
009 * as published by the Free Software Foundation; either version 2
010 * of the License, or (at your option) any later version.
011 *
012 * This program is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015 * GNU General Public License for more details.
016 *
017 * You should have received a copy of the GNU General Public License
018 * along with this program; if not, write to the Free Software
019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
020 */
021
022 import javax.swing.table.TableModel;
023
024 /** A TableModel whose columns are associated with data fields
025 * represented by unique int values.
026 * @deprecated This class is no longer used by mp3dings, integer
027 * field identifiers have been replaced by Field objects.
028 *
029 * @version $Revision: 12 $ ($Date: 2007-07-27 11:48:53 +0200 (Fr, 27 Jul 2007) $)
030 * @author Moritz Ringler
031 **/
032 public interface FieldAssociatedTableModel extends TableModel{
033 /** Returns the identifier of the field currently associated
034 * with the specified table column.
035 * @param col the column number for which to retrieve the field
036 * @return the field identifier or a value of -1 if col is invalid
037 **/
038 public int getColumnID(int col);
039
040 /** Returns the column number of the column currently associated with
041 * the specified field.
042 * @param id an int value identifying an allowed data field
043 * @return the column number of the associated column or a value of
044 * -1 if no column is associated with that field identifier.
045 **/
046 public int getColForID(int id);
047
048 /** Returns the fields that can be displayed in a table.
049 * @return An array of integer field identifiers.
050 */
051 public int[] getAllowedFields();
052
053 /** Returns the fields that must always be displayed.
054 * @return An array of integer field identifiers.
055 */
056 public int[] getPersistentFields();
057
058 /** Returns the fields that are displayed by default.
059 * @return An array of integer field identifiers.
060 */
061 public int[] getDefaultFields();
062
063 /** Returns the editable property for an allowed field.*/
064 public boolean getEditable(int fieldID);
065
066 /** Returns the fields that currently have table columns associated with
067 * them.
068 * @return An array of integer field identifiers.
069 */
070 public int[] getFields();
071 }