diff --git a/Core/src/org/sleuthkit/autopsy/discovery/AbstractDiscoveryFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/AbstractDiscoveryFilterPanel.java index fa287b1bff..558a94fef2 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/AbstractDiscoveryFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/AbstractDiscoveryFilterPanel.java @@ -69,4 +69,8 @@ abstract class AbstractDiscoveryFilterPanel extends javax.swing.JPanel { } } + boolean hasPanel() { + return true; + } + } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/AbstractFiltersPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/AbstractFiltersPanel.java index 10ff50c49a..9b3aca9923 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/AbstractFiltersPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/AbstractFiltersPanel.java @@ -13,6 +13,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.List; +import javax.swing.JPanel; +import javax.swing.JSplitPane; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -20,58 +22,76 @@ import javax.swing.event.ListSelectionListener; * * @author wschaefer */ -abstract class AbstractFiltersPanel extends javax.swing.JPanel implements ActionListener, ListSelectionListener { +abstract class AbstractFiltersPanel extends JPanel implements ActionListener, ListSelectionListener { - private static boolean isInitialized = false; + private boolean isInitialized = false; private static final double LABEL_WEIGHT = 0; private static final double PANEL_WEIGHT = .1; private static final int LABEL_WIDTH = 1; private static final int PANEL_WIDTH = 2; - private static final int NUMBER_OF_COLUMNS = 6; + private static final int LABEL_HEIGHT = 1; + private static final int PANEL_HEIGHT = 2; private static final long serialVersionUID = 1L; - private final GridBagLayout layout = new GridBagLayout(); private final GridBagConstraints constraints = new GridBagConstraints(); private final List filters = new ArrayList<>(); + private final JPanel firstColumnPanel = new JPanel(); + private final JPanel secondColumnPanel = new JPanel(); + private int firstColumnY = 0; + private int secondColumnY = 0; + + AbstractFiltersPanel() { + firstColumnPanel.setLayout(new GridBagLayout()); + secondColumnPanel.setLayout(new GridBagLayout()); + } abstract FileSearchData.FileType getFileType(); - final synchronized void addFilter(AbstractDiscoveryFilterPanel filterPanel, boolean isSelected, int[] indicesSelected) { + final synchronized void addFilter(AbstractDiscoveryFilterPanel filterPanel, boolean isSelected, int[] indicesSelected, int column) { if (!isInitialized) { - constraints.fill = GridBagConstraints.VERTICAL; - constraints.gridx = 0; constraints.gridy = 0; - constraints.gridheight = 2; - constraints.gridwidth = LABEL_WIDTH; - constraints.weightx = LABEL_WEIGHT; - constraints.anchor = GridBagConstraints.NORTHWEST; - constraints.insets = new Insets(0, 8, 12, 8); + constraints.anchor = GridBagConstraints.FIRST_LINE_START; + constraints.insets = new Insets(8, 8, 8, 8); isInitialized = true; } + if (column == 0) { + constraints.gridy = firstColumnY; + } else { + constraints.gridy = secondColumnY; + } + constraints.gridx = 0; filterPanel.configurePanel(isSelected, indicesSelected); filterPanel.addListeners(this, this); - constraints.fill = GridBagConstraints.VERTICAL; filters.add(filterPanel); - constraints.weightx = LABEL_WEIGHT; + constraints.fill = GridBagConstraints.VERTICAL; + constraints.gridheight = LABEL_HEIGHT; constraints.gridwidth = LABEL_WIDTH; - addToGridBagLayout(filterPanel.getCheckbox(), null); - nextSpot(LABEL_WIDTH); - constraints.fill = GridBagConstraints.BOTH; - constraints.weightx = PANEL_WEIGHT; - constraints.gridwidth = PANEL_WIDTH; - addToGridBagLayout(filterPanel, null); - nextSpot(PANEL_WIDTH); - updateLayout(); - } - - private void nextSpot(int width) { - constraints.gridx += width; - if (constraints.gridx >= NUMBER_OF_COLUMNS) { - constraints.fill = GridBagConstraints.VERTICAL; - constraints.gridy += constraints.gridheight; - constraints.gridx = 0; + constraints.weightx = LABEL_WEIGHT; + constraints.weighty = LABEL_WEIGHT; + constraints.gridwidth = LABEL_WIDTH; + addToGridBagLayout(filterPanel.getCheckbox(), null, column); + if (filterPanel.hasPanel()) { + System.out.println("filterPanel has panel" + filterPanel.getClass().toString()); + constraints.gridx += constraints.gridwidth; + constraints.fill = GridBagConstraints.BOTH; + constraints.gridheight = PANEL_HEIGHT; + constraints.weightx = PANEL_WEIGHT; + constraints.weighty = PANEL_WEIGHT; + constraints.gridwidth = PANEL_WIDTH; + addToGridBagLayout(filterPanel, null, column); + } else { + System.out.println("filterPanel missing panel" + filterPanel.getClass().toString()); + } + if (column == 0) { + firstColumnY += constraints.gridheight; + } else { + secondColumnY += constraints.gridheight; } } + final void addPanelsToScrollPane(JSplitPane splitPane) { + splitPane.setLeftComponent(firstColumnPanel); + splitPane.setRightComponent(secondColumnPanel); + } final synchronized void clearFilters() { for (AbstractDiscoveryFilterPanel filterPanel : filters) { @@ -80,21 +100,21 @@ abstract class AbstractFiltersPanel extends javax.swing.JPanel implements Action filters.clear(); } - private void addToGridBagLayout(Component componentToAdd, Component additionalComponentToAdd) { + private void addToGridBagLayout(Component componentToAdd, Component additionalComponentToAdd, int columnIndex) { + addToColumn(componentToAdd, constraints, columnIndex); if (additionalComponentToAdd != null) { - constraints.gridheight /= 2; - add(componentToAdd, constraints); constraints.gridy += constraints.gridheight; - add(additionalComponentToAdd, constraints); + addToColumn(additionalComponentToAdd, constraints, columnIndex); constraints.gridy -= constraints.gridheight; - constraints.gridheight *= 2; - } else { - add(componentToAdd, constraints); - } + } } - private void updateLayout() { - setLayout(layout); + private void addToColumn(Component component, Object constraints, int columnNumber) { + if (columnNumber == 0) { + firstColumnPanel.add(component, constraints); + } else { + secondColumnPanel.add(component, constraints); + } } /** diff --git a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties index 91acce8122..3254b0c28c 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties @@ -97,3 +97,4 @@ DiscoveryDialog.sortingPanel.border.title=Grouping DiscoveryDialog.groupByLabel.text=Group By: DiscoveryDialog.orderByLabel.text=Order Within Groups By: DiscoveryDialog.orderGroupsByLabel.text=Order Groups By: +ImageFilterPanel.imageFiltersSplitPane.toolTipText= diff --git a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED index 1361d60a5b..123c679d00 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties-MERGED @@ -137,12 +137,8 @@ FileSearchFiltering.SizeFilter.range=({0} to {1}) FileSearchFiltering.TagsFilter.desc=Files that have been tagged {0} FileSearchFiltering.TagsFilter.or=\ or FileSearchFiltering.UserCreatedFilter.desc=Files that contain EXIF data -FileSearchPanel.dialogTitle.text=Test file search FileSearchPanel.sortingPanel.border.title=Grouping FileSearchPanel.addButton.text=Add -FileSearchPanel.steptwo.documents=Step 2: Filter which documents to show -FileSearchPanel.steptwo.images=Step 2: Filter which images to show -FileSearchPanel.steptwo.videos=Step 2: Filter which videos to show FileSearchPanel.substringRadioButton.text=Substring FileSearchPanel.fullRadioButton.text=Full FileSearchPanel.parentCheckbox.text=Parent Folder: @@ -251,6 +247,7 @@ DiscoveryDialog.sortingPanel.border.title=Grouping DiscoveryDialog.groupByLabel.text=Group By: DiscoveryDialog.orderByLabel.text=Order Within Groups By: DiscoveryDialog.orderGroupsByLabel.text=Order Groups By: +ImageFilterPanel.imageFiltersSplitPane.toolTipText= VideoThumbnailPanel.bytes.text=bytes VideoThumbnailPanel.deleted.text=All instances of file are deleted. VideoThumbnailPanel.gigaBytes.text=GB diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form index a026c51818..913e82682d 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form @@ -163,10 +163,10 @@ - - + + - + @@ -247,21 +247,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java index 796374c3e6..910f06f6d6 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java @@ -259,17 +259,16 @@ final class DiscoveryDialog extends javax.swing.JDialog { .addGroup(sortingPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(sortingPanelLayout.createSequentialGroup() - .addComponent(groupByLabel) - .addGap(88, 88, 88) - .addGroup(sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(groupSortingComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(groupByCombobox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(orderByLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(orderByCombobox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addComponent(orderGroupsByLabel)) + .addComponent(orderGroupsByLabel) + .addComponent(groupByLabel)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(sortingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(groupSortingComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(groupByCombobox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(orderByLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(orderByCombobox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); sortingPanelLayout.setVerticalGroup( @@ -297,10 +296,10 @@ final class DiscoveryDialog extends javax.swing.JDialog { .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(sortingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 810, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 662, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 594, Short.MAX_VALUE) + .addGap(68, 68, 68) .addComponent(cancelButton) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(searchButton))) .addContainerGap()) ); diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form index 5f3eab1a5f..2fd3b2bfc8 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form @@ -13,16 +13,36 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java index fa23484e14..d4834b8c0c 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java @@ -20,20 +20,22 @@ final class DocumentFilterPanel extends AbstractFiltersPanel { * Creates new form DocumentFilterPanel */ DocumentFilterPanel() { + super(); initComponents(); - addFilter(new SizeFilterPanel(FileSearchData.FileType.DOCUMENTS), false, null); - addFilter(new DataSourceFilterPanel(), false, null); + addFilter(new SizeFilterPanel(FileSearchData.FileType.DOCUMENTS), false, null, 0); + addFilter(new DataSourceFilterPanel(), false, null, 0); int[] pastOccurrencesIndices; if (!CentralRepository.isEnabled()) { pastOccurrencesIndices = new int[]{0}; } else { pastOccurrencesIndices = new int[]{1, 2, 3, 4, 5, 6, 7}; } - addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices); - addFilter(new HashSetFilterPanel(), false, null); - addFilter(new InterestingItemsFilterPanel(), false, null); - addFilter(new ObjectDetectedFilterPanel(), false, null); - addFilter(new ParentFolderFilterPanel(), false, null); + addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices, 0); + addFilter(new HashSetFilterPanel(), false, null, 1); + addFilter(new InterestingItemsFilterPanel(), false, null, 1); + addFilter(new ObjectDetectedFilterPanel(), false, null, 1); + addFilter(new ParentFolderFilterPanel(), false, null, 1); + addPanelsToScrollPane(documentsFiltersSplitPane); } /** @@ -45,21 +47,29 @@ final class DocumentFilterPanel extends AbstractFiltersPanel { // //GEN-BEGIN:initComponents private void initComponents() { - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 400, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 300, Short.MAX_VALUE) - ); + documentFiltersScrollPane = new javax.swing.JScrollPane(); + documentFiltersPanel = new javax.swing.JPanel(); + documentsFiltersSplitPane = new javax.swing.JSplitPane(); + + setLayout(new java.awt.BorderLayout()); + + documentFiltersPanel.setLayout(new java.awt.BorderLayout()); + + documentsFiltersSplitPane.setResizeWeight(0.5); + documentFiltersPanel.add(documentsFiltersSplitPane, java.awt.BorderLayout.CENTER); + + documentFiltersScrollPane.setViewportView(documentFiltersPanel); + + add(documentFiltersScrollPane, java.awt.BorderLayout.CENTER); }// //GEN-END:initComponents @Override FileSearchData.FileType getFileType() { return FILE_TYPE; } // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel documentFiltersPanel; + private javax.swing.JScrollPane documentFiltersScrollPane; + private javax.swing.JSplitPane documentsFiltersSplitPane; // End of variables declaration//GEN-END:variables + } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/HashSetFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/HashSetFilterPanel.java index 3ca2505799..e8c97f8a59 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/HashSetFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/HashSetFilterPanel.java @@ -47,7 +47,9 @@ public class HashSetFilterPanel extends AbstractDiscoveryFilterPanel { hashListModel.add(count, name); count++; } + System.out.println("SETUP COMPLETE"); } catch (TskCoreException ex) { + System.out.println("SETUP ERROR"); logger.log(Level.SEVERE, "Error loading hash set names", ex); hashSetCheckbox.setEnabled(false); hashSetList.setEnabled(false); @@ -106,6 +108,7 @@ public class HashSetFilterPanel extends AbstractDiscoveryFilterPanel { @Override void configurePanel(boolean selected, int[] indicesSelected) { + System.out.println("CONFIG PANEL HASHSET"); boolean hasHashSets = hashSetList.getModel().getSize() > 0; hashSetCheckbox.setEnabled(hasHashSets); hashSetCheckbox.setSelected(selected && hasHashSets); @@ -115,9 +118,11 @@ public class HashSetFilterPanel extends AbstractDiscoveryFilterPanel { if (indicesSelected != null) { hashSetList.setSelectedIndices(indicesSelected); } + System.out.println("PANEL ENABLED SETUP"); } else { hashSetScrollPane.setEnabled(false); hashSetList.setEnabled(false); + System.out.println("PAENL DISABLED SETUP"); } } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.form index 3c39b407cb..af67f74cbf 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.form @@ -14,5 +14,39 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java index 25a36887fa..d404af1b66 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java @@ -20,23 +20,25 @@ final class ImageFilterPanel extends AbstractFiltersPanel { * Creates new form ImageFilterPanel */ ImageFilterPanel() { + super(); initComponents(); SizeFilterPanel sizeFilterPanel = new SizeFilterPanel(FILE_TYPE); int[] sizeIndicesSelected = {1, 2, 3, 4, 5}; - addFilter(sizeFilterPanel, true, sizeIndicesSelected); - addFilter(new ObjectDetectedFilterPanel(), false, null); + addFilter(sizeFilterPanel, true, sizeIndicesSelected, 0); + addFilter(new ObjectDetectedFilterPanel(), false, null, 0); int[] pastOccurrencesIndices; if (!CentralRepository.isEnabled()) { pastOccurrencesIndices = new int[]{0}; } else { pastOccurrencesIndices = new int[]{1, 2, 3, 4, 5, 6, 7}; } - addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices); - addFilter(new UserCreatedFilterPanel(), false, null); - addFilter(new HashSetFilterPanel(), false, null); - addFilter(new InterestingItemsFilterPanel(), false, null); - addFilter(new DataSourceFilterPanel(), false, null); - addFilter(new ParentFolderFilterPanel(), false, null); + addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices, 0); + addFilter(new UserCreatedFilterPanel(), false, null, 1); + addFilter(new HashSetFilterPanel(), false, null, 1); + addFilter(new InterestingItemsFilterPanel(), false, null, 1); + addFilter(new DataSourceFilterPanel(), false, null, 1); + addFilter(new ParentFolderFilterPanel(), false, null, 1); + addPanelsToScrollPane(imageFiltersSplitPane); } /** @@ -48,7 +50,21 @@ final class ImageFilterPanel extends AbstractFiltersPanel { // //GEN-BEGIN:initComponents private void initComponents() { - setLayout(new java.awt.GridBagLayout()); + imageFiltersScrollPane = new javax.swing.JScrollPane(); + imageFiltersPanel = new javax.swing.JPanel(); + imageFiltersSplitPane = new javax.swing.JSplitPane(); + + setLayout(new java.awt.BorderLayout()); + + imageFiltersPanel.setLayout(new java.awt.BorderLayout()); + + imageFiltersSplitPane.setResizeWeight(0.5); + imageFiltersSplitPane.setToolTipText(org.openide.util.NbBundle.getMessage(ImageFilterPanel.class, "ImageFilterPanel.imageFiltersSplitPane.toolTipText")); // NOI18N + imageFiltersPanel.add(imageFiltersSplitPane, java.awt.BorderLayout.CENTER); + + imageFiltersScrollPane.setViewportView(imageFiltersPanel); + + add(imageFiltersScrollPane, java.awt.BorderLayout.CENTER); }// //GEN-END:initComponents @Override @@ -57,5 +73,8 @@ final class ImageFilterPanel extends AbstractFiltersPanel { } // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel imageFiltersPanel; + private javax.swing.JScrollPane imageFiltersScrollPane; + private javax.swing.JSplitPane imageFiltersSplitPane; // End of variables declaration//GEN-END:variables } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.form index 549a3a0a17..fba8295349 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.form @@ -33,7 +33,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.java index 721e6ff486..d83e75e964 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/InterestingItemsFilterPanel.java @@ -85,7 +85,7 @@ public class InterestingItemsFilterPanel extends AbstractDiscoveryFilterPanel { this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(interestingItemsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(interestingItemsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.form index 0cae8b6a91..5348e82bbc 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.form @@ -40,7 +40,7 @@ - + @@ -49,17 +49,14 @@ - - - - + - + - - + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.java index 5613e666ae..5631ae2242 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ParentFolderFilterPanel.java @@ -127,7 +127,7 @@ public class ParentFolderFilterPanel extends AbstractDiscoveryFilterPanel { this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createSequentialGroup() .addGap(8, 8, 8) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(includeRadioButton) @@ -135,13 +135,11 @@ public class ParentFolderFilterPanel extends AbstractDiscoveryFilterPanel { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(substringRadioButton) - .addGroup(layout.createSequentialGroup() - .addComponent(excludeRadioButton) - .addGap(0, 0, Short.MAX_VALUE)))) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(excludeRadioButton))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(parentScrollPane, javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() - .addComponent(parentTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(parentTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) diff --git a/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.form index 9d052d67d8..8cd6bc5eed 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.form @@ -33,7 +33,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java index 8014444108..2284ded074 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java @@ -59,7 +59,7 @@ public class PastOccurrencesFilterPanel extends AbstractDiscoveryFilterPanel { this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(crFrequencyScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(crFrequencyScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) diff --git a/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.form index d3a628f715..ab4b81577b 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.form @@ -7,8 +7,7 @@ - - + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.java index 27ca9feb64..957dee4dca 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/SizeFilterPanel.java @@ -43,8 +43,7 @@ final class SizeFilterPanel extends AbstractDiscoveryFilterPanel { sizeList = new javax.swing.JList<>(); org.openide.awt.Mnemonics.setLocalizedText(sizeCheckbox, org.openide.util.NbBundle.getMessage(SizeFilterPanel.class, "SizeFilterPanel.sizeCheckbox.text")); // NOI18N - sizeCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); - sizeCheckbox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); + sizeCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); sizeCheckbox.setMaximumSize(new java.awt.Dimension(103, 25)); sizeCheckbox.setMinimumSize(new java.awt.Dimension(103, 25)); sizeCheckbox.setPreferredSize(new java.awt.Dimension(103, 25)); diff --git a/Core/src/org/sleuthkit/autopsy/discovery/UserCreatedFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/UserCreatedFilterPanel.java index bf4ffde7be..1bfe1fea6e 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/UserCreatedFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/UserCreatedFilterPanel.java @@ -88,4 +88,9 @@ public class UserCreatedFilterPanel extends AbstractDiscoveryFilterPanel { } return null; } + + @Override + boolean hasPanel() { + return false; + } } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.form index 5f3eab1a5f..e7f145d8db 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.form @@ -11,18 +11,39 @@ + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java index 79df6ec5a4..1c839e445a 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java @@ -20,21 +20,23 @@ final class VideoFilterPanel extends AbstractFiltersPanel { * Creates new form VideoFilterPanel */ VideoFilterPanel() { + super(); initComponents(); - addFilter(new SizeFilterPanel(FileSearchData.FileType.VIDEO), true, null); - addFilter(new DataSourceFilterPanel(), false, null); + addFilter(new SizeFilterPanel(FileSearchData.FileType.VIDEO), true, null, 0); + addFilter(new DataSourceFilterPanel(), false, null, 0); int[] pastOccurrencesIndices; if (!CentralRepository.isEnabled()) { pastOccurrencesIndices = new int[]{0}; } else { pastOccurrencesIndices = new int[]{1, 2, 3, 4, 5, 6, 7}; } - addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices); - addFilter(new UserCreatedFilterPanel(), false, null); - addFilter(new HashSetFilterPanel(), false, null); - addFilter(new InterestingItemsFilterPanel(), false, null); - addFilter(new ObjectDetectedFilterPanel(), false, null); - addFilter(new ParentFolderFilterPanel(), false, null); + addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices, 0); + addFilter(new UserCreatedFilterPanel(), false, null, 0); + addFilter(new HashSetFilterPanel(), false, null, 0); + addFilter(new InterestingItemsFilterPanel(), false, null, 0); + addFilter(new ObjectDetectedFilterPanel(), false, null, 0); + addFilter(new ParentFolderFilterPanel(), false, null, 0); + addPanelsToScrollPane(videoFiltersSplitPane); } /** @@ -46,16 +48,20 @@ final class VideoFilterPanel extends AbstractFiltersPanel { // //GEN-BEGIN:initComponents private void initComponents() { - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 400, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 300, Short.MAX_VALUE) - ); + videoFiltersScrollPane = new javax.swing.JScrollPane(); + videoFiltersPanel = new javax.swing.JPanel(); + videoFiltersSplitPane = new javax.swing.JSplitPane(); + + setLayout(new java.awt.BorderLayout()); + + videoFiltersPanel.setLayout(new java.awt.BorderLayout()); + + videoFiltersSplitPane.setResizeWeight(0.5); + videoFiltersPanel.add(videoFiltersSplitPane, java.awt.BorderLayout.CENTER); + + videoFiltersScrollPane.setViewportView(videoFiltersPanel); + + add(videoFiltersScrollPane, java.awt.BorderLayout.CENTER); }// //GEN-END:initComponents @Override FileSearchData.FileType getFileType() { @@ -63,5 +69,9 @@ final class VideoFilterPanel extends AbstractFiltersPanel { } // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel videoFiltersPanel; + private javax.swing.JScrollPane videoFiltersScrollPane; + private javax.swing.JSplitPane videoFiltersSplitPane; // End of variables declaration//GEN-END:variables + }