| org.isqlviewer.swing.table.EnhancedTableModel org.isqlviewer.swing.table.PropertyTableModel
PropertyTableModel | public class PropertyTableModel extends EnhancedTableModel (Code) | | An simple general purpose table model for Strings from various sources.
This implementation of the TableModel interface is mainly for general use for Properties and other Map type objects
as well as String only ResultSet objects.
author: Markus A. Kobold <mkobold at sprintpcs dot com> version: 1.0 |
Method Summary | |
public synchronized void | allowEditing(boolean f) Toggles the ability to edit this table model. | public boolean | isCellEditable(int row, int col) | public synchronized void | setData(Map<String, ? extends Object> table) Applies a Map objects as the TableModel. | public Properties | toProperties() Creates a properties object from the first two columns. |
PropertyTableModel | public PropertyTableModel()(Code) | | |
allowEditing | public synchronized void allowEditing(boolean f)(Code) | | Toggles the ability to edit this table model.
Since this is mainly for using this table model from a Map of strings, in paticular the properties object.
Parameters: f - toggles the ability to edit the underlying data. |
isCellEditable | public boolean isCellEditable(int row, int col)(Code) | | |
setData | public synchronized void setData(Map<String, ? extends Object> table)(Code) | | Applies a Map objects as the TableModel.
This will create a two column table model with one column being the keys, and the other being the values for each
key.
This will set the model type to TYPE_MAP, also any prexisting data will be cleared.
See Also: PropertyTableModel.setData(ResultSet) Parameters: set - of data to load this table model with. |
toProperties | public Properties toProperties()(Code) | | Creates a properties object from the first two columns.
If this TableModel doesn't have two columns an empty properties object will be returned.
properties object from the first two columns of the model. |
Methods inherited from org.isqlviewer.swing.table.EnhancedTableModel | protected void addColumn(String name, Collection c)(Code)(Java Doc) public void addRow(ArrayList<? extends Object> lst)(Code)(Java Doc) public synchronized void addTableModelListener(TableModelListener l)(Code)(Java Doc) public int applyFilter(String text)(Code)(Java Doc) protected boolean canSearchColumn(int column)(Code)(Java Doc) public boolean canSort(int column, boolean ascending)(Code)(Java Doc) public void clear()(Code)(Java Doc) public void clearAll()(Code)(Java Doc) protected void clearAllData()(Code)(Java Doc) protected void clearData()(Code)(Java Doc) public void clearFilter()(Code)(Java Doc) public Object clone()(Code)(Java Doc) protected boolean doFilter(Object data, Pattern pattern)(Code)(Java Doc) public int findColumn(String columnName)(Code)(Java Doc) public void fireTableCellUpdated(int row, int column)(Code)(Java Doc) public void fireTableChanged(TableModelEvent e)(Code)(Java Doc) public void fireTableDataChanged()(Code)(Java Doc) public void fireTableRowsDeleted(int firstRow, int lastRow)(Code)(Java Doc) public void fireTableRowsInserted(int firstRow, int lastRow)(Code)(Java Doc) public void fireTableRowsUpdated(int firstRow, int lastRow)(Code)(Java Doc) public void fireTableStructureChanged()(Code)(Java Doc) public Class> getColumnClass(int columnIndex)(Code)(Java Doc) public int getColumnCount()(Code)(Java Doc) public String getColumnName(int column)(Code)(Java Doc) public String[] getColumns()(Code)(Java Doc) public int getIndexOfColumnName(String name)(Code)(Java Doc) public int getPageCount()(Code)(Java Doc) public int getPageOffset()(Code)(Java Doc) public int getPageSize()(Code)(Java Doc) protected ArrayList<Object> getRow(int rowIndex)(Code)(Java Doc) public int getRowCount()(Code)(Java Doc) public synchronized Map<String, Object> getRowMap(int rowIndex)(Code)(Java Doc) public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException(Code)(Java Doc) public DataFlavor[] getTransferDataFlavors()(Code)(Java Doc) public int getTrueRowCount()(Code)(Java Doc) public Object getValueAt(int rowIndex, int columnIndex)(Code)(Java Doc) void insertRow(int rowIndex, Map<String, Object> rowData)(Code)(Java Doc) public boolean isCellEditable(int rowIndex, int columnIndex)(Code)(Java Doc) public boolean isDataFlavorSupported(DataFlavor flavor)(Code)(Java Doc) public boolean isEmpty()(Code)(Java Doc) public boolean matchesFilter(int rowIndex, int columnIndex)(Code)(Java Doc) public boolean pageDown()(Code)(Java Doc) public boolean pageUp()(Code)(Java Doc) public void removeColumn(int columnIndex)(Code)(Java Doc) public void removeRow(int rowIndex)(Code)(Java Doc) public void removeTableModelListener(TableModelListener l)(Code)(Java Doc) public void setClassforColumn(int column, Class clazz)(Code)(Java Doc) public void setColumnCount(int size)(Code)(Java Doc) public void setColumnName(int idx, String name)(Code)(Java Doc) protected void setColumns(String[] s)(Code)(Java Doc) protected void setData(Collection<ArrayList<Object>> c)(Code)(Java Doc) public boolean setPageSize(int newSize)(Code)(Java Doc) public void setRowCount(int size)(Code)(Java Doc) public void setValueAt(Object aValue, int rowIndex, int columnIndex)(Code)(Java Doc) public void sort(int column, boolean asc)(Code)(Java Doc) public EnhancedTableModel subModel(int[] rows, int[] columnidxs)(Code)(Java Doc) public String toString()(Code)(Java Doc) public int translateRow(int rowIndex)(Code)(Java Doc)
|
|
|