|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
jview.JPropertyEdit.PropertyTableModel
protected static class JPropertyEdit.PropertyTableModel
A table model using a mapping of unchangable keys to changable values.
| Field Summary | |
|---|---|
private LinkedProperties |
properties
The properties we want to edit converted into a linked map. |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
protected |
JPropertyEdit.PropertyTableModel(Map<String,String> props)
Constructs a new table model focusing on the properties given. |
| Method Summary | |
|---|---|
int |
getColumnCount()
Properties have key-value pairs, thus we return two here. |
String |
getColumnName(int kv)
The column name is either name or value. |
protected Map<String,String> |
getProperties()
Returns the properties. |
int |
getRowCount()
The number of rows is the number of pairs stored in the properties. |
Object |
getValueAt(int row,
int col)
Returns the value for the cell. |
boolean |
isCellEditable(int row,
int column)
The only table cell that may be edited is the value part. |
protected void |
newComment(int index)
Inserts a new comment. |
void |
setValueAt(Object to,
int row,
int column)
Sets the property value at the specified row. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private LinkedProperties properties
| Constructor Detail |
|---|
protected JPropertyEdit.PropertyTableModel(Map<String,String> props)
| Method Detail |
|---|
public int getColumnCount()
public String getColumnName(int kv)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic int getRowCount()
public Object getValueAt(int row,
int col)
public void setValueAt(Object to,
int row,
int column)
setValueAt in interface TableModelsetValueAt in class AbstractTableModel
public boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelprotected void newComment(int index)
LinkedProperties and
fire a tablerowchanged event.
protected Map<String,String> getProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||