Go to the documentation of this file.
19package org.sleuthkit.autopsy.centralrepository.optionspanel;
21import java.util.ArrayList;
23import javax.swing.table.AbstractTableModel;
24import org.openide.util.NbBundle.Messages;
25import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
30class DataSourcesTableModel
extends AbstractTableModel {
32 private static final long serialVersionUID = 1L;
37 private final List<CorrelationDataSource> dataSources;
43 DataSourcesTableModel() {
44 dataSources =
new ArrayList<>();
48 public int getColumnCount() {
53 public int getRowCount() {
54 return dataSources.size();
58 public String getColumnName(
int colIdx) {
63 public Object getValueAt(
int rowIdx,
int colIdx) {
64 if (dataSources.isEmpty()) {
65 return Bundle.DataSourcesTableModel_noData();
79 @Messages({
"DataSourcesTableModel.noData=No Data Sources"})
81 CorrelationDataSource dataSource = dataSources.get(rowIdx);
82 String value = Bundle.DataSourcesTableModel_noData();
86 value = dataSource.getName();
89 value = dataSource.getDeviceID();
98 public Class<String> getColumnClass(
int colIdx) {
107 void addDataSources(List<CorrelationDataSource> dataSourceList) {
108 dataSources.addAll(dataSourceList);
109 fireTableDataChanged();
117 fireTableDataChanged();
120 @Messages({
"DataSourcesTableModel.dataSource=Data Source Name",
121 "DataSourcesTableModel.deviceId=Device ID"})
DataSourcesTableColumns(String columnName)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.