|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
no.ntnu.vegare.visualizer.client.db.LogEntrySet
public class LogEntrySet
Collection of log entries. Works as a table model, feeding the overview screen and the filter view automatically, if used correctly.
You can use either setQueryFilter()
to modify content
according to rules, or setEntries()
to set a specific set.
Field Summary | |
---|---|
java.lang.Object |
logEntryLock
|
Constructor Summary | |
---|---|
LogEntrySet(AbstractLogDatabase db)
Create a new log entry collection, based on a database instance |
Method Summary | |
---|---|
void |
entriesAdded(java.util.Collection<LogEntry> entries)
New entries has been added to the database. |
int |
getColumnCount()
|
java.lang.String |
getColumnName(int col)
|
int |
getCurrentTime()
This is not the current system time, but rather the time the entry set is located at. |
java.util.Collection<LogEntry> |
getEntries()
|
LogEntry |
getEntry(int row)
|
int |
getMaxPriority()
|
int |
getRowCount()
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
isLive()
|
void |
setCurrentTime(int currentTime)
Set the current time watched by the user. |
void |
setEntries(java.util.Collection<LogEntry> entries)
When a entry set is set, the entire model is invalidated and fetched from the database. |
void |
setQueryFilter(QueryFilter filter)
When a new query filter is set, the entire model is invalidated and fetched from the database. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.lang.Object logEntryLock
Constructor Detail |
---|
public LogEntrySet(AbstractLogDatabase db)
db
- Database instanceMethod Detail |
---|
public LogEntry getEntry(int row)
row
- Row number in current log entry set
public void setQueryFilter(QueryFilter filter)
When a new query filter is set, the entire model is invalidated and fetched from the database. Used when the user specified a filter, or when the application only needs a subset.
public void setEntries(java.util.Collection<LogEntry> entries)
When a entry set is set, the entire model is invalidated and fetched from the database. Used when the user or software wants a specific set of entries, rather than a rule based collection.
entries
- public boolean isLive()
public java.util.Collection<LogEntry> getEntries()
public void entriesAdded(java.util.Collection<LogEntry> entries)
DatabaseObserver
entriesAdded
in interface DatabaseObserver
entries
- Collection of entries.public int getCurrentTime()
This is not the current system time, but rather the time the entry set is located at. If we are watching a historical overview, this method returns the time of observation.
public void setCurrentTime(int currentTime)
Set the current time watched by the user.
currentTime
- Time specified by user.public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
public int getMaxPriority()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |