3849 update copyright and comments

This commit is contained in:
William Schaefer 2021-07-27 13:09:42 -04:00
parent 28a011c3e9
commit 8d70a55315
6 changed files with 52 additions and 38 deletions

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2012-2019 Basis Technology Corp.
* Copyright 2012-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2017-2019 Basis Technology Corp.
* Copyright 2017-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011 Basis Technology Corp.
* Copyright 2011-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -48,6 +48,11 @@ class DataSourceFilter extends AbstractFileSearchFilter<DataSourcePanel> {
return this.getComponent().isSelected();
}
/**
* Set the data source filter to select the specified data source initially.
*
* @param dataSourceId - The data source to select.
*/
void setSelectedDataSource(long dataSourceId) {
this.getComponent().setDataSourceSelected(dataSourceId);
}

View File

@ -1,15 +1,15 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011-2018 Basis Technology Corp.
*
* Copyright 2011-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -48,10 +48,15 @@ final class FileSearchDialog extends javax.swing.JDialog {
});
}
void setSelectedDataSourceFilter(long dataSourceId){
/**
* Set the data source filter to select the specified data source initially.
*
* @param dataSourceId - The data source to select.
*/
void setSelectedDataSourceFilter(long dataSourceId) {
fileSearchPanel1.setDataSourceFilter(dataSourceId);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
@ -83,4 +88,3 @@ final class FileSearchDialog extends javax.swing.JDialog {
private org.sleuthkit.autopsy.filesearch.FileSearchPanel fileSearchPanel1;
// End of variables declaration//GEN-END:variables
}

View File

@ -1,15 +1,15 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2011-2019 Basis Technology Corp.
*
* Copyright 2011-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -78,39 +78,39 @@ class FileSearchPanel extends javax.swing.JPanel {
* This method is called from within the constructor to initialize the form.
*/
private void customizeComponents() {
JLabel label = new JLabel(NbBundle.getMessage(this.getClass(), "FileSearchPanel.custComp.label.text"));
label.setAlignmentX(Component.LEFT_ALIGNMENT);
label.setBorder(new EmptyBorder(0, 0, 10, 0));
JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayout(1,2));
panel1.setLayout(new GridLayout(1, 2));
panel1.add(new JLabel(""));
JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayout(1,2, 20, 0));
panel2.setLayout(new GridLayout(1, 2, 20, 0));
JPanel panel3 = new JPanel();
panel3.setLayout(new GridLayout(1,2, 20, 0));
panel3.setLayout(new GridLayout(1, 2, 20, 0));
JPanel panel4 = new JPanel();
panel4.setLayout(new GridLayout(1,2, 20, 0));
panel4.setLayout(new GridLayout(1, 2, 20, 0));
JPanel panel5 = new JPanel();
panel5.setLayout(new GridLayout(1,2, 20, 0));
panel5.setLayout(new GridLayout(1, 2, 20, 0));
// Create and add filter areas
NameSearchFilter nameFilter = new NameSearchFilter();
NameSearchFilter nameFilter = new NameSearchFilter();
SizeSearchFilter sizeFilter = new SizeSearchFilter();
DateSearchFilter dateFilter = new DateSearchFilter();
KnownStatusSearchFilter knowStatusFilter = new KnownStatusSearchFilter();
HashSearchFilter hashFilter = new HashSearchFilter();
MimeTypeFilter mimeTypeFilter = new MimeTypeFilter();
dataSourceFilter = new DataSourceFilter();
panel2.add(new FilterArea(NbBundle.getMessage(this.getClass(), "FileSearchPanel.filterTitle.name"),nameFilter));
panel3.add(new FilterArea(NbBundle.getMessage(this.getClass(), "FileSearchPanel.filterTitle.metadata"),sizeFilter));
panel2.add(new FilterArea(NbBundle.getMessage(this.getClass(), "FileSearchPanel.filterTitle.metadata"), dateFilter));
panel2.add(new FilterArea(NbBundle.getMessage(this.getClass(), "FileSearchPanel.filterTitle.name"), nameFilter));
panel3.add(new FilterArea(NbBundle.getMessage(this.getClass(), "FileSearchPanel.filterTitle.metadata"), sizeFilter));
panel2.add(new FilterArea(NbBundle.getMessage(this.getClass(), "FileSearchPanel.filterTitle.metadata"), dateFilter));
panel3.add(new FilterArea(NbBundle.getMessage(this.getClass(), "FileSearchPanel.filterTitle.knownStatus"), knowStatusFilter));
panel5.add(new FilterArea(NbBundle.getMessage(this.getClass(), "HashSearchPanel.md5CheckBox.text"), hashFilter));
panel5.add(new JLabel(""));
panel4.add(new FilterArea(NbBundle.getMessage(this.getClass(), "FileSearchPanel.filterTitle.metadata"), mimeTypeFilter));
@ -120,7 +120,7 @@ class FileSearchPanel extends javax.swing.JPanel {
filterPanel.add(panel3);
filterPanel.add(panel4);
filterPanel.add(panel5);
filters.add(nameFilter);
filters.add(sizeFilter);
filters.add(dateFilter);
@ -128,7 +128,7 @@ class FileSearchPanel extends javax.swing.JPanel {
filters.add(hashFilter);
filters.add(mimeTypeFilter);
filters.add(dataSourceFilter);
for (FileSearchFilter filter : this.getFilters()) {
filter.addPropertyChangeListener(new PropertyChangeListener() {
@Override
@ -142,14 +142,19 @@ class FileSearchPanel extends javax.swing.JPanel {
public void actionPerformed(ActionEvent e) {
search();
}
});
});
searchButton.setEnabled(isValidSearch());
}
void setDataSourceFilter(long dataSourceId){
/**
* Set the data source filter to select the specified data source initially.
*
* @param dataSourceId - The data source to select.
*/
void setDataSourceFilter(long dataSourceId) {
dataSourceFilter.setSelectedDataSource(dataSourceId);
}
/**
* @return true if any of the filters in the panel are enabled (checked)
*/
@ -205,10 +210,10 @@ class FileSearchPanel extends javax.swing.JPanel {
if (contentList.isEmpty()) {
Node emptyNode = new TableFilterNode(new EmptyNode(Bundle.FileSearchPanel_emptyNode_display_text()), true);
searchResultWin = DataResultTopComponent.createInstance(title, pathText,
emptyNode, 0);
emptyNode, 0);
} else {
searchResultWin = DataResultTopComponent.createInstance(title, pathText,
tableFilterNode, contentList.size());
tableFilterNode, contentList.size());
}
searchResultWin.requestActive(); // make it the active top component