Autopsy  4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | 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.


interface  CellModel
class  DefaultCellModel
class  DefaultMenuItem
enum  HorizontalAlign
interface  MenuItem

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, CellModel cellModel)

Static Private Attributes

static final int DEFAULT_ALIGNMENT = JLabel.LEFT
static final Border DEFAULT_BORDER = BorderFactory.createEmptyBorder(1, 5, 1, 5)
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 44 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 279 of file

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

Member Data Documentation

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

Definition at line 275 of file

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

Definition at line 276 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 CellModel && cellEvent.getMouseEvent().getButton() != MouseEvent.BUTTON1) {
cellEvent.getTable().setRowSelectionInterval(cellEvent.getRow(), cellEvent.getRow());
CellModel cellModel = (CellModel) 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 339 of file

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

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

Definition at line 46 of file

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

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