mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Merge branch 'develop' of https://github.com/sleuthkit/autopsy into 2512-ProfilePanelTooTall
This commit is contained in:
commit
d43e586e97
@ -24,7 +24,7 @@ DataContentViewerString.pageLabel2.text=Page
|
|||||||
# Product Information panel
|
# Product Information panel
|
||||||
LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;\">\n <b>Product Version:</b> {0} ({9}) <br><b>Sleuth Kit Version:</b> {7} <br><b>Netbeans RCP Build:</b> {8} <br> <b>Java:</b> {1}; {2}<br> <b>System:</b> {3}; {4}; {5}<br><b>Userdir:</b> {6}</div>
|
LBL_Description=<div style=\"font-size: 12pt; font-family: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif;\">\n <b>Product Version:</b> {0} ({9}) <br><b>Sleuth Kit Version:</b> {7} <br><b>Netbeans RCP Build:</b> {8} <br> <b>Java:</b> {1}; {2}<br> <b>System:</b> {3}; {4}; {5}<br><b>Userdir:</b> {6}</div>
|
||||||
Format_OperatingSystem_Value={0} version {1} running on {2}
|
Format_OperatingSystem_Value={0} version {1} running on {2}
|
||||||
LBL_Copyright=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; ">Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools. <br><ul><li>General Information: <a style\="color\: \#1E2A60;" href\="http\://www.sleuthkit.org">http\://www.sleuthkit.org</a>.</li><li>Training: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/autopsy-training">http://www.basistech.com/autopsy-training</a></li><li>Commercial Support: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/digital-forensics/autopsy/support/">http://www.basistech.com/digital-forensics/autopsy/support/</a></li></ul>Copyright © 2003-2016. </div>
|
LBL_Copyright=<div style\="font-size\: 12pt; font-family\: Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; ">Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools. <br><ul><li>General Information: <a style\="color\: \#1E2A60;" href\="http\://www.sleuthkit.org">http\://www.sleuthkit.org</a>.</li><li>Training: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/autopsy-training">http://www.basistech.com/autopsy-training</a></li><li>Commercial Support: <a style\="color\: \#1E2A60;" href\="http://www.basistech.com/digital-forensics/autopsy/support/">http://www.basistech.com/digital-forensics/autopsy/support/</a></li></ul>Copyright © 2003-2017. </div>
|
||||||
URL_ON_IMG=http://www.sleuthkit.org/
|
URL_ON_IMG=http://www.sleuthkit.org/
|
||||||
|
|
||||||
URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/4.3/
|
URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/4.3/
|
||||||
|
BIN
Core/src/org/sleuthkit/autopsy/corecomponents/checkbox24.png
Normal file
BIN
Core/src/org/sleuthkit/autopsy/corecomponents/checkbox24.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
@ -20,18 +20,20 @@ package org.sleuthkit.autopsy.ingest.runIngestModuleWizard;
|
|||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
|
import java.awt.Dimension;
|
||||||
import java.awt.GridBagConstraints;
|
import java.awt.GridBagConstraints;
|
||||||
import java.awt.GridBagLayout;
|
import java.awt.GridBagLayout;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ItemEvent;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.ItemListener;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.swing.Box;
|
||||||
import static javax.swing.Box.createVerticalGlue;
|
import static javax.swing.Box.createVerticalGlue;
|
||||||
|
import javax.swing.ButtonModel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JRadioButton;
|
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JTextArea;
|
import javax.swing.JTextArea;
|
||||||
|
import javax.swing.JToggleButton;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationDialog;
|
import org.sleuthkit.autopsy.corecomponents.AdvancedConfigurationDialog;
|
||||||
import org.sleuthkit.autopsy.ingest.IngestOptionsPanel;
|
import org.sleuthkit.autopsy.ingest.IngestOptionsPanel;
|
||||||
@ -42,7 +44,7 @@ import org.sleuthkit.autopsy.ingest.IngestProfiles.IngestProfile;
|
|||||||
* Visual panel for the choosing of ingest profiles by the user when running
|
* Visual panel for the choosing of ingest profiles by the user when running
|
||||||
* ingest.
|
* ingest.
|
||||||
*/
|
*/
|
||||||
final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
|
final class IngestProfileSelectionPanel extends JPanel {
|
||||||
|
|
||||||
@Messages({"IngestProfileSelectionPanel.customSettings.name=Custom Settings",
|
@Messages({"IngestProfileSelectionPanel.customSettings.name=Custom Settings",
|
||||||
"IngestProfileSelectionPanel.customSettings.description=configure individual module settings in next step of wizard"})
|
"IngestProfileSelectionPanel.customSettings.description=configure individual module settings in next step of wizard"})
|
||||||
@ -55,6 +57,10 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
|
|||||||
private List<IngestProfile> profiles = Collections.emptyList();
|
private List<IngestProfile> profiles = Collections.emptyList();
|
||||||
boolean isLastPanel = false;
|
boolean isLastPanel = false;
|
||||||
|
|
||||||
|
//Listener for profile button selection
|
||||||
|
ActionListener buttonGroupActionListener = (ActionEvent e) -> {
|
||||||
|
updateSelectedProfile();
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Creates new IngestProfileSelectionPanel
|
* Creates new IngestProfileSelectionPanel
|
||||||
*
|
*
|
||||||
@ -65,8 +71,9 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
|
|||||||
initComponents();
|
initComponents();
|
||||||
wizardPanel = panel;
|
wizardPanel = panel;
|
||||||
selectedProfile = lastSelectedProfile;
|
selectedProfile = lastSelectedProfile;
|
||||||
|
isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext());
|
||||||
|
|
||||||
populateListOfCheckboxes();
|
populateProfilesList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,11 +86,28 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a radio button for custom settings as well as one for each profile
|
* Handles the change to selected profile
|
||||||
|
* if custom settings button is selected, it enables the next button, otherwise
|
||||||
|
* it enables the Finish button.
|
||||||
|
*/
|
||||||
|
private void updateSelectedProfile() {
|
||||||
|
|
||||||
|
ButtonModel selectedButton = profileListButtonGroup.getSelection();
|
||||||
|
selectedProfile = selectedButton.getActionCommand();
|
||||||
|
|
||||||
|
boolean wasLastPanel = isLastPanel;
|
||||||
|
isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext());
|
||||||
|
wizardPanel.fireChangeEvent();
|
||||||
|
this.firePropertyChange("LAST_ENABLED", wasLastPanel, isLastPanel); //NON-NLS
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a button for custom settings as well as one for each profile
|
||||||
* that has been created to the panel containing them.
|
* that has been created to the panel containing them.
|
||||||
*/
|
*/
|
||||||
private void populateListOfCheckboxes() {
|
private void populateProfilesList() {
|
||||||
profiles = getProfiles();
|
profiles = getProfiles();
|
||||||
|
|
||||||
GridBagLayout gridBagLayout = new GridBagLayout();
|
GridBagLayout gridBagLayout = new GridBagLayout();
|
||||||
GridBagConstraints constraints = new GridBagConstraints();
|
GridBagConstraints constraints = new GridBagConstraints();
|
||||||
constraints.fill = GridBagConstraints.HORIZONTAL;
|
constraints.fill = GridBagConstraints.HORIZONTAL;
|
||||||
@ -92,13 +116,15 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
|
|||||||
constraints.weighty = .0;
|
constraints.weighty = .0;
|
||||||
constraints.anchor = GridBagConstraints.FIRST_LINE_START;
|
constraints.anchor = GridBagConstraints.FIRST_LINE_START;
|
||||||
|
|
||||||
addRadioButton(CUSTOM_SETTINGS_DISPLAY_NAME, wizardPanel.getDefaultContext(), CUSTOM_SETTINGS_DESCRIPTION, gridBagLayout, constraints);
|
addButton(CUSTOM_SETTINGS_DISPLAY_NAME, wizardPanel.getDefaultContext(), CUSTOM_SETTINGS_DESCRIPTION, gridBagLayout, constraints);
|
||||||
for (IngestProfile profile : profiles) {
|
|
||||||
|
profiles.forEach((profile) -> {
|
||||||
constraints.weightx = 0;
|
constraints.weightx = 0;
|
||||||
constraints.gridy++;
|
constraints.gridy++;
|
||||||
constraints.gridx = 0;
|
constraints.gridx = 0;
|
||||||
addRadioButton(profile.toString(), profile.toString(), profile.getDescription(), gridBagLayout, constraints);
|
|
||||||
}
|
addButton(profile.toString(), profile.toString(), profile.getDescription(), gridBagLayout, constraints);
|
||||||
|
});
|
||||||
//Add vertical glue at the bottom of the scroll panel so spacing
|
//Add vertical glue at the bottom of the scroll panel so spacing
|
||||||
//between elements is less dependent on the number of elements
|
//between elements is less dependent on the number of elements
|
||||||
constraints.gridy++;
|
constraints.gridy++;
|
||||||
@ -119,29 +145,64 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
|
|||||||
* programmatically
|
* programmatically
|
||||||
* @param profileDesc - the description of the profile
|
* @param profileDesc - the description of the profile
|
||||||
*/
|
*/
|
||||||
private void addRadioButton(String profileDisplayName, String profileContextName, String profileDesc, GridBagLayout layout, GridBagConstraints constraints) {
|
private void addButton(String profileDisplayName, String profileContextName, String profileDesc, GridBagLayout layout, GridBagConstraints constraints) {
|
||||||
String displayText = profileDisplayName + " - " + profileDesc;
|
|
||||||
JRadioButton myRadio = new JRadioButton();
|
//Add a spacer
|
||||||
|
Dimension spacerBlockDimension = new Dimension(6, 4); // Space between left edge and button, Space between rows
|
||||||
|
Box.Filler spacer = new Box.Filler(spacerBlockDimension, spacerBlockDimension, spacerBlockDimension);
|
||||||
|
constraints.weightx = 1;
|
||||||
|
layout.setConstraints(spacer, constraints);
|
||||||
|
profileListPanel.add(spacer);
|
||||||
|
constraints.gridx++;
|
||||||
|
constraints.gridy++;
|
||||||
|
|
||||||
|
|
||||||
|
JToggleButton profileButton = new JToggleButton();
|
||||||
|
profileButton.setMaximumSize(new java.awt.Dimension(48, 48));
|
||||||
|
profileButton.setMinimumSize(new java.awt.Dimension(48, 48));
|
||||||
|
profileButton.setPreferredSize(new java.awt.Dimension(48, 48));
|
||||||
|
|
||||||
|
profileButton.setName(profileContextName);
|
||||||
|
profileButton.setActionCommand(profileContextName);
|
||||||
|
|
||||||
|
profileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/timeline/images/magnifier-zoom-in-green.png")));
|
||||||
|
profileButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/checkbox24.png")));
|
||||||
|
profileButton.setFocusable(false);
|
||||||
|
profileButton.setFocusPainted(false);
|
||||||
|
profileButton.addActionListener(buttonGroupActionListener);
|
||||||
|
|
||||||
|
if (profileContextName.equals(selectedProfile)) {
|
||||||
|
profileButton.setSelected(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
profileListButtonGroup.add(profileButton);
|
||||||
|
profileListPanel.add(profileButton);
|
||||||
|
layout.setConstraints(profileButton, constraints);
|
||||||
|
constraints.gridx++;
|
||||||
|
constraints.weightx = 1;
|
||||||
|
|
||||||
//Using a JTextArea as though it is a label in order to get multi-line support
|
//Using a JTextArea as though it is a label in order to get multi-line support
|
||||||
|
String displayText = profileDisplayName;
|
||||||
|
if (!profileDesc.isEmpty()) {
|
||||||
|
displayText += " - " + profileDesc;
|
||||||
|
}
|
||||||
JTextArea myLabel = new JTextArea(displayText);
|
JTextArea myLabel = new JTextArea(displayText);
|
||||||
Color gray = new Color(240, 240, 240); //matches background of panel
|
Color gray = new Color(240, 240, 240); //matches background of panel
|
||||||
myLabel.setBackground(gray);
|
myLabel.setBackground(gray);
|
||||||
myLabel.setEditable(false);
|
myLabel.setEditable(false);
|
||||||
myLabel.setWrapStyleWord(true);
|
myLabel.setWrapStyleWord(true);
|
||||||
myLabel.setLineWrap(true);
|
myLabel.setLineWrap(true);
|
||||||
myRadio.setName(profileContextName);
|
|
||||||
myRadio.setToolTipText(profileDesc);
|
//Add space between the button and text
|
||||||
myRadio.addItemListener(this);
|
Box.Filler buttonTextSpacer = new Box.Filler(spacerBlockDimension, spacerBlockDimension, spacerBlockDimension);
|
||||||
if (profileContextName.equals(selectedProfile)) {
|
layout.setConstraints(buttonTextSpacer, constraints);
|
||||||
myRadio.setSelected(true);
|
profileListPanel.add(buttonTextSpacer);
|
||||||
}
|
|
||||||
profileListButtonGroup.add(myRadio);
|
|
||||||
profileListPanel.add(myRadio);
|
|
||||||
layout.setConstraints(myRadio, constraints);
|
|
||||||
constraints.gridx++;
|
constraints.gridx++;
|
||||||
constraints.weightx = 1;
|
|
||||||
|
//Add the text area serving as a label to the right of the button
|
||||||
profileListPanel.add(myLabel);
|
profileListPanel.add(myLabel);
|
||||||
layout.setConstraints(myLabel, constraints);
|
layout.setConstraints(myLabel, constraints);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -164,30 +225,6 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
|
|||||||
profileListPanel.removeAll();
|
profileListPanel.removeAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Listens for changes and checks the currently selected radio button if
|
|
||||||
* custom settings button is enabled it enables the next button, otherwise
|
|
||||||
* it enables the Finish button.
|
|
||||||
*
|
|
||||||
* @param e
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void itemStateChanged(ItemEvent e) {
|
|
||||||
for (Component rButton : profileListPanel.getComponents()) {
|
|
||||||
if (rButton instanceof JRadioButton){
|
|
||||||
JRadioButton jrb = (JRadioButton) rButton;
|
|
||||||
if (jrb.isSelected()) {
|
|
||||||
selectedProfile = jrb.getName();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
boolean wasLastPanel = isLastPanel;
|
|
||||||
isLastPanel = !selectedProfile.equals(wizardPanel.getDefaultContext());
|
|
||||||
wizardPanel.fireChangeEvent();
|
|
||||||
this.firePropertyChange("LAST_ENABLED", wasLastPanel, isLastPanel); //NON-NLS
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all the currently existing ingest profiles.
|
* Get all the currently existing ingest profiles.
|
||||||
*/
|
*/
|
||||||
@ -272,7 +309,7 @@ final class IngestProfileSelectionPanel extends JPanel implements ItemListener {
|
|||||||
fetchProfileList();
|
fetchProfileList();
|
||||||
profileListPanel.revalidate();
|
profileListPanel.revalidate();
|
||||||
profileListPanel.repaint();
|
profileListPanel.repaint();
|
||||||
populateListOfCheckboxes();
|
populateProfilesList();
|
||||||
dialog.close();
|
dialog.close();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -25,7 +25,6 @@ import junit.framework.Test;
|
|||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
import org.netbeans.jemmy.Timeouts;
|
import org.netbeans.jemmy.Timeouts;
|
||||||
import org.netbeans.junit.NbModuleSuite;
|
import org.netbeans.junit.NbModuleSuite;
|
||||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test expects the following system properties to be set: img_path: The
|
* This test expects the following system properties to be set: img_path: The
|
||||||
@ -99,7 +98,6 @@ public class RegressionTest extends TestCase {
|
|||||||
public void setUp() {
|
public void setUp() {
|
||||||
logger.info("######## " + AutopsyTestCases.getEscapedPath(System.getProperty("img_path")) + " #######");
|
logger.info("######## " + AutopsyTestCases.getEscapedPath(System.getProperty("img_path")) + " #######");
|
||||||
Timeouts.setDefault("ComponentOperator.WaitComponentTimeout", 1000000);
|
Timeouts.setDefault("ComponentOperator.WaitComponentTimeout", 1000000);
|
||||||
UserPreferences.setNumberOfFileIngestThreads(1); //Let nightly test using 1 ingest thread to avoid ordering results in report of insertion to tsk tables
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user