|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.iface.util.KeyValueTable
public abstract class KeyValueTable
Packages a JTable together with a table model suitable for viewing a mapping from keys to values.
Nested Class Summary | |
---|---|
static class |
KeyValueTable.LexicographicComparator
|
class |
KeyValueTable.MostRecentFirstComparator
|
class |
KeyValueTable.MostRecentLastComparator
|
static class |
KeyValueTable.PatternObjectComparator
|
protected class |
KeyValueTable.RowPopupMenu
|
protected class |
KeyValueTable.ViewJTable
|
protected class |
KeyValueTable.ViewTableModel
Mediates between the data and the JTable. |
protected class |
KeyValueTable.ViewTableMouseListener
|
Field Summary | |
---|---|
protected java.util.List |
keyList
|
protected java.util.Comparator |
keySortComparator
Determines the order in which keys are listed. |
protected java.util.Map |
keyTimestamps
|
protected KeyValueTable.ViewTableModel |
model
|
protected KeyValueTable.ViewTableMouseListener |
mouseListener
|
protected KeyValueTable.ViewJTable |
table
|
protected int |
timestamp
|
protected java.util.Map |
viewedMap
|
Constructor Summary | |
---|---|
KeyValueTable(java.util.Map initialMap,
java.lang.String keyColName,
java.lang.String valColName)
|
|
KeyValueTable(java.lang.String keyColName,
java.lang.String valColName)
|
Method Summary | |
---|---|
void |
deleteEntry(java.lang.Object key)
|
void |
deleteEntry(java.lang.Object key,
java.lang.Object value)
|
protected abstract void |
doPopupAction(java.awt.event.ActionEvent event,
int row,
java.lang.Object key)
Called by the row popup menu to intepret any action command selected from the menu. |
javax.swing.JTable |
getJTable()
|
java.util.Comparator |
getKeySortComparator()
|
java.lang.Object |
getValue(java.lang.Object key)
|
java.util.Map |
getViewedMap()
|
protected int |
insertKey(java.lang.Object key)
|
protected int |
keyTimestamp(java.lang.Object key)
|
protected java.lang.String |
keyToString(java.lang.Object key)
|
protected abstract KeyValueTable.RowPopupMenu |
makePopupMenu()
Factory method. |
void |
recordNewValue(java.lang.Object key,
java.lang.Object value)
|
void |
recordNewValues(java.util.Map map)
|
void |
reset()
Empties the table. |
void |
setKeySortComparator(java.util.Comparator c)
Sets the Comparator used to sort keys. |
protected void |
timestampKey(java.lang.Object key)
|
protected java.lang.String |
valueToString(java.lang.Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map viewedMap
protected java.util.List keyList
protected java.util.Map keyTimestamps
protected int timestamp
protected java.util.Comparator keySortComparator
keyTimestamp(Object)
,
setKeySortComparator(Comparator)
protected KeyValueTable.ViewJTable table
protected KeyValueTable.ViewTableModel model
protected KeyValueTable.ViewTableMouseListener mouseListener
Constructor Detail |
---|
public KeyValueTable(java.lang.String keyColName, java.lang.String valColName)
public KeyValueTable(java.util.Map initialMap, java.lang.String keyColName, java.lang.String valColName)
Method Detail |
---|
public javax.swing.JTable getJTable()
public java.lang.Object getValue(java.lang.Object key)
public java.util.Map getViewedMap()
protected java.lang.String keyToString(java.lang.Object key)
protected java.lang.String valueToString(java.lang.Object value)
public java.util.Comparator getKeySortComparator()
public void setKeySortComparator(java.util.Comparator c)
keySortComparator
,
KeyValueTable.MostRecentLastComparator
,
KeyValueTable.MostRecentFirstComparator
,
KeyValueTable.LexicographicComparator
,
KeyValueTable.PatternObjectComparator
public void reset()
public void recordNewValues(java.util.Map map)
public void recordNewValue(java.lang.Object key, java.lang.Object value)
protected int insertKey(java.lang.Object key)
protected void timestampKey(java.lang.Object key)
protected int keyTimestamp(java.lang.Object key)
public void deleteEntry(java.lang.Object key, java.lang.Object value)
public void deleteEntry(java.lang.Object key)
protected abstract KeyValueTable.RowPopupMenu makePopupMenu()
protected abstract void doPopupAction(java.awt.event.ActionEvent event, int row, java.lang.Object key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |