|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
net.sourceforge.jsh3modtool.gui.imagetable.ImageTableModel
public class ImageTableModel
A model for a JTable oontaining images
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
ImageTableModel(int cols)
Creates a new instance of BrowseTableModel |
Method Summary | |
---|---|
void |
addFilter(CellFilter filter)
Adds the filter to the filters list, the filter is used until it is removed from this list. |
void |
addImageModel(ImageModel imageModel)
|
void |
addImageModels(java.util.List filesList)
Adds the specified images to the model |
void |
clear()
Removes all items from the model |
boolean |
contains(BaseCell cell)
Returns if the model contains the specified cell |
void |
fireTableCellUpdate(BaseCell cell)
Fires a cell update. |
int |
getColumnCount()
Returns the number of columns in the model. |
int |
getRowCount()
Returns the number of rows in the model. |
int |
getSize()
Returns the number of images in the model |
JTableUtil.Cell |
getTableCell(BaseCell cell)
Returns a JTableUtil.Cell from the specified list index |
java.lang.Object |
getValueAt(int row,
int col)
Returns the value for the cell at columnIndex and
rowIndex . |
java.lang.Object |
getValueAt(JTableUtil.Cell cell)
Returns the value for the cell at columnIndex and
rowIndex . |
void |
imageIsLoaded(BaseCell cell)
Invoked when an image has been loaded, specified by the index in the list This method fires a cell update event. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns whetever this cell is editable or not, this implementation returns false always. |
void |
removeAllFilters()
Removes all filters from the list |
void |
removeFilter(CellFilter filter)
Removes the filter from the filters list |
void |
setCellComparator(java.util.Comparator comparator)
Sets the new cell comparator. |
void |
setColumnCount(int cols)
Changes the number of columns |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageTableModel(int cols)
cols
- number of columnsMethod Detail |
---|
public int getColumnCount()
JTable
uses this method to determine how many columns it
should create and display by default.
getColumnCount
in interface javax.swing.table.TableModel
getRowCount()
public int getRowCount()
JTable
uses this method to determine how many rows it
should display. This method should be quick, as it
is called frequently during rendering.
getRowCount
in interface javax.swing.table.TableModel
getColumnCount()
public java.lang.Object getValueAt(int row, int col)
columnIndex
and
rowIndex
.
getValueAt
in interface javax.swing.table.TableModel
row
- the row whose value is to be queriedcol
- the column whose value is to be queried
public java.lang.Object getValueAt(JTableUtil.Cell cell)
columnIndex
and
rowIndex
.
cell
- the cell
public void setColumnCount(int cols)
cols
- the desired number of columnspublic void addImageModel(ImageModel imageModel)
public void addImageModels(java.util.List filesList)
filesList
- a list of Filespublic boolean contains(BaseCell cell)
cell
- the cell to find in the model
public void clear()
public void imageIsLoaded(BaseCell cell)
imageIsLoaded
in interface ImageLoadingListener
cell
- the cell that was updated.public int getSize()
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
rowIndex
- the rowcolumnIndex
- the column
public void fireTableCellUpdate(BaseCell cell)
cell
- the cell to update.public JTableUtil.Cell getTableCell(BaseCell cell)
cell
- the cell to find in the table
public void addFilter(CellFilter filter)
filter
- the filter to addpublic void removeFilter(CellFilter filter)
filter
- the filter to removepublic void removeAllFilters()
public void setCellComparator(java.util.Comparator comparator)
comparator
- AbstractCellSorter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |