mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
tweaking
This commit is contained in:
parent
21ea947b66
commit
42b04b7491
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.datasourcesummary.datamodel;
|
package org.sleuthkit.autopsy.datasourcesummary.datamodel;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@ -54,8 +55,6 @@ import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEX
|
|||||||
public class DataSourceUserActivitySummary {
|
public class DataSourceUserActivitySummary {
|
||||||
|
|
||||||
private static final BlackboardArtifact.Type TYPE_DEVICE_ATTACHED = new BlackboardArtifact.Type(TSK_DEVICE_ATTACHED);
|
private static final BlackboardArtifact.Type TYPE_DEVICE_ATTACHED = new BlackboardArtifact.Type(TSK_DEVICE_ATTACHED);
|
||||||
private static final BlackboardArtifact.Type TYPE_MESSAGE = new BlackboardArtifact.Type(TSK_MESSAGE);
|
|
||||||
private static final BlackboardArtifact.Type TYPE_WEB_SEARCH_QUERY = new BlackboardArtifact.Type(TSK_WEB_SEARCH_QUERY);
|
|
||||||
|
|
||||||
private static final BlackboardAttribute.Type TYPE_DATETIME = new BlackboardAttribute.Type(TSK_DATETIME);
|
private static final BlackboardAttribute.Type TYPE_DATETIME = new BlackboardAttribute.Type(TSK_DATETIME);
|
||||||
private static final BlackboardAttribute.Type TYPE_DATETIME_ACCESSED = new BlackboardAttribute.Type(TSK_DATETIME_ACCESSED);
|
private static final BlackboardAttribute.Type TYPE_DATETIME_ACCESSED = new BlackboardAttribute.Type(TSK_DATETIME_ACCESSED);
|
||||||
@ -68,6 +67,11 @@ public class DataSourceUserActivitySummary {
|
|||||||
private static final BlackboardAttribute.Type TYPE_DOMAIN = new BlackboardAttribute.Type(TSK_DOMAIN);
|
private static final BlackboardAttribute.Type TYPE_DOMAIN = new BlackboardAttribute.Type(TSK_DOMAIN);
|
||||||
private static final BlackboardAttribute.Type TYPE_PROG_NAME = new BlackboardAttribute.Type(TSK_PROG_NAME);
|
private static final BlackboardAttribute.Type TYPE_PROG_NAME = new BlackboardAttribute.Type(TSK_PROG_NAME);
|
||||||
|
|
||||||
|
private static final Comparator<TopAccountResult> TOP_ACCOUNT_RESULT_DATE_COMPARE = (a,b) -> a.getLastAccess().compareTo(b.getLastAccess());
|
||||||
|
private static final Comparator<TopWebSearchResult> TOP_WEBSEARCH_RESULT_DATE_COMPARE = (a,b) -> a.getDateAccessed().compareTo(b.getDateAccessed());
|
||||||
|
private static final String ROOT_HUB_IDENTIFIER = "ROOT_HUB";
|
||||||
|
|
||||||
|
|
||||||
private static final long SLEEP_TIME = 5000;
|
private static final long SLEEP_TIME = 5000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -118,17 +122,43 @@ public class DataSourceUserActivitySummary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<TopWebSearchResult> getMostRecentWebSearches(DataSource dataSource, int count) throws SleuthkitCaseProviderException, TskCoreException {
|
public List<TopWebSearchResult> getMostRecentWebSearches(DataSource dataSource, int count) throws SleuthkitCaseProviderException, TskCoreException {
|
||||||
List<TopWebSearchResult> results =
|
if (count <= 0) {
|
||||||
DataSourceInfoUtilities.getArtifacts(caseProvider.get(), TYPE_WEB_SEARCH_QUERY, dataSource, TYPE_DATETIME_ACCESSED, SortOrder.DESCENDING, count)
|
throw new IllegalArgumentException("Count must be greater than 0");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<TopWebSearchResult> results = caseProvider.get().getBlackboard().getArtifacts(TSK_WEB_SEARCH_QUERY.getTypeID(), dataSource.getId())
|
||||||
.stream()
|
.stream()
|
||||||
.map(artifact -> new TopWebSearchResult(
|
// get items where search string and date is not null
|
||||||
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_TEXT),
|
.map(artifact -> {
|
||||||
DataSourceInfoUtilities.getDateOrNull(artifact, TYPE_DATETIME_ACCESSED),
|
String searchString = DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_TEXT);
|
||||||
|
Date dateAccessed = DataSourceInfoUtilities.getDateOrNull(artifact, TYPE_DATETIME_ACCESSED);
|
||||||
|
if (StringUtils.isBlank(searchString) || dateAccessed == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TopWebSearchResult(
|
||||||
|
searchString,
|
||||||
|
dateAccessed,
|
||||||
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_DOMAIN),
|
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_DOMAIN),
|
||||||
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_PROG_NAME)
|
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_PROG_NAME)
|
||||||
))
|
);
|
||||||
|
})
|
||||||
|
// remove null records
|
||||||
|
.filter(result -> result != null && StringUtils.isNotBlank(result.getSearchString()))
|
||||||
|
// get these messages grouped by search to string
|
||||||
|
.collect(Collectors.groupingBy((result) -> result.getSearchString().toUpperCase()))
|
||||||
|
.entrySet()
|
||||||
|
.stream()
|
||||||
|
// get the most recent access per account type
|
||||||
|
.map((entry) -> entry.getValue().stream().max(TOP_WEBSEARCH_RESULT_DATE_COMPARE).get())
|
||||||
|
// get most recent accounts accessed
|
||||||
|
.sorted(TOP_WEBSEARCH_RESULT_DATE_COMPARE.reversed())
|
||||||
|
.limit(count)
|
||||||
|
// get as list
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
|
// get translation if possible
|
||||||
for (TopWebSearchResult result : results) {
|
for (TopWebSearchResult result : results) {
|
||||||
if (StringUtils.isNotBlank(result.getSearchString()) && translationService.hasProvider()) {
|
if (StringUtils.isNotBlank(result.getSearchString()) && translationService.hasProvider()) {
|
||||||
String translated = null;
|
String translated = null;
|
||||||
@ -138,7 +168,8 @@ public class DataSourceUserActivitySummary {
|
|||||||
logger.log(Level.WARNING, String.format("There was an error translating text: '%s'", result.getSearchString()), ex);
|
logger.log(Level.WARNING, String.format("There was an error translating text: '%s'", result.getSearchString()), ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(translated)) {
|
// set translation if there is a translation and that value differs from original
|
||||||
|
if (StringUtils.isNotBlank(translated) && !translated.toUpperCase().trim().equals(result.getSearchString().toUpperCase())) {
|
||||||
result.setTranslatedResult(translated);
|
result.setTranslatedResult(translated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,8 +178,10 @@ public class DataSourceUserActivitySummary {
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<TopDeviceAttachedResult> getRecentDevices(DataSource dataSource, int count) throws SleuthkitCaseProviderException, TskCoreException {
|
public List<TopDeviceAttachedResult> getRecentDevices(DataSource dataSource, int count) throws SleuthkitCaseProviderException, TskCoreException {
|
||||||
return DataSourceInfoUtilities.getArtifacts(caseProvider.get(), TYPE_DEVICE_ATTACHED, dataSource, TYPE_DATETIME, SortOrder.DESCENDING, count)
|
return DataSourceInfoUtilities.getArtifacts(caseProvider.get(), TYPE_DEVICE_ATTACHED, dataSource, TYPE_DATETIME, SortOrder.DESCENDING, 0)
|
||||||
.stream()
|
.stream()
|
||||||
.map(artifact -> new TopDeviceAttachedResult(
|
.map(artifact -> new TopDeviceAttachedResult(
|
||||||
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_DEVICE_ID),
|
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_DEVICE_ID),
|
||||||
@ -157,17 +190,37 @@ public class DataSourceUserActivitySummary {
|
|||||||
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_DEVICE_MODEL),
|
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_DEVICE_MODEL),
|
||||||
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_MAC_ADDRESS)
|
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_MAC_ADDRESS)
|
||||||
))
|
))
|
||||||
|
.filter(result -> result.getDeviceModel() == null || !result.getDeviceModel().trim().toUpperCase().equals(ROOT_HUB_IDENTIFIER))
|
||||||
|
.limit(count)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TopAccountResult> getRecentAccounts(DataSource dataSource, int count) throws SleuthkitCaseProviderException, TskCoreException {
|
public List<TopAccountResult> getRecentAccounts(DataSource dataSource, int count) throws SleuthkitCaseProviderException, TskCoreException {
|
||||||
// TODO fix this for groupings
|
if (count <= 0) {
|
||||||
return DataSourceInfoUtilities.getArtifacts(caseProvider.get(), TYPE_MESSAGE, dataSource, TYPE_DATETIME, SortOrder.DESCENDING, count)
|
throw new IllegalArgumentException("Count must be greater than 0");
|
||||||
|
}
|
||||||
|
|
||||||
|
return caseProvider.get().getBlackboard().getArtifacts(TSK_MESSAGE.getTypeID(), dataSource.getId())
|
||||||
.stream()
|
.stream()
|
||||||
.map(artifact -> new TopAccountResult(
|
// get message type and date (or null if one of those attributes does not exist)
|
||||||
DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_MESSAGE_TYPE),
|
.map(artifact -> {
|
||||||
DataSourceInfoUtilities.getDateOrNull(artifact, TYPE_DATETIME)
|
String type = DataSourceInfoUtilities.getStringOrNull(artifact, TYPE_MESSAGE_TYPE);
|
||||||
))
|
Date date = DataSourceInfoUtilities.getDateOrNull(artifact, TYPE_DATETIME);
|
||||||
|
return (StringUtils.isNotBlank(type) && date != null) ? new TopAccountResult(type, date) : null;
|
||||||
|
})
|
||||||
|
// remove null records
|
||||||
|
.filter(result -> result != null)
|
||||||
|
// get these messages grouped by account type
|
||||||
|
.collect(Collectors.groupingBy(TopAccountResult::getAccountType))
|
||||||
|
.entrySet()
|
||||||
|
.stream()
|
||||||
|
// get the most recent access per account type
|
||||||
|
.map((entry) -> entry.getValue().stream().max(TOP_ACCOUNT_RESULT_DATE_COMPARE).get())
|
||||||
|
// get most recent accounts accessed
|
||||||
|
.sorted(TOP_ACCOUNT_RESULT_DATE_COMPARE.reversed())
|
||||||
|
// limit to count
|
||||||
|
.limit(count)
|
||||||
|
// get as list
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,6 @@ DataSourceSummaryCountsPanel.byCategoryLabel.text=Files by Category
|
|||||||
DataSourceSummaryCountsPanel.resultsByTypeLabel.text=Results by Type
|
DataSourceSummaryCountsPanel.resultsByTypeLabel.text=Results by Type
|
||||||
DataSourceSummaryUserActivityPanel.programsRunLabel.text=Recent Programs
|
DataSourceSummaryUserActivityPanel.programsRunLabel.text=Recent Programs
|
||||||
DataSourceSummaryUserActivityPanel.recentDomainsLabel.text=Recent Domains
|
DataSourceSummaryUserActivityPanel.recentDomainsLabel.text=Recent Domains
|
||||||
DataSourceSummaryUserActivityPanel.recentDomainsLabel1.text=Recent Domains
|
DataSourceSummaryUserActivityPanel.topWebSearchLabel.text=Recent Web Searches
|
||||||
DataSourceSummaryUserActivityPanel.recentDomainsLabel2.text=Recent Domains
|
DataSourceSummaryUserActivityPanel.topDevicesAttachedLabel.text=Recent Devices Attached
|
||||||
DataSourceSummaryUserActivityPanel.recentDomainsLabel3.text=Recent Domains
|
DataSourceSummaryUserActivityPanel.recentAccountsLabel.text=Recent Accounts
|
||||||
|
@ -75,8 +75,16 @@ DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History
|
|||||||
DataSourceSummaryTabbedPane_userActivityTab_title=User Activity
|
DataSourceSummaryTabbedPane_userActivityTab_title=User Activity
|
||||||
DataSourceSummaryUserActivityPanel.programsRunLabel.text=Recent Programs
|
DataSourceSummaryUserActivityPanel.programsRunLabel.text=Recent Programs
|
||||||
DataSourceSummaryUserActivityPanel.recentDomainsLabel.text=Recent Domains
|
DataSourceSummaryUserActivityPanel.recentDomainsLabel.text=Recent Domains
|
||||||
|
DataSourceSummaryUserActivityPanel.topWebSearchLabel.text=Recent Web Searches
|
||||||
|
DataSourceSummaryUserActivityPanel.topDevicesAttachedLabel.text=Recent Devices Attached
|
||||||
|
DataSourceSummaryUserActivityPanel.recentAccountsLabel.text=Recent Accounts
|
||||||
DataSourceSummaryUserActivityPanel_noDataExists=No communication data exists
|
DataSourceSummaryUserActivityPanel_noDataExists=No communication data exists
|
||||||
DataSourceSummaryUserActivityPanel_tab_title=User Activity
|
DataSourceSummaryUserActivityPanel_tab_title=User Activity
|
||||||
|
DataSourceSummaryUserActivityPanel_TopAccountTableModel_accountType_header=Account Type
|
||||||
|
DataSourceSummaryUserActivityPanel_TopAccountTableModel_lastAccess_header=Last Accessed
|
||||||
|
DataSourceSummaryUserActivityPanel_TopDeviceAttachedTableModel_dateAccessed_header=Last Accessed
|
||||||
|
DataSourceSummaryUserActivityPanel_TopDeviceAttachedTableModel_deviceId_header=Device Id
|
||||||
|
DataSourceSummaryUserActivityPanel_TopDeviceAttachedTableModel_makeModel_header=Make and Model
|
||||||
DataSourceSummaryUserActivityPanel_TopDomainsTableModel_domain_header=Domain
|
DataSourceSummaryUserActivityPanel_TopDomainsTableModel_domain_header=Domain
|
||||||
DataSourceSummaryUserActivityPanel_TopDomainsTableModel_lastAccess_header=Last Access
|
DataSourceSummaryUserActivityPanel_TopDomainsTableModel_lastAccess_header=Last Access
|
||||||
DataSourceSummaryUserActivityPanel_TopDomainsTableModel_url_header=URL
|
DataSourceSummaryUserActivityPanel_TopDomainsTableModel_url_header=URL
|
||||||
@ -84,4 +92,7 @@ DataSourceSummaryUserActivityPanel_TopProgramsTableModel_count_header=Run Times
|
|||||||
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_folder_header=Folder
|
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_folder_header=Folder
|
||||||
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_lastrun_header=Last Run
|
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_lastrun_header=Last Run
|
||||||
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_name_header=Program
|
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_name_header=Program
|
||||||
|
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_dateAccessed_header=Date Accessed
|
||||||
|
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_searchString_header=Search String
|
||||||
|
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_translatedResult_header=Translated
|
||||||
ViewSummaryInformationAction.name.text=View Summary Information
|
ViewSummaryInformationAction.name.text=View Summary Information
|
||||||
|
@ -97,13 +97,13 @@
|
|||||||
<Properties>
|
<Properties>
|
||||||
<Property name="alignmentX" type="float" value="0.0"/>
|
<Property name="alignmentX" type="float" value="0.0"/>
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -166,13 +166,13 @@
|
|||||||
<Properties>
|
<Properties>
|
||||||
<Property name="alignmentX" type="float" value="0.0"/>
|
<Property name="alignmentX" type="float" value="0.0"/>
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -201,11 +201,11 @@
|
|||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="recentDomainsLabel1">
|
<Component class="javax.swing.JLabel" name="topWebSearchLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="DataSourceSummaryUserActivityPanel.recentDomainsLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="DataSourceSummaryUserActivityPanel.topWebSearchLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -231,21 +231,21 @@
|
|||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
<Container class="javax.swing.JPanel" name="recentDomainsTablePanel1">
|
<Container class="javax.swing.JPanel" name="topWebSearches">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="alignmentX" type="float" value="0.0"/>
|
<Property name="alignmentX" type="float" value="0.0"/>
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="recentDomainsTable"/>
|
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="topWebSearchesTable"/>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
@ -270,11 +270,11 @@
|
|||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="recentDomainsLabel2">
|
<Component class="javax.swing.JLabel" name="topDevicesAttachedLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="DataSourceSummaryUserActivityPanel.recentDomainsLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="DataSourceSummaryUserActivityPanel.topDevicesAttachedLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -300,21 +300,21 @@
|
|||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
<Container class="javax.swing.JPanel" name="recentDomainsTablePanel2">
|
<Container class="javax.swing.JPanel" name="recentDevicesAttached">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="alignmentX" type="float" value="0.0"/>
|
<Property name="alignmentX" type="float" value="0.0"/>
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="recentDomainsTable"/>
|
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="topDevicesAttachedTable"/>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
@ -339,11 +339,11 @@
|
|||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="recentDomainsLabel3">
|
<Component class="javax.swing.JLabel" name="recentAccountsLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="DataSourceSummaryUserActivityPanel.recentDomainsLabel3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="DataSourceSummaryUserActivityPanel.recentAccountsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
@ -369,21 +369,21 @@
|
|||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.RigidArea"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
</Component>
|
</Component>
|
||||||
<Container class="javax.swing.JPanel" name="recentDomainsTablePanel3">
|
<Container class="javax.swing.JPanel" name="topAccounts">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="alignmentX" type="float" value="0.0"/>
|
<Property name="alignmentX" type="float" value="0.0"/>
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||||
<Dimension value="[700, 187]"/>
|
<Dimension value="[700, 106]"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
<AuxValues>
|
||||||
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="recentDomainsTable"/>
|
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="topAccountsTable"/>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||||
</AuxValues>
|
</AuxValues>
|
||||||
|
@ -135,17 +135,13 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
Bundle.DataSourceSummaryUserActivityPanel_TopProgramsTableModel_count_header(),
|
Bundle.DataSourceSummaryUserActivityPanel_TopProgramsTableModel_count_header(),
|
||||||
(prog) -> {
|
(prog) -> {
|
||||||
String runTimes = prog.getRunTimes() == null ? "" : Long.toString(prog.getRunTimes());
|
String runTimes = prog.getRunTimes() == null ? "" : Long.toString(prog.getRunTimes());
|
||||||
return new DefaultCellModel(runTimes)
|
return new DefaultCellModel(runTimes);
|
||||||
.setHorizontalAlignment(HorizontalAlign.RIGHT);
|
|
||||||
},
|
},
|
||||||
80),
|
80),
|
||||||
// last run date column
|
// last run date column
|
||||||
new ColumnModel<>(
|
new ColumnModel<>(
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_TopProgramsTableModel_lastrun_header(),
|
Bundle.DataSourceSummaryUserActivityPanel_TopProgramsTableModel_lastrun_header(),
|
||||||
(prog) -> {
|
(prog) -> new DefaultCellModel(getFormatted(prog.getLastRun())),
|
||||||
return new DefaultCellModel(getFormatted(prog.getLastRun()))
|
|
||||||
.setHorizontalAlignment(HorizontalAlign.RIGHT);
|
|
||||||
},
|
|
||||||
150)
|
150)
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -166,10 +162,7 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
// last accessed column
|
// last accessed column
|
||||||
new ColumnModel<>(
|
new ColumnModel<>(
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_TopDomainsTableModel_lastAccess_header(),
|
Bundle.DataSourceSummaryUserActivityPanel_TopDomainsTableModel_lastAccess_header(),
|
||||||
(recentDomain) -> {
|
(recentDomain) -> new DefaultCellModel(getFormatted(recentDomain.getLastVisit())),
|
||||||
return new DefaultCellModel(getFormatted(recentDomain.getLastVisit()))
|
|
||||||
.setHorizontalAlignment(HorizontalAlign.RIGHT);
|
|
||||||
},
|
|
||||||
150)
|
150)
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -184,8 +177,7 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
// last accessed
|
// last accessed
|
||||||
new ColumnModel<>(
|
new ColumnModel<>(
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_dateAccessed_header(),
|
Bundle.DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_dateAccessed_header(),
|
||||||
(webSearch) -> new DefaultCellModel(getFormatted(webSearch.getDateAccessed()))
|
(webSearch) -> new DefaultCellModel(getFormatted(webSearch.getDateAccessed())),
|
||||||
.setHorizontalAlignment(HorizontalAlign.RIGHT),
|
|
||||||
150
|
150
|
||||||
),
|
),
|
||||||
// translated value
|
// translated value
|
||||||
@ -207,8 +199,7 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
// last accessed
|
// last accessed
|
||||||
new ColumnModel<>(
|
new ColumnModel<>(
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_TopDeviceAttachedTableModel_dateAccessed_header(),
|
Bundle.DataSourceSummaryUserActivityPanel_TopDeviceAttachedTableModel_dateAccessed_header(),
|
||||||
(device) -> new DefaultCellModel(getFormatted(device.getDateAccessed()))
|
(device) -> new DefaultCellModel(getFormatted(device.getDateAccessed())),
|
||||||
.setHorizontalAlignment(HorizontalAlign.RIGHT),
|
|
||||||
150
|
150
|
||||||
),
|
),
|
||||||
// make and model
|
// make and model
|
||||||
@ -237,8 +228,7 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
// last accessed
|
// last accessed
|
||||||
new ColumnModel<>(
|
new ColumnModel<>(
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_TopAccountTableModel_lastAccess_header(),
|
Bundle.DataSourceSummaryUserActivityPanel_TopAccountTableModel_lastAccess_header(),
|
||||||
(account) -> new DefaultCellModel(getFormatted(account.getLastAccess()))
|
(account) -> new DefaultCellModel(getFormatted(account.getLastAccess())),
|
||||||
.setHorizontalAlignment(HorizontalAlign.RIGHT),
|
|
||||||
150
|
150
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
@ -255,27 +245,27 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
// set up data acquisition methods
|
// set up data acquisition methods
|
||||||
dataFetchComponents = Arrays.asList(
|
dataFetchComponents = Arrays.asList(
|
||||||
// top programs query
|
// top programs query
|
||||||
new DataFetchComponents<DataSource, List<TopProgramsResult>>(
|
new DataFetchComponents<>(
|
||||||
(dataSource) -> topProgramsData.getTopPrograms(dataSource, TOP_PROGS_COUNT),
|
(dataSource) -> topProgramsData.getTopPrograms(dataSource, TOP_PROGS_COUNT),
|
||||||
(result) -> topProgramsTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
(result) -> topProgramsTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_noDataExists())),
|
Bundle.DataSourceSummaryUserActivityPanel_noDataExists())),
|
||||||
// top domains query
|
// top domains query
|
||||||
new DataFetchComponents<DataSource, List<TopDomainsResult>>(
|
new DataFetchComponents<>(
|
||||||
(dataSource) -> topDomainsData.getRecentDomains(dataSource, TOP_DOMAINS_COUNT),
|
(dataSource) -> topDomainsData.getRecentDomains(dataSource, TOP_DOMAINS_COUNT),
|
||||||
(result) -> recentDomainsTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
(result) -> recentDomainsTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_noDataExists())),
|
Bundle.DataSourceSummaryUserActivityPanel_noDataExists())),
|
||||||
// top web searches query
|
// top web searches query
|
||||||
new DataFetchComponents<DataSource, List<TopWebSearchResult>>(
|
new DataFetchComponents<>(
|
||||||
(dataSource) -> topDomainsData.getMostRecentWebSearches(dataSource, TOP_SEARCHES_COUNT),
|
(dataSource) -> topDomainsData.getMostRecentWebSearches(dataSource, TOP_SEARCHES_COUNT),
|
||||||
(result) -> topWebSearchesTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
(result) -> topWebSearchesTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_noDataExists())),
|
Bundle.DataSourceSummaryUserActivityPanel_noDataExists())),
|
||||||
// top devices query
|
// top devices query
|
||||||
new DataFetchComponents<DataSource, List<TopDeviceAttachedResult>>(
|
new DataFetchComponents<>(
|
||||||
(dataSource) -> topDomainsData.getRecentDevices(dataSource, TOP_DEVICES_COUNT),
|
(dataSource) -> topDomainsData.getRecentDevices(dataSource, TOP_DEVICES_COUNT),
|
||||||
(result) -> topDevicesAttachedTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
(result) -> topDevicesAttachedTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_noDataExists())),
|
Bundle.DataSourceSummaryUserActivityPanel_noDataExists())),
|
||||||
// top accounts query
|
// top accounts query
|
||||||
new DataFetchComponents<DataSource, List<TopAccountResult>>(
|
new DataFetchComponents<>(
|
||||||
(dataSource) -> topDomainsData.getRecentAccounts(dataSource, TOP_ACCOUNTS_COUNT),
|
(dataSource) -> topDomainsData.getRecentAccounts(dataSource, TOP_ACCOUNTS_COUNT),
|
||||||
(result) -> topAccountsTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
(result) -> topAccountsTable.showDataFetchResult(result, JTablePanel.getDefaultErrorMessage(),
|
||||||
Bundle.DataSourceSummaryUserActivityPanel_noDataExists()))
|
Bundle.DataSourceSummaryUserActivityPanel_noDataExists()))
|
||||||
@ -326,17 +316,17 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
javax.swing.Box.Filler filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
javax.swing.Box.Filler filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
||||||
javax.swing.JPanel recentDomainsTablePanel = recentDomainsTable;
|
javax.swing.JPanel recentDomainsTablePanel = recentDomainsTable;
|
||||||
javax.swing.Box.Filler filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20));
|
javax.swing.Box.Filler filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20));
|
||||||
javax.swing.JLabel recentDomainsLabel1 = new javax.swing.JLabel();
|
javax.swing.JLabel topWebSearchLabel = new javax.swing.JLabel();
|
||||||
javax.swing.Box.Filler filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
javax.swing.Box.Filler filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
||||||
javax.swing.JPanel recentDomainsTablePanel1 = recentDomainsTable;
|
javax.swing.JPanel topWebSearches = topWebSearchesTable;
|
||||||
javax.swing.Box.Filler filler6 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20));
|
javax.swing.Box.Filler filler6 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20));
|
||||||
javax.swing.JLabel recentDomainsLabel2 = new javax.swing.JLabel();
|
javax.swing.JLabel topDevicesAttachedLabel = new javax.swing.JLabel();
|
||||||
javax.swing.Box.Filler filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
javax.swing.Box.Filler filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
||||||
javax.swing.JPanel recentDomainsTablePanel2 = recentDomainsTable;
|
javax.swing.JPanel recentDevicesAttached = topDevicesAttachedTable;
|
||||||
javax.swing.Box.Filler filler8 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20));
|
javax.swing.Box.Filler filler8 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20));
|
||||||
javax.swing.JLabel recentDomainsLabel3 = new javax.swing.JLabel();
|
javax.swing.JLabel recentAccountsLabel = new javax.swing.JLabel();
|
||||||
javax.swing.Box.Filler filler9 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
javax.swing.Box.Filler filler9 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
||||||
javax.swing.JPanel recentDomainsTablePanel3 = recentDomainsTable;
|
javax.swing.JPanel topAccounts = topAccountsTable;
|
||||||
|
|
||||||
setLayout(new java.awt.BorderLayout());
|
setLayout(new java.awt.BorderLayout());
|
||||||
|
|
||||||
@ -355,9 +345,9 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
contentPanel.add(filler1);
|
contentPanel.add(filler1);
|
||||||
|
|
||||||
topProgramsTablePanel.setAlignmentX(0.0F);
|
topProgramsTablePanel.setAlignmentX(0.0F);
|
||||||
topProgramsTablePanel.setMaximumSize(new java.awt.Dimension(700, 187));
|
topProgramsTablePanel.setMaximumSize(new java.awt.Dimension(700, 106));
|
||||||
topProgramsTablePanel.setMinimumSize(new java.awt.Dimension(700, 187));
|
topProgramsTablePanel.setMinimumSize(new java.awt.Dimension(700, 106));
|
||||||
topProgramsTablePanel.setPreferredSize(new java.awt.Dimension(700, 187));
|
topProgramsTablePanel.setPreferredSize(new java.awt.Dimension(700, 106));
|
||||||
contentPanel.add(topProgramsTablePanel);
|
contentPanel.add(topProgramsTablePanel);
|
||||||
contentPanel.add(filler3);
|
contentPanel.add(filler3);
|
||||||
|
|
||||||
@ -367,46 +357,46 @@ public class DataSourceSummaryUserActivityPanel extends BaseDataSourceSummaryPan
|
|||||||
contentPanel.add(filler2);
|
contentPanel.add(filler2);
|
||||||
|
|
||||||
recentDomainsTablePanel.setAlignmentX(0.0F);
|
recentDomainsTablePanel.setAlignmentX(0.0F);
|
||||||
recentDomainsTablePanel.setMaximumSize(new java.awt.Dimension(700, 187));
|
recentDomainsTablePanel.setMaximumSize(new java.awt.Dimension(700, 106));
|
||||||
recentDomainsTablePanel.setMinimumSize(new java.awt.Dimension(700, 187));
|
recentDomainsTablePanel.setMinimumSize(new java.awt.Dimension(700, 106));
|
||||||
recentDomainsTablePanel.setPreferredSize(new java.awt.Dimension(700, 187));
|
recentDomainsTablePanel.setPreferredSize(new java.awt.Dimension(700, 106));
|
||||||
contentPanel.add(recentDomainsTablePanel);
|
contentPanel.add(recentDomainsTablePanel);
|
||||||
contentPanel.add(filler4);
|
contentPanel.add(filler4);
|
||||||
|
|
||||||
recentDomainsLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
topWebSearchLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(recentDomainsLabel1, org.openide.util.NbBundle.getMessage(DataSourceSummaryUserActivityPanel.class, "DataSourceSummaryUserActivityPanel.recentDomainsLabel1.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(topWebSearchLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryUserActivityPanel.class, "DataSourceSummaryUserActivityPanel.topWebSearchLabel.text")); // NOI18N
|
||||||
contentPanel.add(recentDomainsLabel1);
|
contentPanel.add(topWebSearchLabel);
|
||||||
contentPanel.add(filler5);
|
contentPanel.add(filler5);
|
||||||
|
|
||||||
recentDomainsTablePanel1.setAlignmentX(0.0F);
|
topWebSearches.setAlignmentX(0.0F);
|
||||||
recentDomainsTablePanel1.setMaximumSize(new java.awt.Dimension(700, 187));
|
topWebSearches.setMaximumSize(new java.awt.Dimension(700, 106));
|
||||||
recentDomainsTablePanel1.setMinimumSize(new java.awt.Dimension(700, 187));
|
topWebSearches.setMinimumSize(new java.awt.Dimension(700, 106));
|
||||||
recentDomainsTablePanel1.setPreferredSize(new java.awt.Dimension(700, 187));
|
topWebSearches.setPreferredSize(new java.awt.Dimension(700, 106));
|
||||||
contentPanel.add(recentDomainsTablePanel1);
|
contentPanel.add(topWebSearches);
|
||||||
contentPanel.add(filler6);
|
contentPanel.add(filler6);
|
||||||
|
|
||||||
recentDomainsLabel2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
topDevicesAttachedLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(recentDomainsLabel2, org.openide.util.NbBundle.getMessage(DataSourceSummaryUserActivityPanel.class, "DataSourceSummaryUserActivityPanel.recentDomainsLabel2.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(topDevicesAttachedLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryUserActivityPanel.class, "DataSourceSummaryUserActivityPanel.topDevicesAttachedLabel.text")); // NOI18N
|
||||||
contentPanel.add(recentDomainsLabel2);
|
contentPanel.add(topDevicesAttachedLabel);
|
||||||
contentPanel.add(filler7);
|
contentPanel.add(filler7);
|
||||||
|
|
||||||
recentDomainsTablePanel2.setAlignmentX(0.0F);
|
recentDevicesAttached.setAlignmentX(0.0F);
|
||||||
recentDomainsTablePanel2.setMaximumSize(new java.awt.Dimension(700, 187));
|
recentDevicesAttached.setMaximumSize(new java.awt.Dimension(700, 106));
|
||||||
recentDomainsTablePanel2.setMinimumSize(new java.awt.Dimension(700, 187));
|
recentDevicesAttached.setMinimumSize(new java.awt.Dimension(700, 106));
|
||||||
recentDomainsTablePanel2.setPreferredSize(new java.awt.Dimension(700, 187));
|
recentDevicesAttached.setPreferredSize(new java.awt.Dimension(700, 106));
|
||||||
contentPanel.add(recentDomainsTablePanel2);
|
contentPanel.add(recentDevicesAttached);
|
||||||
contentPanel.add(filler8);
|
contentPanel.add(filler8);
|
||||||
|
|
||||||
recentDomainsLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
recentAccountsLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(recentDomainsLabel3, org.openide.util.NbBundle.getMessage(DataSourceSummaryUserActivityPanel.class, "DataSourceSummaryUserActivityPanel.recentDomainsLabel3.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(recentAccountsLabel, org.openide.util.NbBundle.getMessage(DataSourceSummaryUserActivityPanel.class, "DataSourceSummaryUserActivityPanel.recentAccountsLabel.text")); // NOI18N
|
||||||
contentPanel.add(recentDomainsLabel3);
|
contentPanel.add(recentAccountsLabel);
|
||||||
contentPanel.add(filler9);
|
contentPanel.add(filler9);
|
||||||
|
|
||||||
recentDomainsTablePanel3.setAlignmentX(0.0F);
|
topAccounts.setAlignmentX(0.0F);
|
||||||
recentDomainsTablePanel3.setMaximumSize(new java.awt.Dimension(700, 187));
|
topAccounts.setMaximumSize(new java.awt.Dimension(700, 106));
|
||||||
recentDomainsTablePanel3.setMinimumSize(new java.awt.Dimension(700, 187));
|
topAccounts.setMinimumSize(new java.awt.Dimension(700, 106));
|
||||||
recentDomainsTablePanel3.setPreferredSize(new java.awt.Dimension(700, 187));
|
topAccounts.setPreferredSize(new java.awt.Dimension(700, 106));
|
||||||
contentPanel.add(recentDomainsTablePanel3);
|
contentPanel.add(topAccounts);
|
||||||
|
|
||||||
contentScrollPane.setViewportView(contentPanel);
|
contentScrollPane.setViewportView(contentPanel);
|
||||||
|
|
||||||
|
@ -19,8 +19,11 @@
|
|||||||
package org.sleuthkit.autopsy.datasourcesummary.uiutils;
|
package org.sleuthkit.autopsy.datasourcesummary.uiutils;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
|
import java.awt.Insets;
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
|
import javax.swing.border.Border;
|
||||||
import javax.swing.table.DefaultTableCellRenderer;
|
import javax.swing.table.DefaultTableCellRenderer;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
@ -80,6 +83,11 @@ public class CellModelTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
* @return The horizontal alignment for the text in the cell.
|
* @return The horizontal alignment for the text in the cell.
|
||||||
*/
|
*/
|
||||||
HorizontalAlign getHorizontalAlignment();
|
HorizontalAlign getHorizontalAlignment();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The insets for the cell text.
|
||||||
|
*/
|
||||||
|
Insets getInsets();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -90,6 +98,7 @@ public class CellModelTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
private final String text;
|
private final String text;
|
||||||
private String tooltip;
|
private String tooltip;
|
||||||
private HorizontalAlign horizontalAlignment;
|
private HorizontalAlign horizontalAlignment;
|
||||||
|
private Insets insets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main constructor.
|
* Main constructor.
|
||||||
@ -139,13 +148,29 @@ public class CellModelTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Insets getInsets() {
|
||||||
|
return insets;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the insets for the text within the cell
|
||||||
|
* @param insets The insets.
|
||||||
|
* @return As a utility, returns this.
|
||||||
|
*/
|
||||||
|
public DefaultCellModel setInsets(Insets insets) {
|
||||||
|
this.insets = insets;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getText();
|
return getText();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int DEFAULT_ALIGNMENT = JLabel.LEFT;
|
private static final int DEFAULT_ALIGNMENT = JLabel.LEFT;
|
||||||
|
private static final Border DEFAULT_BORDER = BorderFactory.createEmptyBorder(1,5,1,5);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getTableCellRendererComponent(JTable table, Object value,
|
public Component getTableCellRendererComponent(JTable table, Object value,
|
||||||
@ -186,6 +211,14 @@ public class CellModelTableCellRenderer extends DefaultTableCellRenderer {
|
|||||||
defaultCell.setToolTipText(null);
|
defaultCell.setToolTipText(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sets the padding for cell text within the cell.
|
||||||
|
Insets insets = cellModel.getInsets();
|
||||||
|
if (insets != null) {
|
||||||
|
defaultCell.setBorder(BorderFactory.createEmptyBorder(insets.top, insets.left, insets.bottom, insets.right));
|
||||||
|
} else {
|
||||||
|
defaultCell.setBorder(DEFAULT_BORDER);
|
||||||
|
}
|
||||||
|
|
||||||
// sets the JLabel alignment (left, center, right) or default alignment
|
// sets the JLabel alignment (left, center, right) or default alignment
|
||||||
// if no alignment is specified
|
// if no alignment is specified
|
||||||
int alignment = (cellModel.getHorizontalAlignment() == null)
|
int alignment = (cellModel.getHorizontalAlignment() == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user