Autopsy  4.18.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T > Class Template Reference

Inherits org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< List< T > >.

Classes

class  CellMouseEvent
 
interface  CellMouseListener
 
class  Overlay
 

Public Member Functions

 JTablePanel (ListTableModel< T > tableModel)
 
 JTablePanel ()
 
CellMouseListener getCellListener ()
 
TableColumnModel getColumnModel ()
 
Function< T,?extends Object > getKeyFunction ()
 
List< T > getSelectedItems ()
 
JTablePanel< T > setCellListener (CellMouseListener cellListener)
 
JTablePanel< T > setColumnModel (TableColumnModel columnModel)
 
JTablePanel< T > setKeyFunction (Function< T,?extends Object > keyFunction)
 
final JTablePanel< T > setModel (ListTableModel< T > tableModel)
 
void showDataFetchResult (DataFetchResult< T > result, String errorMessage, String noResultsMessage)
 
void showDataFetchResult (DataFetchResult< T > result)
 
void showDefaultLoadingMessage ()
 
synchronized void showMessage (String message)
 
synchronized void showResults (T data)
 

Static Public Member Functions

static String getDefaultErrorMessage ()
 
static String getDefaultNoResultsMessage ()
 
static< T, CextendsGuiCellModel > JTablePanel< T > getJTablePanel (List< ColumnModel< T, C >> columns)
 
static< T, CextendsGuiCellModel > TableColumnModel getTableColumnModel (List< ColumnModel< T, C >> columns)
 
static< T, CextendsGuiCellModel > ListTableModel< T > getTableModel (List< ColumnModel< T, C >> columns)
 

Static Public Attributes

static final String DEFAULT_ERROR_MESSAGE
 
static final String DEFAULT_LOADING_MESSAGE
 
static final String DEFAULT_NO_RESULTS_MESSAGE
 

Protected Member Functions

void setMessage (boolean visible, String message)
 
abstract void setResults (T data)
 
synchronized void setResults (List< T > data)
 

Private Member Functions

void initComponents ()
 

Private Attributes

CellMouseListener cellListener = null
 
Function< T,?extends Object > keyFunction = (rowItem) -> rowItem
 
Overlay overlayLayer
 
JTable table
 
ListTableModel< T > tableModel
 
JScrollPane tableScrollPane
 

Static Private Attributes

static final CellModelTableCellRenderer DEFAULT_CELL_RENDERER = new CellModelTableCellRenderer()
 
static final int EXTRA_ROW_HEIGHT = 4
 
static final long serialVersionUID = 1L
 

Detailed Description

A table that displays a list of items and also can display messages for loading, load error, and not loaded.

Definition at line 42 of file JTablePanel.java.

Constructor & Destructor Documentation

Panel constructor.

Parameters
tableModelThe model to use for the table.

Definition at line 241 of file JTablePanel.java.

Default constructor.

Definition at line 250 of file JTablePanel.java.

Member Function Documentation

Returns
The current listener for mouse events. The events provided to this listener will have cell and table context.

Definition at line 297 of file JTablePanel.java.

TableColumnModel org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.getColumnModel ( )
Returns
The underlying JTable's column model.

Definition at line 317 of file JTablePanel.java.

static String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.getDefaultErrorMessage ( )
staticinherited
Returns
The default error message.

Definition at line 58 of file AbstractLoadableComponent.java.

static String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.getDefaultNoResultsMessage ( )
staticinherited
Returns
The default message for no results.

Definition at line 65 of file AbstractLoadableComponent.java.

static <T,CextendsGuiCellModel> JTablePanel<T> org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.getJTablePanel ( List< ColumnModel< T, C >>  columns)
static

Generates a JTablePanel corresponding to the provided column definitions where 'T' is the object representing each row.

Parameters
columnsThe column definitions.
Returns
The corresponding JTablePanel.

Definition at line 220 of file JTablePanel.java.

Function<T, ? extends Object> org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.getKeyFunction ( )
Returns
The function for determining the key for a data row. This key is used to maintain current selection in the table despite changing rows.

Definition at line 338 of file JTablePanel.java.

Returns the selected items or null if no item is selected.

Returns
The selected items or null if no item is selected.

Definition at line 364 of file JTablePanel.java.

static <T,CextendsGuiCellModel> TableColumnModel org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.getTableColumnModel ( List< ColumnModel< T, C >>  columns)
static
static <T,CextendsGuiCellModel> ListTableModel<T> org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.getTableModel ( List< ColumnModel< T, C >>  columns)
static
JTablePanel<T> org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.setColumnModel ( TableColumnModel  columnModel)
JTablePanel<T> org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.setKeyFunction ( Function< T,?extends Object >  keyFunction)

Sets the function for determining the key for a data row. This key is used to maintain current selection in the table despite changing rows.

Parameters
keyFunctionThe function to determine the key of a row.
Returns
As a utility, returns this.

Definition at line 350 of file JTablePanel.java.

Referenced by org.sleuthkit.autopsy.datasourcesummary.ui.RecentFilesPanel.initalizeAttchementsTable(), org.sleuthkit.autopsy.datasourcesummary.ui.RecentFilesPanel.initalizeDownloadTable(), and org.sleuthkit.autopsy.datasourcesummary.ui.RecentFilesPanel.initalizeOpenDocsTable().

void org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.setMessage ( boolean  visible,
String  message 
)
protected

Definition at line 406 of file JTablePanel.java.

abstract void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.setResults ( data)
abstractprotectedinherited

Sets the data to be shown in the JTable. Repaint does not need to be handled in this method.

Parameters
dataThe list of data objects to be shown.
synchronized void org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.setResults ( List< T >  data)
protected

Definition at line 375 of file JTablePanel.java.

void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showDataFetchResult ( DataFetchResult< T >  result,
String  errorMessage,
String  noResultsMessage 
)
inherited

Shows the data in a DataFetchResult. If there was an error during the operation, the errorMessage will be displayed. If the operation completed successfully and no data is present, noResultsMessage will be shown. Otherwise, the data will be shown as rows in the table.

Parameters
resultThe DataFetchResult.
errorMessageThe error message to be shown in the event of an error.
noResultsMessageThe message to be shown if there are no results but the operation completed successfully.

Definition at line 114 of file AbstractLoadableComponent.java.

Referenced by org.sleuthkit.autopsy.datasourcesummary.ui.PastCasesPanel::handleResult(), org.sleuthkit.autopsy.datasourcesummary.ui.RecentFilesPanel::initalizeAttchementsTable(), org.sleuthkit.autopsy.datasourcesummary.ui.RecentFilesPanel::initalizeDownloadTable(), org.sleuthkit.autopsy.datasourcesummary.ui.RecentFilesPanel::initalizeOpenDocsTable(), and org.sleuthkit.autopsy.datasourcesummary.ui.UserActivityPanel::UserActivityPanel().

void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showDataFetchResult ( DataFetchResult< T >  result)
inherited

Shows the data in a DataFetchResult. If there was an error during the operation, the DEFAULT_ERROR_MESSAGE will be displayed. If the operation completed successfully and no data is present, DEFAULT_NO_RESULTS_MESSAGE will be shown. Otherwise, the data will be shown as rows in the table.

Parameters
resultThe DataFetchResult.

Definition at line 150 of file AbstractLoadableComponent.java.

void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showDefaultLoadingMessage ( )
inherited

Shows a default loading message on the table. This will clear any results in the table.

Definition at line 85 of file AbstractLoadableComponent.java.

synchronized void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showMessage ( String  message)
inherited

Clears the results from the underlying JTable and shows the provided message.

Parameters
messageThe message to be shown.

Definition at line 75 of file AbstractLoadableComponent.java.

synchronized void org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.showResults ( data)
inherited

Shows the list as rows of data in the table. If overlay message will be cleared if present.

Parameters
dataThe data to be shown where each item represents a row of data.

Definition at line 96 of file AbstractLoadableComponent.java.

Member Data Documentation

Definition at line 163 of file JTablePanel.java.

final String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.DEFAULT_ERROR_MESSAGE
staticinherited

The default error message.

Definition at line 46 of file AbstractLoadableComponent.java.

final String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.DEFAULT_LOADING_MESSAGE
staticinherited

The default loading message.

Definition at line 41 of file AbstractLoadableComponent.java.

final String org.sleuthkit.autopsy.datasourcesummary.uiutils.AbstractLoadableComponent< T >.DEFAULT_NO_RESULTS_MESSAGE
staticinherited

The default 'no results' message.

Definition at line 51 of file AbstractLoadableComponent.java.

final int org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.EXTRA_ROW_HEIGHT = 4
staticprivate
Function<T, ? extends Object> org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.keyFunction = (rowItem) -> rowItem
private
final long org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.serialVersionUID = 1L
staticprivate

Definition at line 161 of file JTablePanel.java.

Definition at line 232 of file JTablePanel.java.

JScrollPane org.sleuthkit.autopsy.datasourcesummary.uiutils.JTablePanel< T >.tableScrollPane
private

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

Copyright © 2012-2021 Basis Technology. Generated on: Thu Jul 8 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.