public class LogEntryTable extends javax.swing.JTable implements ZoomProgressListener
| Modifier and Type | Class and Description |
|---|---|
class |
LogEntryTable.ColumnMenu
Popup menu used to display the column options for the table.
|
javax.swing.JTable.AccessibleJTable, javax.swing.JTable.DropLocation, javax.swing.JTable.PrintModejavax.swing.JComponent.AccessibleJComponentAUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, showHorizontalLines, showVerticalLines, tableHeaderlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
LogEntryTable(LoggingClient client,
boolean initialDateFormat,
boolean initalLogTypeFormat)
LogEntryTable constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
Override the method in
JTable to catch the change of selection operated
by the user and update the detailed log info accordingly. |
void |
close()
Close the filterChooser dialog releasing all the resources.
|
protected int |
columnToModel(int index)
Utility method to provide mapping of column index to data fields.
|
javax.swing.table.TableCellRenderer |
getCellRenderer(int row,
int column)
Align the text of the table to the top.
|
int |
getColumnWidth(int n)
Computes the total width of the table taking into consideration the visible columns' width.
|
org.w3c.dom.Node |
getExtraInfo()
Insert the method's description here.
|
FiltersVector |
getFilters()
Return the filters defined by the user.
|
java.lang.String |
getFiltersString() |
LogTableDataModel |
getLCModel()
Returns the LogTableDataModel.
|
int |
getSortIndex()
Sets the index of the column the table should be sorted by.
|
int |
getViewRowCount()
Shows the number of rows shown by the table.
|
boolean[] |
getVisibleColumns(boolean zeroBased)
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.
|
void |
hideColumn(int columnIndex)
Hides a table column specified by index.
|
boolean |
isSortAscending()
Returns true if the elements are sorted in ascending order and false if in descending.
|
java.awt.Component |
prepareRenderer(javax.swing.table.TableCellRenderer renderer,
int rowIndex,
int vColIndex)
Sets a tool tip on all the cells.
|
void |
scrollToFirstRow()
Scroll the table to the first row
|
void |
scrollToLastRow()
Scroll the table to the last row
|
void |
scrollToNextSelectedRow()
Scroll the table to the next selected row and select it.
|
void |
scrollToPrevSelectedRow()
Scroll the table to the next selected row and select it.
|
void |
scrollToSelectedRow()
Scroll the table to the selected row
|
void |
setAdditionalWidth(int n,
int width)
Assigns the additional width that is left to the right to Log Message column.
|
void |
setFilters(FiltersVector newFilters,
boolean append) |
void |
setLogLevel(LogTypeHelper newLevel)
Set the new log level i.e.
|
void |
setLogSelectionListener(ViewCoordinator.SingleLogSelectionListener listener)
This is used only by
ViewCoordinator. |
void |
setLogTypeDescriptionView(boolean showDescription)
Show/Hide the description of the log type at the right side of the icon.
|
void |
setOrdering(int field,
boolean ascending)
Set the order and the field for ordering at once.
|
void |
setShortDateFormat(boolean shortFormat)
Set the format used to show the timestamp in the date column
|
void |
setSortIndex(int index)
Sets the column the elements in this table should be sorted by.
|
void |
setSortOrder(boolean ascending)
Changes the order in which the elements are sorted.
|
void |
showColumn(int columnIndex)
Displays the column specified by index.
|
void |
showFieldChooser()
Displays the field chooser dialog.
|
void |
sorterChanged(javax.swing.event.RowSorterEvent e) |
void |
zoom()
Zoom over the selected logs.
|
void |
zoomReadingFile(int num)
Notifies the listener about the number of files currently read by the zoom engine.
|
void |
zoomTotalFileToRead(int num)
Inform the listener about the total number of files that
the zoom engine needs to read.
|
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getToolTipText, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, print, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, tableChanged, unconfigureEnclosingScrollPane, updateUI, valueChangedaddAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic LogEntryTable(LoggingClient client, boolean initialDateFormat, boolean initalLogTypeFormat) throws java.lang.Exception
logClient - The LoggingClient that owns this tableinitialDateFormat - The format to show the date (true means short)initalLogTypeFormat - If true shows the written close
to the icon of the log typejava.lang.Exceptionprotected int columnToModel(int index)
index - intpublic org.w3c.dom.Node getExtraInfo()
public LogTableDataModel getLCModel()
public int getSortIndex()
public void hideColumn(int columnIndex)
columnIndex - intpublic java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer,
int rowIndex,
int vColIndex)
prepareRenderer in class javax.swing.JTableJTable.prepareRenderer(TableCellRenderer, int, int)public int getColumnWidth(int n)
public void setAdditionalWidth(int n,
int width)
width - number - of columnspublic boolean isSortAscending()
public void setSortIndex(int index)
index - intpublic void setSortOrder(boolean ascending)
ascending - The order for the tablepublic void setOrdering(int field,
boolean ascending)
field - The field of the logs for ordering
-1 disable the orderingascending - The order ascending(true)/descending (false)public void showColumn(int columnIndex)
columnIndex - intpublic void showFieldChooser()
Creation date: (1/2/2002 23:20:27)
public boolean[] getVisibleColumns(boolean zeroBased)
zeroBased - If true the number 0 correspond to the first column
(the array of visible columns uses 1 for the first column)public void close()
public void setShortDateFormat(boolean shortFormat)
shortFormat - The format of the date (true means short, false means complete)public void setLogTypeDescriptionView(boolean showDescription)
When the description is disabled, the icon appear without the written. The column is also resized to use less space as possible.
showDescription - If true a string with the description
of the log appear at the right side of the icon (default)public void changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
JTable to catch the change of selection operated
by the user and update the detailed log info accordingly.changeSelection in class javax.swing.JTableJTable.changeSelection(int rowIndex, int columnIndex, boolean toggle,boolean extend)public void setLogSelectionListener(ViewCoordinator.SingleLogSelectionListener listener)
ViewCoordinator.public void scrollToNextSelectedRow()
If there is no row selected or the selected line is the last row of the table, the method return without scrolling the table.
public void scrollToPrevSelectedRow()
If there is no row selected or the selected row is the first row of the table, the method return without scrolling the table
public void scrollToFirstRow()
public void scrollToLastRow()
public void scrollToSelectedRow()
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.
public FiltersVector getFilters()
public void setFilters(FiltersVector newFilters, boolean append)
newFilters - append - public java.lang.String getFiltersString()
FiltersVector.getFilterString()public void setLogLevel(LogTypeHelper newLevel)
newLevel - public int getViewRowCount()
public void sorterChanged(javax.swing.event.RowSorterEvent e)
sorterChanged in interface javax.swing.event.RowSorterListenersorterChanged in class javax.swing.JTablepublic void zoom()
The zoom consists of loading all the logs in the time interval
defined by the selected logs.
The zoom is delegated to the ZoomManager.
ZoomManager}public void zoomReadingFile(int num)
ZoomProgressListener
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.
zoomReadingFile in interface ZoomProgressListenernum - The number of files currently read.public void zoomTotalFileToRead(int num)
ZoomProgressListenerThis method of the listener is executed only once by the engine, when it has generated the list of the files to read.
zoomTotalFileToRead in interface ZoomProgressListenerpublic javax.swing.table.TableCellRenderer getCellRenderer(int row,
int column)
By default the vertical alignment of text in the JLabel used to show text
in table cells is centered.. This cause a problem when the text is multiline so we have
to force a TOP alignment of the text.
getCellRenderer in class javax.swing.JTableJTable.getCellRenderer(int, int)