alma::acs::logging::table::LogEntryTable Class Reference

Inheritance diagram for alma::acs::logging::table::LogEntryTable:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::table::LogEntryTable:
Collaboration graph
[legend]

List of all members.

Classes

class  ColumnMenu
class  TableMouseAdapter

Public Member Functions

 LogEntryTable (LoggingClient client, boolean initialDateFormat, boolean initalLogTypeFormat) throws Exception
org.w3c.dom.Node getExtraInfo ()
LogTableDataModel getLCModel ()
int getSortIndex ()
void hideColumn (int columnIndex)
Component prepareRenderer (TableCellRenderer renderer, int rowIndex, int vColIndex)
int getColumnWidth (int n)
void setAdditionalWidth (int n, int width)
boolean isSortAscending ()
void setSortIndex (int index)
void setSortOrder (boolean ascending)
void setOrdering (int field, boolean ascending)
void showColumn (int columnIndex)
void showFieldChooser ()
boolean[] getVisibleColumns (boolean zeroBased)
void close ()
void setShortDateFormat (boolean shortFormat)
void setLogTypeDescriptionView (boolean showDescription)
void changeSelection (int rowIndex, int columnIndex, boolean toggle, boolean extend)
void scrollToNextSelectedRow ()
void scrollToPrevSelectedRow ()
void scrollToFirstRow ()
void scrollToLastRow ()
void scrollToSelectedRow ()
FiltersVector getFilters ()
void setFilters (FiltersVector newFilters, boolean append)
String getFiltersString ()
void setLogLevel (LogTypeHelper newLevel)
int getViewRowCount ()
void sorterChanged (RowSorterEvent e)
void zoom ()
void zoomReadingFile (int num)
void zoomTotalFileToRead (int num)

Protected Member Functions

int columnToModel (int index)

Private Member Functions

String getCellStringContent (int row, int col)
void initialize (boolean shortDateFormat, boolean logTypeformat)

Private Attributes

TableColumn[] columnsList
boolean[] visibleColumns
FieldChooserDialog fieldChooser = null
LoggingClient loggingClient
DefaultListSelectionModel selectionModel
LogTableRowSorter rowSorter
int selecteViewdRow = - 1
int selecteModelRow = - 1
int selecteLogKey = - 1
DateRenderer dateRenderer
EntryTypeRenderer logTypeRenderer
ProgressMonitor zoomProgressMonitor = null
int zoomTotFiles

Detailed Description

Subclasses JTable allowing grouping and sorting depending on user's input. Creation date: (11/11/2001 13:45:22)

Author:
:

Constructor & Destructor Documentation

alma::acs::logging::table::LogEntryTable::LogEntryTable ( LoggingClient  client,
boolean  initialDateFormat,
boolean  initalLogTypeFormat 
) throws Exception [inline]

LogEntryTable constructor.

Parameters:
logClient The LoggingClient that owns this table
initialDateFormat The format to show the date (true means short)
initalLogTypeFormat If true shows the written close to the icon of the log type

References initialize(), loggingClient, and rowSorter.


Member Function Documentation

void alma::acs::logging::table::LogEntryTable::changeSelection ( int  rowIndex,
int  columnIndex,
boolean  toggle,
boolean  extend 
) [inline]

Override the method in JTable to catch the change of selection operated by the user and update the detailed log info accordingly.

See also:
JTable.changeSelection(int rowIndex, int columnIndex, boolean toggle,boolean extend)

References alma::acs::logging::table::LogEntryTableModelBase::getVisibleLogEntry(), loggingClient, selecteLogKey, selecteModelRow, selecteViewdRow, and com::cosylab::logging::LoggingClient::setLogDetailContent().

Referenced by scrollToFirstRow(), scrollToLastRow(), scrollToNextSelectedRow(), scrollToPrevSelectedRow(), and scrollToSelectedRow().

void alma::acs::logging::table::LogEntryTable::close (  )  [inline]

Close the filterChooser dialog releasing all the resources. This is intended to be the last operatione when the application is closing

References fieldChooser, and com::cosylab::logging::settings::FieldChooserDialog::setVisible().

Referenced by com::cosylab::logging::LoggingClient::close().

int alma::acs::logging::table::LogEntryTable::columnToModel ( int  index  )  [inline, protected]

Utility method to provide mapping of column index to data fields. Creation date: (1/25/02 11:11:43 AM)

Returns:
int
Parameters:
index int
String alma::acs::logging::table::LogEntryTable::getCellStringContent ( int  row,
int  col 
) [inline, private]

Get a string representing the content of a cell

Parameters:
row The table row of the cell
col The table column of the cell
Returns:
A string representing the content of the cell

Referenced by alma::acs::logging::table::LogEntryTable::TableMouseAdapter::mousePressed(), and prepareRenderer().

int alma::acs::logging::table::LogEntryTable::getColumnWidth ( int  n  )  [inline]

Computes the total width of the table taking into consideration the visible columns' width.

Returns:
number of columns

Referenced by com::cosylab::logging::LoggingClient::CustomColumnListener::componentResized().

org.w3c.dom.Node alma::acs::logging::table::LogEntryTable::getExtraInfo (  )  [inline]

Insert the method's description here. Creation date: (2/7/02 3:52:36 PM)

Returns:
java.lang.String

References getLCModel(), alma::acs::logging::table::LogEntryTableModelBase::getVisibleLogEntry(), and com::cosylab::logging::engine::log::ILogEntry::hasDatas().

FiltersVector alma::acs::logging::table::LogEntryTable::getFilters (  )  [inline]
String alma::acs::logging::table::LogEntryTable::getFiltersString (  )  [inline]
LogTableDataModel alma::acs::logging::table::LogEntryTable::getLCModel (  )  [inline]
int alma::acs::logging::table::LogEntryTable::getSortIndex (  )  [inline]

Sets the index of the column the table should be sorted by. If the table is currently unsorted, the result is -1.

Returns:
int

References alma::acs::logging::table::LogTableDataModel::getFieldSortNumber(), and getLCModel().

int alma::acs::logging::table::LogEntryTable::getViewRowCount (  )  [inline]

Shows the number of rows shown by the table.

Returns:
the number of rows shown by the table.

References rowSorter.

Referenced by com::cosylab::logging::stats::StatsDlg::refreshGUI().

boolean [] alma::acs::logging::table::LogEntryTable::getVisibleColumns ( boolean  zeroBased  )  [inline]

Returns an array of boolean with true for each visible column The visibleComun array of this class starts counting the column from 1 instead of 0 (i.e. 0 is not used)

Parameters:
zeroBased If true the number 0 correspond to the first column (the array of visible columns uses 1 for the first column)
Returns:
An array of boolean describing which columns are displayed

References visibleColumns.

Referenced by com::cosylab::logging::search::SearchDialog::initializeAdvancedPanel(), and showFieldChooser().

void alma::acs::logging::table::LogEntryTable::hideColumn ( int  columnIndex  )  [inline]

Hides a table column specified by index. Creation date: (12/4/2001 22:57:58)

Parameters:
columnIndex int

References columnsList, and visibleColumns.

Referenced by alma::acs::logging::table::LogEntryTable::ColumnMenu::MenuClicked::actionPerformed(), initialize(), and showFieldChooser().

void alma::acs::logging::table::LogEntryTable::initialize ( boolean  shortDateFormat,
boolean  logTypeformat 
) [inline, private]

Setup the table

Parameters:
shortDateFormat The format to show the date (if true is short, otherwise complete)
logTypeformat The way to show the log type (if true the description is shown)

References columnsList, dateRenderer, hideColumn(), logTypeRenderer, selectionModel, and visibleColumns.

Referenced by LogEntryTable().

boolean alma::acs::logging::table::LogEntryTable::isSortAscending (  )  [inline]

Returns true if the elements are sorted in ascending order and false if in descending. If the table is not sorted, this parameter has no meaning. Creation date: (1/24/02 10:49:21 AM)

Returns:
boolean

References getLCModel(), and alma::acs::logging::table::LogTableDataModel::sortedAscending().

Component alma::acs::logging::table::LogEntryTable::prepareRenderer ( TableCellRenderer  renderer,
int  rowIndex,
int  vColIndex 
) [inline]

Sets a tool tip on all the cells. It pops up when the value is not fully displayed while the mose scrolls over it.

See also:
javax.swing.JTable::prepareRenderer(TableCellRenderer, int, int)

References getCellStringContent().

void alma::acs::logging::table::LogEntryTable::scrollToFirstRow (  )  [inline]

Scroll the table to the first row

References changeSelection().

Referenced by alma::acs::logging::dialogs::main::LogNavigationBar::actionPerformed().

void alma::acs::logging::table::LogEntryTable::scrollToLastRow (  )  [inline]

Scroll the table to the last row

References changeSelection().

Referenced by alma::acs::logging::dialogs::main::LogNavigationBar::actionPerformed().

void alma::acs::logging::table::LogEntryTable::scrollToNextSelectedRow (  )  [inline]

Scroll the table to the next selected row and select it.

If there is no row selected or the selected line is the last row of the table, the method return without scrolling the table.

References changeSelection(), and selecteViewdRow.

Referenced by alma::acs::logging::dialogs::main::LogNavigationBar::actionPerformed().

void alma::acs::logging::table::LogEntryTable::scrollToPrevSelectedRow (  )  [inline]

Scroll the table to the next selected row and select it.

If there is no row selected or the selected row is the first row of the table, the method return without scrolling the table

References changeSelection(), and selecteViewdRow.

Referenced by alma::acs::logging::dialogs::main::LogNavigationBar::actionPerformed().

void alma::acs::logging::table::LogEntryTable::scrollToSelectedRow (  )  [inline]

Scroll the table to the selected row

If there is no selected row, the method return without scrolling.

The selected row could not be anymore present in the table for example because it has been deleted by the LogDeleter or the table has been cleared by the user.

References changeSelection(), selecteLogKey, and selecteViewdRow.

Referenced by alma::acs::logging::dialogs::main::LogNavigationBar::actionPerformed().

void alma::acs::logging::table::LogEntryTable::setAdditionalWidth ( int  n,
int  width 
) [inline]

Assigns the additional width that is left to the right to Log Message column.

Parameters:
width 
number of columns
Returns:
TableColumn

Referenced by com::cosylab::logging::LoggingClient::CustomColumnListener::componentResized().

void alma::acs::logging::table::LogEntryTable::setFilters ( FiltersVector  newFilters,
boolean  append 
) [inline]
void alma::acs::logging::table::LogEntryTable::setLogLevel ( LogTypeHelper  newLevel  )  [inline]

Set the new log level i.e. the level of the logs shown in the table.

Parameters:
newLevel 

References rowSorter, and alma::acs::logging::table::LogTableRowSorter::setLogLevel().

Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed(), and com::cosylab::logging::LoggingClient::initialize().

void alma::acs::logging::table::LogEntryTable::setLogTypeDescriptionView ( boolean  showDescription  )  [inline]

Show/Hide the description of the log type at the right side of the icon.

When the description is disabled, the icon appear without the written. The column is also resized to use less space as possible.

Parameters:
showDescription If true a string with the description of the log appear at the right side of the icon (default)

References columnsList, logTypeRenderer, and alma::acs::logging::table::renderer::EntryTypeRenderer::viewDescription().

Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed().

void alma::acs::logging::table::LogEntryTable::setOrdering ( int  field,
boolean  ascending 
) [inline]

Set the order and the field for ordering at once. Calling this method is faster the calling the setSortIndex and setSortOrder

Parameters:
field The field of the logs for ordering -1 disable the ordering
ascending The order ascending(true)/descending (false)

References getLCModel(), and alma::acs::logging::table::LogTableDataModel::setSortComparator().

Referenced by alma::acs::logging::table::LogEntryTable::ColumnMenu::MenuClicked::actionPerformed().

void alma::acs::logging::table::LogEntryTable::setShortDateFormat ( boolean  shortFormat  )  [inline]

Set the format used to show the timestamp in the date column

Parameters:
shortFormat The format of the date (true means short, false means complete)

References dateRenderer, and alma::acs::logging::table::renderer::DateRenderer::setShortDateFormat().

Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed().

void alma::acs::logging::table::LogEntryTable::setSortIndex ( int  index  )  [inline]

Sets the column the elements in this table should be sorted by. Setting it to -1 means the table is not sorted.

To change both the index and the order, it is better to execute setOrdering

Parameters:
index int

References getLCModel(), alma::acs::logging::table::LogTableDataModel::setSortComparator(), and alma::acs::logging::table::LogTableDataModel::sortedAscending().

void alma::acs::logging::table::LogEntryTable::setSortOrder ( boolean  ascending  )  [inline]

Changes the order in which the elements are sorted. Set true for ascending and false for descending.

To change both the index and the order, it is better to execute setOrdering

Parameters:
ascending The order for the table

References alma::acs::logging::table::LogTableDataModel::getFieldSortNumber(), getLCModel(), and alma::acs::logging::table::LogTableDataModel::setSortComparator().

void alma::acs::logging::table::LogEntryTable::showColumn ( int  columnIndex  )  [inline]

Displays the column specified by index. Creation date: (12/4/2001 22:56:11)

Parameters:
columnIndex int

References columnsList, and visibleColumns.

Referenced by showFieldChooser().

void alma::acs::logging::table::LogEntryTable::showFieldChooser (  )  [inline]
void alma::acs::logging::table::LogEntryTable::sorterChanged ( RowSorterEvent  e  )  [inline]
void alma::acs::logging::table::LogEntryTable::zoom (  )  [inline]
void alma::acs::logging::table::LogEntryTable::zoomReadingFile ( int  num  )  [inline]

Notifies the listener about the number of files currently read by the zoom engine.

This method of the listener is called when the loading of logs starts with a value of 0 while the zoom engine scans the folder looking for the files to read.
When the list is ready, the zoom engine executes this method passing the number of the file it has started to read.

Parameters:
num The number of files currently read.

Implements alma::acs::logging::archive::zoom::ZoomProgressListener.

References com::cosylab::logging::LoggingClient::getZoomManager(), loggingClient, alma::acs::logging::archive::zoom::ZoomManager::stopZoom(), zoomProgressMonitor, and zoomTotFiles.

void alma::acs::logging::table::LogEntryTable::zoomTotalFileToRead ( int  num  )  [inline]

Inform the listener about the total number of files that the zoom engine needs to read.

This method of the listener is executed only once by the engine, when it has generated the list of the files to read.

Parameters:
num 

Implements alma::acs::logging::archive::zoom::ZoomProgressListener.

References zoomProgressMonitor, and zoomTotFiles.


Member Data Documentation

The renderer to show the date (short or complete format)

Referenced by initialize(), and setShortDateFormat().

Referenced by close(), and showFieldChooser().

The renderer to show the type of log (icon and description or icon only)

Referenced by initialize(), and setLogTypeDescriptionView().

The object to sort, order and filter the logs shown by the table

Referenced by getFilters(), getFiltersString(), getViewRowCount(), LogEntryTable(), setFilters(), and setLogLevel().

The key of the last log selected by the user.

-1 means no log selected.

Referenced by changeSelection(), and scrollToSelectedRow().

The index (in the model!!!) of the row selected by the user.

-1 means no row selected.

Referenced by changeSelection().

The index (in the view!!!) of the row selected by the user.

-1 means no row selected.

Referenced by changeSelection(), scrollToNextSelectedRow(), scrollToPrevSelectedRow(), and scrollToSelectedRow().

DefaultListSelectionModel alma::acs::logging::table::LogEntryTable::selectionModel [private]

Referenced by initialize().

The dialog to show (and stop) the progress of the zoom

Referenced by zoom(), zoomReadingFile(), and zoomTotalFileToRead().

The total number of files to read while zooming

Referenced by zoom(), zoomReadingFile(), and zoomTotalFileToRead().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2