Package com.tagtraum.beatunes.songtable
Class SongTableColumnModel
- java.lang.Object
-
- javax.swing.table.DefaultTableColumnModel
-
- com.tagtraum.beatunes.songtable.SongTableColumnModel
-
- All Implemented Interfaces:
FilterTableColumnModel
,PropertyChangeListener
,Serializable
,EventListener
,ListSelectionListener
,TableColumnModel
public class SongTableColumnModel extends DefaultTableColumnModel implements FilterTableColumnModel
Song Table ColumnModel.- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
ARTWORK_WIDE
static int
EXTRA_WIDE
static int
ID_WIDTH
static int
NARROW
static int
PROTECTED_WIDTH
static int
RATING_WIDTH
static int
WIDE
-
Fields inherited from class javax.swing.table.DefaultTableColumnModel
changeEvent, columnMargin, columnSelectionAllowed, listenerList, selectionModel, tableColumns, totalColumnWidth
-
-
Constructor Summary
Constructors Constructor Description SongTableColumnModel(JTable table, BeaTunes beaTunes)
Creates an empty TableColumnModel with no columns.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllPossibleColumns()
Adds all possible columns to the model.void
addStandardColumns()
Adds standard columns to the model.TableColumn[]
getPossibleTableColumns()
TableColumn[]
getStandardTableColumns()
void
moveColumn(int columnIndex, int newIndex)
TableColumn[]
preferredOrder(TableColumn[] columns)
Creates a new array of columns with the preferred order.-
Methods inherited from class javax.swing.table.DefaultTableColumnModel
addColumn, addColumnModelListener, createSelectionModel, fireColumnAdded, fireColumnMarginChanged, fireColumnMoved, fireColumnRemoved, fireColumnSelectionChanged, getColumn, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumnModelListeners, getColumns, getColumnSelectionAllowed, getListeners, getSelectedColumnCount, getSelectedColumns, getSelectionModel, getTotalColumnWidth, propertyChange, recalcWidthCache, removeColumn, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel, valueChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.table.TableColumnModel
addColumn, addColumnModelListener, getColumn, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumns, getColumnSelectionAllowed, getSelectedColumnCount, getSelectedColumns, getSelectionModel, getTotalColumnWidth, removeColumn, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel
-
-
-
-
Field Detail
-
WIDE
public static final int WIDE
-
EXTRA_WIDE
public static final int EXTRA_WIDE
-
ARTWORK_WIDE
public static final int ARTWORK_WIDE
-
NARROW
public static final int NARROW
-
ID_WIDTH
public static final int ID_WIDTH
-
RATING_WIDTH
public static final int RATING_WIDTH
-
PROTECTED_WIDTH
public static final int PROTECTED_WIDTH
-
-
Constructor Detail
-
SongTableColumnModel
public SongTableColumnModel(JTable table, BeaTunes beaTunes)
Creates an empty TableColumnModel with no columns. CallDefaultTableColumnModel.addColumn(javax.swing.table.TableColumn)
oraddAllPossibleColumns()
to register columns.- Parameters:
table
- tablebeaTunes
- beaTunes
-
-
Method Detail
-
moveColumn
public void moveColumn(int columnIndex, int newIndex)
- Specified by:
moveColumn
in interfaceTableColumnModel
- Overrides:
moveColumn
in classDefaultTableColumnModel
-
getPossibleTableColumns
public TableColumn[] getPossibleTableColumns()
- Specified by:
getPossibleTableColumns
in interfaceFilterTableColumnModel
- Returns:
- columns that are allowed in this model
-
getStandardTableColumns
public TableColumn[] getStandardTableColumns()
- Specified by:
getStandardTableColumns
in interfaceFilterTableColumnModel
- Returns:
- default columns for this model
-
preferredOrder
public TableColumn[] preferredOrder(TableColumn[] columns)
Description copied from interface:FilterTableColumnModel
Creates a new array of columns with the preferred order. This order is probably not likeFilterTableColumnModel.getPossibleTableColumns()
.- Specified by:
preferredOrder
in interfaceFilterTableColumnModel
- Parameters:
columns
- columns- Returns:
- same columns in preferred order
-
addAllPossibleColumns
public void addAllPossibleColumns()
Adds all possible columns to the model.
-
addStandardColumns
public void addStandardColumns()
Adds standard columns to the model.
-
-