|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel com.cosylab.gui.components.introspection.MapTableModel
public class MapTableModel
A TableModel implementation that handles key-value maps to be used with JTable
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
MapTableModel()
Creation date: (3.1.2002 17:04:55) |
|
MapTableModel(java.lang.String[] columnNames)
Creation date: (3.1.2002 17:04:55) |
|
MapTableModel(java.lang.String[] columnNames,
java.util.Map map)
Creation date: (3.1.2002 17:04:55) |
|
MapTableModel(java.lang.String[] columnNames,
java.lang.Object[] keys)
Creation date: (3.1.2002 17:04:55) |
Method Summary | |
---|---|
void |
addMap(int index,
java.util.Map map)
Creation date: (3.1.2002 16:34:43) |
void |
addMap(java.util.Map map)
Creation date: (3.1.2002 16:34:43) |
void |
addRow(int index,
java.lang.Object key,
java.lang.Object value)
Creation date: (3.1.2002 16:34:43) |
void |
addRow(int index,
java.lang.Object key,
java.lang.Object value,
java.lang.String keyInfo)
DOCUMENT ME! |
void |
addRow(java.lang.Object key,
java.lang.Object value)
Creation date: (3.1.2002 16:34:43) |
void |
addRow(java.lang.Object key,
java.lang.Object value,
java.lang.String keyInfo)
DOCUMENT ME! |
void |
clear()
Removes all mappings from this map (optional operation). |
java.lang.Object[][] |
getAsArray()
Creation date: (3.1.2002 16:34:43) |
int |
getColumnCount()
DOCUMENT ME! |
java.lang.String |
getColumnName(int index)
DOCUMENT ME! |
java.util.Hashtable |
getMap()
Creation date: (3.1.2002 16:34:43) |
int |
getRowCount()
DOCUMENT ME! |
java.lang.Object |
getValueAt(int row,
int column)
DOCUMENT ME! |
boolean |
isCellEditable(int row,
int column)
DOCUMENT ME! |
boolean |
isKeyEditable()
DOCUMENT ME! |
boolean |
isSortByKeyName()
Returns true if contained keys are sorted by their names
obtained by toString() method. |
boolean |
isValueEditable()
DOCUMENT ME! |
static void |
main(java.lang.String[] args)
DOCUMENT ME! |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts new value under under specified key. |
void |
removeRow(int index)
Creation date: (3.1.2002 16:34:43) |
void |
removeRow(java.lang.Object key)
Creation date: (3.1.2002 16:34:43) |
void |
setAsArray(java.lang.Object[][] u)
Creation date: (3.1.2002 16:34:43) |
void |
setKeyColumnName(java.lang.String name)
DOCUMENT ME! |
void |
setKeyEditable(boolean value)
DOCUMENT ME! |
void |
setKeyInfo(java.lang.String[] keyInfo)
DOCUMENT ME! |
void |
setKeyInfoColumnName(java.lang.String name)
DOCUMENT ME! |
void |
setKeys(java.lang.Object[] keys)
Creation date: (3.1.2002 16:34:43) |
void |
setMap(java.util.Map map)
DOCUMENT ME! |
void |
setSortByKeyName(boolean b)
Set true to force contained keys to be sorted by their
names obtained by toString() method. |
void |
setValueAt(java.lang.Object value,
int row,
int column)
DOCUMENT ME! |
void |
setValueColumnName(java.lang.String name)
DOCUMENT ME! |
void |
setValueEditable(boolean value)
DOCUMENT ME! |
void |
setValues(java.lang.Object[] values)
DOCUMENT ME! |
java.lang.String |
toString()
DOCUMENT ME! |
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, wait, wait, wait |
Constructor Detail |
---|
public MapTableModel()
public MapTableModel(java.lang.String[] columnNames)
columnNames
- DOCUMENT ME!public MapTableModel(java.lang.String[] columnNames, java.lang.Object[] keys)
columnNames
- String[]keys
- Object[]public MapTableModel(java.lang.String[] columnNames, java.util.Map map)
columnNames
- String[]map
- MapMethod Detail |
---|
public static void main(java.lang.String[] args)
args
- String[]public void addMap(int index, java.util.Map map)
index
- intmap
- Mappublic void addMap(java.util.Map map)
map
- Mappublic void addRow(int index, java.lang.Object key, java.lang.Object value)
index
- intkey
- java.lang.Objectvalue
- java.lang.Objectpublic void addRow(int index, java.lang.Object key, java.lang.Object value, java.lang.String keyInfo)
index
- intkey
- Objectvalue
- ObjectkeyInfo
- Stringpublic void addRow(java.lang.Object key, java.lang.Object value)
key
- java.lang.Objectvalue
- java.lang.Objectpublic void addRow(java.lang.Object key, java.lang.Object value, java.lang.String keyInfo)
key
- Objectvalue
- ObjectkeyInfo
- Stringpublic void clear()
public java.lang.Object[][] getAsArray()
public int getColumnCount()
TableModel.getColumnCount()
public java.lang.String getColumnName(int index)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
index
- int
AbstractTableModel.getColumnName(int)
public java.util.Hashtable getMap()
public int getRowCount()
TableModel.getRowCount()
public java.lang.Object getValueAt(int row, int column)
row
- intcolumn
- int
TableModel.getValueAt(int, int)
public boolean isCellEditable(int row, int column)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- intcolumn
- int
AbstractTableModel.isCellEditable(int, int)
public boolean isKeyEditable()
public boolean isValueEditable()
public void removeRow(int index)
index
- intpublic void removeRow(java.lang.Object key)
key
- java.lang.Objectpublic void setAsArray(java.lang.Object[][] u)
u
- Object[][]public void setKeyColumnName(java.lang.String name)
name
- StringAbstractTableModel.getColumnName(int)
public void setValueColumnName(java.lang.String name)
name
- Stringpublic void setKeyInfoColumnName(java.lang.String name)
name
- Stringpublic void setKeyEditable(boolean value)
value
- booleanpublic void setKeys(java.lang.Object[] keys)
keys
- Object[]public void setMap(java.util.Map map)
map
- Mappublic void setValueAt(java.lang.Object value, int row, int column)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
value
- Objectrow
- intcolumn
- intAbstractTableModel#setValueAt(int, int)
public void setValueEditable(boolean value)
value
- booleanpublic java.lang.String toString()
toString
in class java.lang.Object
public void setKeyInfo(java.lang.String[] keyInfo)
keyInfo
- String[]public void setValues(java.lang.Object[] values)
values
- Object[]AbstractTableModel#setValueAt(int, int)
public boolean isSortByKeyName()
true
if contained keys are sorted by their names
obtained by toString() method.
true
if contained keys are sorted by their names
obtained by toString().public void setSortByKeyName(boolean b)
true
to force contained keys to be sorted by their
names obtained by toString() method.
b
- public java.lang.Object put(java.lang.Object key, java.lang.Object value)
key
- the key for which value is to be updatedvalue
- new value
null
if no previous value
existed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |