javax.swing.plaf.metal
Class MetalFileChooserUI.DetailsTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjavax.swing.plaf.metal.MetalFileChooserUI.DetailsTableModel
All Implemented Interfaces:
EventListener, ListDataListener, Serializable, TableModel
Enclosing class:
MetalFileChooserUI

class MetalFileChooserUI.DetailsTableModel
extends AbstractTableModel
implements ListDataListener


Field Summary
(package private)  JFileChooser chooser
           
(package private)  String[] columnNames
           
(package private)  ListModel listModel
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
(package private) MetalFileChooserUI.DetailsTableModel(JFileChooser fc)
           
 
Method Summary
 void contentsChanged(ListDataEvent e)
          Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.
 Class getColumnClass(int column)
          Returns Object.class regardless of columnIndex.
 int getColumnCount()
          Returns the number of columns in the model.
 String getColumnName(int column)
          Returns a default name for the column using spreadsheet conventions: A, B, C, ...
 int getRowCount()
          Returns the number of rows in the model.
 Object getValueAt(int row, int col)
          Returns the value for the cell at columnIndex and rowIndex.
 void intervalAdded(ListDataEvent e)
          Sent after the indices in the index0,index1 interval have been inserted in the data model.
 void intervalRemoved(ListDataEvent e)
          Sent after the indices in the index0,index1 interval have been removed from the data model.
 boolean isCellEditable(int row, int column)
          Returns false.
 void setValueAt(Object value, int row, int col)
          This empty implementation is provided so users don't have to implement this method if their data model is not editable.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnNames

String[] columnNames

chooser

JFileChooser chooser

listModel

ListModel listModel
Constructor Detail

MetalFileChooserUI.DetailsTableModel

MetalFileChooserUI.DetailsTableModel(JFileChooser fc)
Method Detail

getRowCount

public int getRowCount()
Description copied from interface: TableModel
Returns the number of rows in the model. A JTable uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.

Specified by:
getRowCount in interface TableModel
Returns:
the number of rows in the model
See Also:
TableModel.getColumnCount()

getColumnCount

public int getColumnCount()
Description copied from interface: TableModel
Returns the number of columns in the model. A JTable uses this method to determine how many columns it should create and display by default.

Specified by:
getColumnCount in interface TableModel
Returns:
the number of columns in the model
See Also:
TableModel.getRowCount()

getColumnName

public String getColumnName(int column)
Description copied from class: AbstractTableModel
Returns a default name for the column using spreadsheet conventions: A, B, C, ... Z, AA, AB, etc. If column cannot be found, returns an empty string.

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel
Parameters:
column - the column being queried
Returns:
a string containing the default name of column

getColumnClass

public Class getColumnClass(int column)
Description copied from class: AbstractTableModel
Returns Object.class regardless of columnIndex.

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel
Parameters:
column - the column being queried
Returns:
the Object.class

getValueAt

public Object getValueAt(int row,
                         int col)
Description copied from interface: TableModel
Returns the value for the cell at columnIndex and rowIndex.

Specified by:
getValueAt in interface TableModel
Parameters:
row - the row whose value is to be queried
col - the column whose value is to be queried
Returns:
the value Object at the specified cell

setValueAt

public void setValueAt(Object value,
                       int row,
                       int col)
Description copied from class: AbstractTableModel
This empty implementation is provided so users don't have to implement this method if their data model is not editable.

Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel
Parameters:
value - value to assign to cell
row - row of cell
col - column of cell

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Description copied from class: AbstractTableModel
Returns false. This is the default implementation for all cells.

Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel
Parameters:
row - the row being queried
column - the column being queried
Returns:
false

contentsChanged

public void contentsChanged(ListDataEvent e)
Description copied from interface: ListDataListener
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods. For example, this is sent when an item has been replaced. Index0 and index1 bracket the change.

Specified by:
contentsChanged in interface ListDataListener
Parameters:
e - a ListDataEvent encapsulating the event information

intervalAdded

public void intervalAdded(ListDataEvent e)
Description copied from interface: ListDataListener
Sent after the indices in the index0,index1 interval have been inserted in the data model. The new interval includes both index0 and index1.

Specified by:
intervalAdded in interface ListDataListener
Parameters:
e - a ListDataEvent encapsulating the event information

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Description copied from interface: ListDataListener
Sent after the indices in the index0,index1 interval have been removed from the data model. The interval includes both index0 and index1.

Specified by:
intervalRemoved in interface ListDataListener
Parameters:
e - a ListDataEvent encapsulating the event information