com.threerings.stage.tools.editor
Class TileInfoPanel.TileTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.threerings.stage.tools.editor.TileInfoPanel.TileTableModel
All Implemented Interfaces:
Serializable, TableModel
Enclosing class:
TileInfoPanel

protected class TileInfoPanel.TileTableModel
extends AbstractTableModel

Extends the AbstractTableModel to encapsulate the table layout and display options required when displaying the tiles in the currently selected tileset.

See Also:
Serialized Form

Field Summary
protected  ImageIcon[] _icons
          The image icons used to display the table cell contents.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
protected TileInfoPanel.TileTableModel()
           
 
Method Summary
 Class<?> getColumnClass(int c)
           
 int getColumnCount()
           
 String getColumnName(int columnIndex)
           
 int getRowCount()
           
 Object getValueAt(int row, int col)
           
 void updateTileSet()
          Called when the tile set associated with the table has been changed.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_icons

protected ImageIcon[] _icons
The image icons used to display the table cell contents.

Constructor Detail

TileInfoPanel.TileTableModel

protected TileInfoPanel.TileTableModel()
Method Detail

updateTileSet

public void updateTileSet()
Called when the tile set associated with the table has been changed. Clears the cached image icons used to display each cell and updates the number of rows in the table to properly deal with tile sets of varying sizes.


getColumnCount

public int getColumnCount()

getColumnName

public String getColumnName(int columnIndex)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getRowCount

public int getRowCount()

getValueAt

public Object getValueAt(int row,
                         int col)

getColumnClass

public Class<?> getColumnClass(int c)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel