|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.ui.main.table.FileTableColumnModel
public class FileTableColumnModel
Used to keep track of a file table's columns position and visibility settings.
| Constructor Summary | |
|---|---|
FileTableColumnModel(FileTableConfiguration conf)
Creates a new file table column model. |
|
| Method Summary | |
|---|---|
void |
addColumn(javax.swing.table.TableColumn column)
Adds the specified column to the model. |
void |
addColumnModelListener(javax.swing.event.TableColumnModelListener listener)
Registers the specified column model listener. |
java.util.Enumeration |
getAllColumns()
|
javax.swing.table.TableColumn |
getColumn(int index)
Returns the specified column. |
int |
getColumnCount()
Returns the number of columns currently displayed. |
javax.swing.table.TableColumn |
getColumnFromId(int id)
|
int |
getColumnIndex(java.lang.Object identifier)
|
int |
getColumnIndexAtX(int x)
Returns the index of the column at the specified position. |
int |
getColumnMargin()
Returns 0. |
int |
getColumnPosition(int id)
|
java.util.Enumeration |
getColumns()
Returns an enumeration on all visible columns. |
boolean |
getColumnSelectionAllowed()
Returns false. |
FileTableConfiguration |
getConfiguration()
|
int |
getSelectedColumnCount()
Returns 0. |
int[] |
getSelectedColumns()
Returns an integer array of size 0. |
javax.swing.ListSelectionModel |
getSelectionModel()
Returns a default list selection model. |
int |
getTotalColumnWidth()
Returns the total width of the table column model. |
boolean |
isColumnEnabled(int id)
Returns true if the specified column is enabled. |
boolean |
isColumnVisible(int id)
Returns true if the specified column is visible. |
void |
moveColumn(int from,
int to)
Moves a column. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Invalidates the width cache if a column's width has changed. |
void |
removeColumn(javax.swing.table.TableColumn column)
Removes the specified column from the model. |
void |
removeColumnModelListener(javax.swing.event.TableColumnModelListener listener)
Removes the specified column model listener. |
void |
setColumnEnabled(int id,
boolean enabled)
Sets the specified column's enabled state. |
void |
setColumnMargin(int margin)
Ignored. |
void |
setColumnSelectionAllowed(boolean flag)
Ignored. |
void |
setSelectionModel(javax.swing.ListSelectionModel model)
Ignored. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileTableColumnModel(FileTableConfiguration conf)
| Method Detail |
|---|
public FileTableConfiguration getConfiguration()
public boolean isColumnEnabled(int id)
true if the specified column is enabled.
id - a column identifier, see Columns for allowed values.
public void setColumnEnabled(int id,
boolean enabled)
id - a column identifier, see Columns for allowed values.enabled - true to enable the column, false to disable it.public boolean isColumnVisible(int id)
true if the specified column is visible.
id - identifier of the column as definied in Columns.
true if the specified column is visible, false otherwise.public void addColumn(javax.swing.table.TableColumn column)
addColumn in interface javax.swing.table.TableColumnModelcolumn - column to add to the model.public void removeColumn(javax.swing.table.TableColumn column)
removeColumn in interface javax.swing.table.TableColumnModelcolumn - column to remove from the model.public javax.swing.table.TableColumn getColumn(int index)
getColumn in interface javax.swing.table.TableColumnModelindex - index of the column in the model.
public javax.swing.table.TableColumn getColumnFromId(int id)
public int getColumnPosition(int id)
public int getColumnCount()
getColumnCount in interface javax.swing.table.TableColumnModel
public void moveColumn(int from,
int to)
moveColumn in interface javax.swing.table.TableColumnModelfrom - index of the column to move.to - where to move the column.public int getColumnIndex(java.lang.Object identifier)
getColumnIndex in interface javax.swing.table.TableColumnModelpublic int getColumnIndexAtX(int x)
getColumnIndexAtX in interface javax.swing.table.TableColumnModelx - position of the column to look for.
-1 if not found.public int getTotalColumnWidth()
getTotalColumnWidth in interface javax.swing.table.TableColumnModelpublic void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerpublic int getColumnMargin()
getColumnMargin in interface javax.swing.table.TableColumnModelpublic void setColumnMargin(int margin)
setColumnMargin in interface javax.swing.table.TableColumnModelpublic void addColumnModelListener(javax.swing.event.TableColumnModelListener listener)
addColumnModelListener in interface javax.swing.table.TableColumnModellistener - listener to register.public void removeColumnModelListener(javax.swing.event.TableColumnModelListener listener)
removeColumnModelListener in interface javax.swing.table.TableColumnModellistener - listener to remove.public boolean getColumnSelectionAllowed()
false.
getColumnSelectionAllowed in interface javax.swing.table.TableColumnModelfalse.public int getSelectedColumnCount()
0.
getSelectedColumnCount in interface javax.swing.table.TableColumnModel0.public int[] getSelectedColumns()
getSelectedColumns in interface javax.swing.table.TableColumnModelpublic void setColumnSelectionAllowed(boolean flag)
setColumnSelectionAllowed in interface javax.swing.table.TableColumnModelpublic javax.swing.ListSelectionModel getSelectionModel()
Ideally, we'd like to return null here, but the table API takes a dim view
of this and we're forced to keep a useless reference.
getSelectionModel in interface javax.swing.table.TableColumnModelpublic void setSelectionModel(javax.swing.ListSelectionModel model)
setSelectionModel in interface javax.swing.table.TableColumnModelpublic java.util.Enumeration getColumns()
getColumns in interface javax.swing.table.TableColumnModelpublic java.util.Enumeration getAllColumns()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard