|
|||||||||
| Home >> All >> org >> geotools >> gui >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.geotools.gui.swing
Class LoggingTableModel

java.lang.Objectjava.util.logging.Handler
org.geotools.gui.swing.LoggingTableModel
- All Implemented Interfaces:
- javax.swing.table.TableModel
- final class LoggingTableModel
- extends java.util.logging.Handler
- implements javax.swing.table.TableModel
- extends java.util.logging.Handler
A logging java.util.logging.Handler storing LogRecords as a javax.swing.table.TableModel.
This model is used by LoggingPanel for displaying logging messages in
a javax.swing.JTable.
- Version:
- $Id: LoggingTableModel.java,v 1.5 2003/02/09 23:38:11 lbruand Exp $
| Field Summary | |
private java.util.Map |
cache
String representations of latest required records. |
private int |
capacity
The maximum amount of records that can be stored in this logging panel. |
private static int[] |
COLUMN_NAMES
Resource keys for column names. |
static java.lang.String |
CVSID
|
private java.text.DateFormat |
dateFormat
The format to use for formatting time. |
private javax.swing.event.EventListenerList |
listenerList
The list of registered listeners. |
private int |
recordCount
The total number of logging messages published by this panel. |
private java.util.logging.LogRecord[] |
records
The last java.util.logging.LogRecords stored. |
| Fields inherited from class java.util.logging.Handler |
|
| Constructor Summary | |
LoggingTableModel()
Construct the handler. |
|
| Method Summary | |
void |
addTableModelListener(javax.swing.event.TableModelListener listener)
Adds a listener that is notified each time a change to the data model occurs. |
void |
close()
Close the Handler and free all associated resources. |
private void |
fireTableChanged(javax.swing.event.TableModelEvent event)
Forwards the given notification event to all TableModelListeners. |
void |
flush()
Flush any buffered output. |
int |
getCapacity()
Returns the capacity. |
java.lang.Class |
getColumnClass(int columnIndex)
Returns the most specific superclass for all the cell values in the column. |
int |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex. |
java.util.logging.LogRecord |
getLogRecord(int row)
Returns the log record for the specified row. |
int |
getRowCount()
Returns the number of rows in the model. |
private static java.lang.String |
getShortClassName(java.lang.String name)
Returns the class name in a shorter form (without package). |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at columnIndex and rowIndex. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns false since cells are not editable. |
void |
publish(java.util.logging.LogRecord record)
Publish a java.util.logging.LogRecord. |
void |
removeTableModelListener(javax.swing.event.TableModelListener listener)
Removes a listener from the list that is notified each time a change occurs. |
void |
setCapacity(int capacity)
Set the capacity. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Do nothing since cells are not editable. |
| Methods inherited from class java.util.logging.Handler |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
CVSID
public static final java.lang.String CVSID
- See Also:
- Constant Field Values
COLUMN_NAMES
private static final int[] COLUMN_NAMES
- Resource keys for column names.
records
private java.util.logging.LogRecord[] records
- The last java.util.logging.LogRecords stored. This array will grows as needed up to
capacity55 . Once the maximal capacity is reached, early records are discarted.
capacity
private int capacity
- The maximum amount of records that can be stored in this logging panel.
If more than
capacity55 messages are logged, early messages will be discarted.
recordCount
private int recordCount
- The total number of logging messages published by this panel. This number may be
greater than the amount of java.util.logging.LogRecord actually memorized, since early records
may have been discarted. The slot in
recordswhere to write the next message can be computed byrecordCount % capacity.
cache
private final java.util.Map cache
- String representations of latest required records. Keys are java.util.logging.LogRecord objects
and values are
String[]. This is a cache for faster rendering.
listenerList
private final javax.swing.event.EventListenerList listenerList
- The list of registered listeners.
dateFormat
private final java.text.DateFormat dateFormat
- The format to use for formatting time.
| Constructor Detail |
LoggingTableModel
public LoggingTableModel()
- Construct the handler.
| Method Detail |
getCapacity
public int getCapacity()
- Returns the capacity. This is the maximum number of java.util.logging.LogRecords this handler
can memorize. If more messages are logged, then the oldiest messages will be discarted.
setCapacity
public void setCapacity(int capacity)
- Set the capacity. This is the maximum number of java.util.logging.LogRecords this handler can
memorize. If more messages are logged, then the oldiest messages will be discarted.
publish
public void publish(java.util.logging.LogRecord record)
- Publish a java.util.logging.LogRecord. If the maximal capacity has been reached,
the oldiest record will be discarted.
getLogRecord
public java.util.logging.LogRecord getLogRecord(int row)
- Returns the log record for the specified row.
getColumnCount
public int getColumnCount()
- Returns the number of columns in the model.
- Specified by:
getColumnCountin interfacejavax.swing.table.TableModel
getRowCount
public int getRowCount()
- Returns the number of rows in the model.
- Specified by:
getRowCountin interfacejavax.swing.table.TableModel
getColumnClass
public java.lang.Class getColumnClass(int columnIndex)
- Returns the most specific superclass for all the cell values in the column.
- Specified by:
getColumnClassin interfacejavax.swing.table.TableModel
getColumnName
public java.lang.String getColumnName(int columnIndex)
- Returns the name of the column at
columnIndex.- Specified by:
getColumnNamein interfacejavax.swing.table.TableModel
getValueAt
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
- Returns the value for the cell at
columnIndexandrowIndex.- Specified by:
getValueAtin interfacejavax.swing.table.TableModel
getShortClassName
private static java.lang.String getShortClassName(java.lang.String name)
- Returns the class name in a shorter form (without package).
setValueAt
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
- Do nothing since cells are not editable.
- Specified by:
setValueAtin interfacejavax.swing.table.TableModel
isCellEditable
public boolean isCellEditable(int rowIndex,
int columnIndex)
- Returns
falsesince cells are not editable.- Specified by:
isCellEditablein interfacejavax.swing.table.TableModel
addTableModelListener
public void addTableModelListener(javax.swing.event.TableModelListener listener)
- Adds a listener that is notified each time a change to the data model occurs.
- Specified by:
addTableModelListenerin interfacejavax.swing.table.TableModel
removeTableModelListener
public void removeTableModelListener(javax.swing.event.TableModelListener listener)
- Removes a listener from the list that is notified each time a change occurs.
- Specified by:
removeTableModelListenerin interfacejavax.swing.table.TableModel
fireTableChanged
private void fireTableChanged(javax.swing.event.TableModelEvent event)
- Forwards the given notification event to all
TableModelListeners.
flush
public void flush()
- Flush any buffered output.
close
public void close()
- Close the
Handlerand free all associated resources.
|
|||||||||
| Home >> All >> org >> geotools >> gui >> [ swing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC