private static class TabbedAddeManager.RemoteAddeTableModel extends AbstractTableModel
Modifier and Type | Field and Description |
---|---|
private static int |
ACCT |
private String[] |
columnNames
Labels that appear as the column headers.
|
private static int |
DATASET |
private static Pattern |
ENTRY_ID_SPLITTER |
private EntryStore |
entryStore
EntryStore used to query and apply changes. |
private List<String> |
servers |
private static int |
SOURCE |
private static int |
TYPES |
private static int |
VALID |
listenerList
Constructor and Description |
---|
RemoteAddeTableModel(EntryStore entryStore)
Builds an
AbstractTableModel with some
extensions that facilitate working with
RemoteAddeEntrys . |
Modifier and Type | Method and Description |
---|---|
private static String |
formattedAccounting(String serv,
EntryStore manager) |
private static String |
formattedSource(String serv,
EntryStore manager) |
private static String |
formattedTypes(String serv,
EntryStore manager) |
private static String |
formattedValidity(String serv,
EntryStore manager) |
Class<?> |
getColumnClass(int column) |
int |
getColumnCount()
Returns the length of
columnNames . |
String |
getColumnName(int column)
Returns the column name associated with
column . |
protected List<RemoteAddeEntry> |
getEntriesAtRow(int row)
Returns the
RemoteAddeEntry at the given index. |
int |
getRowCount()
Returns the number of entries being managed.
|
protected int |
getRowForEntry(RemoteAddeEntry entry)
Returns the index of the given
entry . |
protected int |
getRowForEntry(String entryText)
Returns the index of the given entry text within the table.
|
Object |
getValueAt(int row,
int column)
Finds the value at the given coordinates.
|
private static boolean |
hasType(String serv,
EntryStore manager,
AddeEntry.EntryType type) |
boolean |
isCellEditable(int row,
int column) |
void |
refreshEntries()
Clears and re-adds all
RemoteAddeEntry s within
entryStore . |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
private static final int VALID
private static final int SOURCE
private static final int DATASET
private static final int ACCT
private static final int TYPES
private static final Pattern ENTRY_ID_SPLITTER
private final String[] columnNames
private final EntryStore entryStore
EntryStore
used to query and apply changes.public RemoteAddeTableModel(EntryStore entryStore)
AbstractTableModel
with some
extensions that facilitate working with
RemoteAddeEntrys
.entryStore
- Server manager object.protected List<RemoteAddeEntry> getEntriesAtRow(int row)
RemoteAddeEntry
at the given index.row
- Index of the entry.RemoteAddeEntry
at index specified by row
.protected int getRowForEntry(RemoteAddeEntry entry)
entry
.entry
- RemoteAddeEntry
whose row is desired.entry
, or -1
if the
entry wasn't found.protected int getRowForEntry(String entryText)
entryText
- String representation of the desired entry.-1
if the entry was
not found.AddeEntry.getEntryText()
public void refreshEntries()
RemoteAddeEntry
s within
entryStore
.public int getColumnCount()
columnNames
.public int getRowCount()
public Object getValueAt(int row, int column)
row
- Table row.column
- Table column.row
and column
coordinatesIndexOutOfBoundsException
- if row
or column
refer to an invalid table cell.private static String formattedSource(String serv, EntryStore manager)
private static String formattedValidity(String serv, EntryStore manager)
private static String formattedAccounting(String serv, EntryStore manager)
private static boolean hasType(String serv, EntryStore manager, AddeEntry.EntryType type)
private static String formattedTypes(String serv, EntryStore manager)
public String getColumnName(int column)
column
.getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
columnNames
.public Class<?> getColumnClass(int column)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public boolean isCellEditable(int row, int column)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel