Autopsy  4.21.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer Class Reference

Inherits DefaultTableCellRenderer.

Public Member Functions

Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)

Static Public Member Functions

static CellMouseListener getMouseListener ()

Protected Member Functions

Component getTableCellRendererComponent (JLabel defaultCell, GuiCellModel cellModel)

Static Private Attributes

static final int DEFAULT_ALIGNMENT = JLabel.LEFT
static final Border DEFAULT_BORDER = BorderFactory.createEmptyBorder(2, 4, 2, 4)
static final CellMouseListener DEFAULT_CELL_MOUSE_LISTENER
static final long serialVersionUID = 1L

Detailed Description

A Table cell renderer that renders a cell of a table based off of the CellModel interface provided within this class.

Definition at line 40 of file

Member Function Documentation

static CellMouseListener org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.getMouseListener ( )
Component org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.getTableCellRendererComponent ( JTable  table,
Object  value,
boolean  isSelected,
boolean  hasFocus,
int  row,
int  column 

Definition at line 47 of file

Component org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.getTableCellRendererComponent ( JLabel  defaultCell,
GuiCellModel  cellModel 

Customizes the jlabel to match the column model and cell model provided.

defaultCellThe cell to customize that will be displayed in the jtable.
cellModelThe cell model for this cell.
The provided defaultCell.

Definition at line 68 of file

References org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModel.getHorizontalAlignment(), org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModel.HorizontalAlign.getJLabelAlignment(), org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModel.getText(), and org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModel.getTooltip().

Member Data Documentation

final int org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.DEFAULT_ALIGNMENT = JLabel.LEFT

Definition at line 43 of file

final Border org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.DEFAULT_BORDER = BorderFactory.createEmptyBorder(2, 4, 2, 4)

Definition at line 44 of file

final CellMouseListener org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.DEFAULT_CELL_MOUSE_LISTENER
Initial value:
= new CellMouseListener() {
public void mouseClicked(CellMouseEvent cellEvent) {
if (cellEvent.getCellValue() instanceof GuiCellModel && cellEvent.getMouseEvent().getButton() != MouseEvent.BUTTON1) {
cellEvent.getTable().setRowSelectionInterval(cellEvent.getRow(), cellEvent.getRow());
GuiCellModel cellModel = (GuiCellModel) cellEvent.getCellValue();
List<MenuItem> menuItems = cellModel.getPopupMenu();
if (CollectionUtils.isNotEmpty(menuItems)) {
final JPopupMenu popupMenu = new JPopupMenu();
for (MenuItem mItem : menuItems) {
JMenuItem jMenuItem = new JMenuItem(mItem.getTitle());
if (mItem.getAction() != null) {
jMenuItem.addActionListener((evt) -> mItem.getAction().run());
}, cellEvent.getMouseEvent().getX(), cellEvent.getMouseEvent().getY());

The default cell mouse listener that triggers popups for non-primary button events.

Definition at line 85 of file

Referenced by org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.getMouseListener().

final long org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.serialVersionUID = 1L

Definition at line 42 of file

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

Copyright © 2012-2022 Basis Technology. Generated on: Tue Feb 6 2024
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.