diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form index 47481f8bddf10456ed842884faeb92dbde842cd6..0d49bf2241a53d52337b6bac5bcf568b88d14b7b 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form @@ -312,67 +312,7 @@ </Property> </Properties> - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="106" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="lbPointOfContactPhoneLabel" linkSize="4" alignment="0" max="32767" attributes="0"/> - <Component id="lbPointOfContactEmailLabel" linkSize="4" alignment="0" max="32767" attributes="0"/> - <Component id="lbPointOfContactNameLabel" linkSize="4" min="-2" pref="109" max="-2" attributes="0"/> - </Group> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="lbPointOfContactPhoneText" alignment="1" max="32767" attributes="0"/> - <Component id="lbPointOfContactNameText" max="32767" attributes="0"/> - <Component id="lbPointOfContactEmailText" max="32767" attributes="0"/> - </Group> - </Group> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="lbOrganizationNameLabel" pref="206" max="32767" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="comboBoxOrgName" min="-2" pref="108" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="bnNewOrganization" min="-2" pref="147" max="-2" attributes="0"/> - </Group> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="lbOrganizationNameLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="comboBoxOrgName" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="bnNewOrganization" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="lbPointOfContactNameText" max="32767" attributes="0"/> - <Component id="lbPointOfContactNameLabel" max="32767" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="lbPointOfContactPhoneLabel" alignment="0" max="32767" attributes="0"/> - <Component id="lbPointOfContactPhoneText" alignment="0" min="-2" pref="14" max="-2" attributes="0"/> - </Group> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="lbPointOfContactEmailLabel" alignment="0" max="32767" attributes="0"/> - <Component id="lbPointOfContactEmailText" alignment="0" min="-2" pref="14" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JLabel" name="lbPointOfContactPhoneLabel"> <Properties> @@ -380,15 +320,20 @@ <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[82, 14]"/> + <Dimension value="[182, 14]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[82, 14]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[82, 14]"/> + <Dimension value="[120, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="2" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JComboBox" name="comboBoxOrgName"> <Properties> @@ -402,6 +347,11 @@ <AuxValues> <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="18" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbPointOfContactNameLabel"> <Properties> @@ -409,15 +359,20 @@ <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[82, 14]"/> + <Dimension value="[182, 14]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[82, 14]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[82, 14]"/> + <Dimension value="[120, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="1" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="13" insetsLeft="12" insetsBottom="0" insetsRight="5" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="bnNewOrganization"> <Properties> @@ -428,22 +383,37 @@ <Insets value="[2, 6, 2, 6]"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[123, 23]"/> + <Dimension value="[160, 23]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[123, 23]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[123, 23]"/> + <Dimension value="[140, 23]"/> </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnNewOrganizationActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="12" insetsBottom="0" insetsRight="18" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbPointOfContactEmailText"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="3" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="4" insetsBottom="13" insetsRight="18" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbPointOfContactNameText"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="1" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="13" insetsLeft="4" insetsBottom="0" insetsRight="18" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbOrganizationNameLabel"> <Properties> @@ -451,15 +421,20 @@ <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="OptionalCasePropertiesPanel.lbOrganizationNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[189, 14]"/> + <Dimension value="[300, 14]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[189, 14]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[189, 14]"/> + <Dimension value="[220, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbPointOfContactEmailLabel"> <Properties> @@ -467,17 +442,27 @@ <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[82, 14]"/> + <Dimension value="[182, 14]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[82, 14]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[82, 14]"/> + <Dimension value="[120, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="3" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="12" insetsBottom="13" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbPointOfContactPhoneText"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="2" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="4" insetsBottom="0" insetsRight="18" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> </SubComponents> </Container> diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index 9b753900b18a3b03c32cd9d0f05e00e9024ad93c..45a0b49242438fbfa495d8a2a24d2b9d770a7ce4 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -229,6 +229,7 @@ void setCaseNotesField(String caseNotes) { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; casePanel = new javax.swing.JPanel(); caseNumberLabel = new javax.swing.JLabel(); @@ -380,95 +381,114 @@ private void initComponents() { ); orgainizationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.orgainizationPanel.border.title"))); // NOI18N + orgainizationPanel.setLayout(new java.awt.GridBagLayout()); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text")); // NOI18N - lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(182, 14)); lbPointOfContactPhoneLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(120, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 12, 0, 0); + orgainizationPanel.add(lbPointOfContactPhoneLabel, gridBagConstraints); comboBoxOrgName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { comboBoxOrgNameActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 18, 0, 0); + orgainizationPanel.add(comboBoxOrgName, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text")); // NOI18N - lbPointOfContactNameLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactNameLabel.setMaximumSize(new java.awt.Dimension(182, 14)); lbPointOfContactNameLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactNameLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + lbPointOfContactNameLabel.setPreferredSize(new java.awt.Dimension(120, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 5); + orgainizationPanel.add(lbPointOfContactNameLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(bnNewOrganization, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.bnNewOrganization.text")); // NOI18N bnNewOrganization.setMargin(new java.awt.Insets(2, 6, 2, 6)); - bnNewOrganization.setMaximumSize(new java.awt.Dimension(123, 23)); + bnNewOrganization.setMaximumSize(new java.awt.Dimension(160, 23)); bnNewOrganization.setMinimumSize(new java.awt.Dimension(123, 23)); - bnNewOrganization.setPreferredSize(new java.awt.Dimension(123, 23)); + bnNewOrganization.setPreferredSize(new java.awt.Dimension(140, 23)); bnNewOrganization.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnNewOrganizationActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 12, 0, 18); + orgainizationPanel.add(bnNewOrganization, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 4, 13, 18); + orgainizationPanel.add(lbPointOfContactEmailText, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 4, 0, 18); + orgainizationPanel.add(lbPointOfContactNameText, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbOrganizationNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text")); // NOI18N - lbOrganizationNameLabel.setMaximumSize(new java.awt.Dimension(189, 14)); + lbOrganizationNameLabel.setMaximumSize(new java.awt.Dimension(300, 14)); lbOrganizationNameLabel.setMinimumSize(new java.awt.Dimension(189, 14)); - lbOrganizationNameLabel.setPreferredSize(new java.awt.Dimension(189, 14)); + lbOrganizationNameLabel.setPreferredSize(new java.awt.Dimension(220, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0); + orgainizationPanel.add(lbOrganizationNameLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text")); // NOI18N - lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(182, 14)); lbPointOfContactEmailLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactEmailLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - - javax.swing.GroupLayout orgainizationPanelLayout = new javax.swing.GroupLayout(orgainizationPanel); - orgainizationPanel.setLayout(orgainizationPanelLayout); - orgainizationPanelLayout.setHorizontalGroup( - orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addGap(106, 106, 106) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE) - .addGap(18, 18, 18) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap()) - ); - - orgainizationPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lbPointOfContactEmailLabel, lbPointOfContactNameLabel, lbPointOfContactPhoneLabel}); - - orgainizationPanelLayout.setVerticalGroup( - orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(6, 6, 6)) - ); + lbPointOfContactEmailLabel.setPreferredSize(new java.awt.Dimension(120, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 12, 13, 0); + orgainizationPanel.add(lbPointOfContactEmailLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 4, 0, 18); + orgainizationPanel.add(lbPointOfContactPhoneText, gridBagConstraints); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form index fd1b0b81b11181cc1817a0226085eda3f6ac91ad..f8ceec50e7f153cdcb34267442d8e14a6aa18d8b 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form @@ -67,7 +67,7 @@ <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <Component id="tableContainerPanel" pref="64" max="32767" attributes="0"/> + <Component id="tableContainerPanel" pref="78" max="32767" attributes="0"/> <EmptySpace min="0" pref="0" max="-2" attributes="0"/> </Group> </Group> @@ -87,16 +87,10 @@ <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="earliestCaseLabel" min="-2" pref="161" max="-2" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="earliestCaseDate" max="32767" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> - <Component id="foundInLabel" max="32767" attributes="0"/> - </Group> - <Component id="tablesViewerSplitPane" pref="990" max="32767" attributes="0"/> + <Component id="tablesViewerSplitPane" max="32767" attributes="0"/> + <Component id="jPanel1" alignment="1" max="32767" attributes="0"/> </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -104,45 +98,15 @@ <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> - <Component id="tablesViewerSplitPane" pref="33" max="32767" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="1" attributes="0"> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="earliestCaseLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="earliestCaseDate" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <Component id="foundInLabel" min="-2" pref="14" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="tablesViewerSplitPane" pref="37" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="12" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> </Layout> <SubComponents> - <Component class="javax.swing.JLabel" name="earliestCaseLabel"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.earliestCaseLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.earliestCaseLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="earliestCaseDate"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.earliestCaseDate.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="foundInLabel"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.foundInLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - </Component> <Container class="javax.swing.JSplitPane" name="tablesViewerSplitPane"> <Properties> <Property name="dividerLocation" type="int" value="450"/> @@ -292,6 +256,81 @@ </Container> </SubComponents> </Container> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[576, 22]"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> + <SubComponents> + <Component class="javax.swing.JLabel" name="foundInLabel"> + <Properties> + <Property name="horizontalAlignment" type="int" value="11"/> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.foundInLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[400, 16]"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="2" insetsLeft="2" insetsBottom="0" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="earliestCaseDate"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.earliestCaseDate.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 16]"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="7" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="earliestCaseLabel"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.earliestCaseLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/contentviewer/Bundle.properties" key="DataContentViewerOtherCases.earliestCaseLabel.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[260, 16]"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.Box$Filler" name="filler1"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> + </Container> </SubComponents> </Container> </SubComponents> diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java index 1429a60312748dedf337c8ca40c41a2372553ee2..56922c7bfb6de059037f60bcc00d14963717b349 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java @@ -958,6 +958,7 @@ private String getCaseCreatedDate(int caseTableRowIdx) { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; rightClickPopupMenu = new javax.swing.JPopupMenu(); exportToCSVMenuItem = new javax.swing.JMenuItem(); @@ -965,9 +966,6 @@ private void initComponents() { showCommonalityMenuItem = new javax.swing.JMenuItem(); CSVFileChooser = new javax.swing.JFileChooser(); tableContainerPanel = new javax.swing.JPanel(); - earliestCaseLabel = new javax.swing.JLabel(); - earliestCaseDate = new javax.swing.JLabel(); - foundInLabel = new javax.swing.JLabel(); tablesViewerSplitPane = new javax.swing.JSplitPane(); caseDatasourceFileSplitPane = new javax.swing.JSplitPane(); caseDatasourceSplitPane = new javax.swing.JSplitPane(); @@ -978,6 +976,11 @@ private void initComponents() { filesTableScrollPane = new javax.swing.JScrollPane(); filesTable = new javax.swing.JTable(); detailsPanelScrollPane = new javax.swing.JScrollPane(); + jPanel1 = new javax.swing.JPanel(); + foundInLabel = new javax.swing.JLabel(); + earliestCaseDate = new javax.swing.JLabel(); + earliestCaseLabel = new javax.swing.JLabel(); + filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); rightClickPopupMenu.addPopupMenuListener(new javax.swing.event.PopupMenuListener() { public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) { @@ -1005,13 +1008,6 @@ public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) { tableContainerPanel.setPreferredSize(new java.awt.Dimension(600, 63)); tableContainerPanel.setRequestFocusEnabled(false); - org.openide.awt.Mnemonics.setLocalizedText(earliestCaseLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseLabel.text")); // NOI18N - earliestCaseLabel.setToolTipText(org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseLabel.toolTipText")); // NOI18N - - org.openide.awt.Mnemonics.setLocalizedText(earliestCaseDate, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseDate.text")); // NOI18N - - org.openide.awt.Mnemonics.setLocalizedText(foundInLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.foundInLabel.text")); // NOI18N - tablesViewerSplitPane.setDividerLocation(450); tablesViewerSplitPane.setResizeWeight(0.75); @@ -1057,33 +1053,64 @@ public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) { detailsPanelScrollPane.setPreferredSize(new java.awt.Dimension(300, 100)); tablesViewerSplitPane.setRightComponent(detailsPanelScrollPane); + jPanel1.setPreferredSize(new java.awt.Dimension(576, 22)); + jPanel1.setLayout(new java.awt.GridBagLayout()); + + foundInLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); + org.openide.awt.Mnemonics.setLocalizedText(foundInLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.foundInLabel.text")); // NOI18N + foundInLabel.setPreferredSize(new java.awt.Dimension(400, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 0); + jPanel1.add(foundInLabel, gridBagConstraints); + + org.openide.awt.Mnemonics.setLocalizedText(earliestCaseDate, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseDate.text")); // NOI18N + earliestCaseDate.setMaximumSize(new java.awt.Dimension(200, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 7, 0, 0); + jPanel1.add(earliestCaseDate, gridBagConstraints); + + org.openide.awt.Mnemonics.setLocalizedText(earliestCaseLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseLabel.text")); // NOI18N + earliestCaseLabel.setToolTipText(org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseLabel.toolTipText")); // NOI18N + earliestCaseLabel.setMaximumSize(new java.awt.Dimension(260, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + jPanel1.add(earliestCaseLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.1; + jPanel1.add(filler1, gridBagConstraints); + javax.swing.GroupLayout tableContainerPanelLayout = new javax.swing.GroupLayout(tableContainerPanel); tableContainerPanel.setLayout(tableContainerPanelLayout); tableContainerPanelLayout.setHorizontalGroup( tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(tableContainerPanelLayout.createSequentialGroup() .addGroup(tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(tableContainerPanelLayout.createSequentialGroup() - .addComponent(earliestCaseLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(earliestCaseDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(foundInLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 990, Short.MAX_VALUE)) + .addComponent(tablesViewerSplitPane) + .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); tableContainerPanelLayout.setVerticalGroup( tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(tableContainerPanelLayout.createSequentialGroup() .addGap(0, 0, 0) - .addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE) + .addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(earliestCaseLabel) - .addComponent(earliestCaseDate)) - .addComponent(foundInLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(12, 12, 12)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); @@ -1095,7 +1122,7 @@ public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) { layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE) + .addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE) .addGap(0, 0, 0)) ); }// </editor-fold>//GEN-END:initComponents @@ -1128,7 +1155,9 @@ private void rightClickPopupMenuPopupMenuWillBecomeVisible(javax.swing.event.Pop private javax.swing.JMenuItem exportToCSVMenuItem; private javax.swing.JTable filesTable; private javax.swing.JScrollPane filesTableScrollPane; + private javax.swing.Box.Filler filler1; private javax.swing.JLabel foundInLabel; + private javax.swing.JPanel jPanel1; private javax.swing.JPopupMenu rightClickPopupMenu; private javax.swing.JMenuItem showCaseDetailsMenuItem; private javax.swing.JMenuItem showCommonalityMenuItem; diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java index 3fab7af47f84f0081e4e9ceb1d6a3b9cf6de9baa..b0f288673bf3cb81f4913b808e8f5fca1c12b6bf 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java @@ -30,7 +30,8 @@ import org.sleuthkit.autopsy.coreutils.ModuleSettings; /** - * This class contains business logic for saving and validating settings for central repository. + * This class contains business logic for saving and validating settings for + * central repository. */ public class CentralRepoDbManager { @@ -42,35 +43,40 @@ public class CentralRepoDbManager { private static final String DISABLED_DUE_TO_FAILURE_KEY = "disabledDueToFailure"; private static volatile CentralRepoDbChoice savedChoice = null; - + private static final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(CentralRepoDbManager.class); - + private static final Object dbChoiceLock = new Object(); private static final Object disabledDueToFailureLock = new Object(); - - - + /** - * This saves the currently selected database choice and clears any disabledDueToFailure flag. - * @param choice The choice to save. - * @return The newly saved choice. + * This saves the currently selected database choice and clears any + * disabledDueToFailure flag. + * + * @param choice The choice to save. + * + * @return The newly saved choice. */ public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice) { return saveDbChoice(choice, true); } - + /** * This saves the currently selected database choice. - * @param choice The choice to save. - * @param clearDisabledDueToError Whether or not to clear the 'disabledDueToFailure' settings key. - * @return The newly saved choice. + * + * @param choice The choice to save. + * @param clearDisabledDueToError Whether or not to clear the + * 'disabledDueToFailure' settings key. + * + * @return The newly saved choice. */ public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice, boolean clearDisabledDueToError) { - synchronized(dbChoiceLock) { + synchronized (dbChoiceLock) { // clear disabling due to a failure - if (clearDisabledDueToError) + if (clearDisabledDueToError) { setDisabledDueToFailure(false); - + } + // change the settings CentralRepoDbChoice newChoice = (choice == null) ? CentralRepoDbChoice.DISABLED : choice; CentralRepoDbChoice oldChoice = savedChoice; @@ -81,55 +87,61 @@ public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice, boole } } - + /** - * This method indicates whether or not 'PostgreSQL using multi-user settings' is a valid option. - * @return True if 'PostgreSQL using multi-user settings' is valid. + * This method indicates whether or not 'PostgreSQL using multi-user + * settings' is a valid option. + * + * @return True if 'PostgreSQL using multi-user settings' is valid. */ public static boolean isPostgresMultiuserAllowed() { // if multi user mode is not enabled, then this cannot be used - if (!UserPreferences.getIsMultiUserModeEnabled()) + if (!UserPreferences.getIsMultiUserModeEnabled()) { return false; - + } // also validate the connection as well - PostgresCentralRepoSettings multiUserSettings = - new PostgresCentralRepoSettings(PostgresSettingsLoader.MULTIUSER_SETTINGS_LOADER); - + PostgresCentralRepoSettings multiUserSettings + = new PostgresCentralRepoSettings(PostgresSettingsLoader.MULTIUSER_SETTINGS_LOADER); + return multiUserSettings.testStatus() == DatabaseTestResult.TESTED_OK; } - /** - * This method loads the selectedPlatform boolean from the config file if it is set. + * This method loads the selectedPlatform boolean from the config file if it + * is set. */ public static CentralRepoDbChoice getSavedDbChoice() { - synchronized(dbChoiceLock) { + synchronized (dbChoiceLock) { if (savedChoice == null) { String selectedPlatformString = ModuleSettings.getConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DB_SELECTED_PLATFORM_KEY); // NON-NLS savedChoice = fromKey(selectedPlatformString); } - return savedChoice; + return savedChoice; } } - + /** - * This method disables the central repository and indicates through a flag that this was due to a failure during database setup. - * This is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. + * This method disables the central repository and indicates through a flag + * that this was due to a failure during database setup. This is used when + * re-enabling multi-user as a flag to determine whether or not CR should be + * re-enabled. */ public static void disableDueToFailure() { CentralRepoDbUtil.setUseCentralRepo(false); setDisabledDueToFailure(true); } - + /** - * This method sets whether or not the repository has been disabled due to a database setup issue; - * This is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. - * - * @param disabledDueToFailure Whether or not the repository has been disabled due to a database setup issue. + * This method sets whether or not the repository has been disabled due to a + * database setup issue; This is used when re-enabling multi-user as a flag + * to determine whether or not CR should be re-enabled. + * + * @param disabledDueToFailure Whether or not the repository has been + * disabled due to a database setup issue. */ private static void setDisabledDueToFailure(boolean disabledDueToFailure) { - synchronized(disabledDueToFailureLock) { + synchronized (disabledDueToFailureLock) { boolean oldValue = isDisabledDueToFailure(); ModuleSettings.setConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DISABLED_DUE_TO_FAILURE_KEY, Boolean.toString(disabledDueToFailure)); propertyChangeSupport.firePropertyChange("disabledDueToFailure", oldValue, disabledDueToFailure); @@ -137,36 +149,38 @@ private static void setDisabledDueToFailure(boolean disabledDueToFailure) { } /** - * This method retrieves setting whether or not the repository has been disabled due to a database setup issue; - * this is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. - * - * @return Whether or not the repository has been disabled due to a database setup issue. + * This method retrieves setting whether or not the repository has been + * disabled due to a database setup issue; this is used when re-enabling + * multi-user as a flag to determine whether or not CR should be re-enabled. + * + * @return Whether or not the repository has been disabled due to a database + * setup issue. */ public static boolean isDisabledDueToFailure() { - synchronized(disabledDueToFailureLock) { + synchronized (disabledDueToFailureLock) { return Boolean.toString(true).equals(ModuleSettings.getConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DISABLED_DUE_TO_FAILURE_KEY)); } } /** - * This method adds a property change listener. - * NOTE: currently only listening for changes in currently saved db choice and disabling due to failure. - * - * @param listener The listener for the event. + * This method adds a property change listener. NOTE: currently only + * listening for changes in currently saved db choice and disabling due to + * failure. + * + * @param listener The listener for the event. */ public static void addPropertyChangeListener(PropertyChangeListener listener) { - propertyChangeSupport.addPropertyChangeListener(listener); - } + propertyChangeSupport.addPropertyChangeListener(listener); + } /** * This method removes a propert change listener. - * @param listener The listener to remove. + * + * @param listener The listener to remove. */ - public static void removePropertyChangeListener(PropertyChangeListener listener) { - propertyChangeSupport.removePropertyChangeListener(listener); - } - - + public static void removePropertyChangeListener(PropertyChangeListener listener) { + propertyChangeSupport.removePropertyChangeListener(listener); + } private static CentralRepoDbChoice fromKey(String keyName) { for (CentralRepoDbChoice dbChoice : CentralRepoDbChoice.values()) { @@ -178,12 +192,11 @@ private static CentralRepoDbChoice fromKey(String keyName) { return CentralRepoDbChoice.DISABLED; } - - /** * This method obtains the database connectivity for central repository. * * @return The CentralRepository object that will be used for connection. + * * @throws CentralRepoException */ private static CentralRepository obtainCentralRepository() throws CentralRepoException { @@ -203,8 +216,10 @@ private static CentralRepository obtainCentralRepository() throws CentralRepoExc /** * This method obtains a central repository lock. * - * @param db The database connection. - * @return The lock if acquired. + * @param db The database connection. + * + * @return The lock if acquired. + * * @throws CentralRepoException */ private static CoordinationService.Lock obtainCentralRepoLock(CentralRepository db) throws CentralRepoException { @@ -227,8 +242,9 @@ private static CoordinationService.Lock obtainCentralRepoLock(CentralRepository /** * This method updates the central repository schema if necessary. * - * @param db The database connectivity object. - * @param lock The acquired lock. + * @param db The database connectivity object. + * @param lock The acquired lock. + * * @throws CentralRepoException */ private static void updatedDbSchema(CentralRepository db, CoordinationService.Lock lock) throws CentralRepoException { @@ -257,9 +273,9 @@ private static void updatedDbSchema(CentralRepository db, CoordinationService.Lo } /** - * This method upgrades the current Central Reposity schema to the newest version. If the - * upgrade fails, the Central Repository will be disabled and the current - * settings will be cleared. + * This method upgrades the current Central Reposity schema to the newest + * version. If the upgrade fails, the Central Repository will be disabled + * and the current settings will be cleared. */ @NbBundle.Messages(value = {"EamDbUtil.centralRepoDisabled.message= The Central Repository has been disabled.", "EamDbUtil.centralRepoUpgradeFailed.message=Failed to upgrade Central Repository.", "EamDbUtil.centralRepoConnectionFailed.message=Unable to connect to Central Repository.", "EamDbUtil.exclusiveLockAquisitionFailure.message=Unable to acquire exclusive lock for Central Repository."}) public static void upgradeDatabase() throws CentralRepoException { @@ -296,8 +312,6 @@ private static void onUpgradeError(String message, String desc, Exception innerE } } - - private DatabaseTestResult testingStatus; private CentralRepoDbChoice selectedDbChoice; @@ -314,10 +328,10 @@ public CentralRepoDbManager() { dbSettingsSqlite = new SqliteCentralRepoSettings(); } - /** * This method retrieves the current multi-user database settings. - * @return The current multi-user database settings. + * + * @return The current multi-user database settings. */ public PostgresCentralRepoSettings getDbSettingsMultiUser() { return dbSettingsMultiUser; @@ -325,15 +339,18 @@ public PostgresCentralRepoSettings getDbSettingsMultiUser() { /** * This method retrieves the current custom postgres database settings. - * @return The current custom postgres database settings. + * + * @return The current custom postgres database settings. */ public PostgresCentralRepoSettings getDbSettingsPostgres() { return dbSettingsPostgres; } /** - * This method returns the current SQLite database settings for central repository. - * @return The current SQLite database settings + * This method returns the current SQLite database settings for central + * repository. + * + * @return The current SQLite database settings */ public SqliteCentralRepoSettings getDbSettingsSqlite() { return dbSettingsSqlite; @@ -341,7 +358,8 @@ public SqliteCentralRepoSettings getDbSettingsSqlite() { /** * This method sets up the sqlite database with default settings. - * @throws CentralRepoException if unable to successfully set up database. + * + * @throws CentralRepoException if unable to successfully set up database. */ public void setupDefaultSqliteDb() throws CentralRepoException { // change in-memory settings to default sqlite @@ -354,67 +372,78 @@ public void setupDefaultSqliteDb() throws CentralRepoException { createDb(); curStatus = testStatus(); } - + // the only successful setup status is tested ok if (curStatus != DatabaseTestResult.TESTED_OK) { throw new CentralRepoException("Unable to successfully create sqlite database"); } - + // if successfully got here, then save the settings CentralRepoDbUtil.setUseCentralRepo(true); saveNewCentralRepo(); } /** - * This method returns if changes to the central repository configuration were - * successfully applied. + * This method returns if changes to the central repository configuration + * were successfully applied. * - * @return Returns true if the database configuration was successfully changed false - * if it was not. + * @return Returns true if the database configuration was successfully + * changed false if it was not. */ public boolean wasConfigurationChanged() { return configurationChanged; } private CentralRepoDbConnectivityManager getSelectedSettings() throws CentralRepoException { - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { return dbSettingsMultiUser; - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) + } + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) { return dbSettingsPostgres; - if (selectedDbChoice == CentralRepoDbChoice.SQLITE) + } + if (selectedDbChoice == CentralRepoDbChoice.SQLITE) { return dbSettingsSqlite; - if (selectedDbChoice == CentralRepoDbChoice.DISABLED) + } + if (selectedDbChoice == CentralRepoDbChoice.DISABLED) { return null; - - throw new CentralRepoException("Unknown database type: " + selectedDbChoice); + } + + throw new CentralRepoException("Unknown database type: " + selectedDbChoice); } private RdbmsCentralRepoFactory getDbFactory() throws CentralRepoException { - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { return new RdbmsCentralRepoFactory(CentralRepoPlatforms.POSTGRESQL, dbSettingsMultiUser); - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) + } + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) { return new RdbmsCentralRepoFactory(CentralRepoPlatforms.POSTGRESQL, dbSettingsPostgres); - if (selectedDbChoice == CentralRepoDbChoice.SQLITE) + } + if (selectedDbChoice == CentralRepoDbChoice.SQLITE) { return new RdbmsCentralRepoFactory(CentralRepoPlatforms.SQLITE, dbSettingsSqlite); - if (selectedDbChoice == CentralRepoDbChoice.DISABLED) + } + if (selectedDbChoice == CentralRepoDbChoice.DISABLED) { return null; - + } + throw new CentralRepoException("Unknown database type: " + selectedDbChoice); } /** * This method creates a central repo database if it does not already exist. - * @return True if successful; false if unsuccessful. + * + * @return True if successful; false if unsuccessful. + * * @throws CentralRepoException */ public boolean createDb() throws CentralRepoException { CentralRepoDbConnectivityManager selectedDbSettings = getSelectedSettings(); - if (selectedDbSettings == null) + if (selectedDbSettings == null) { throw new CentralRepoException("Unable to derive connectivity manager from settings: " + selectedDbChoice); + } boolean result = false; boolean dbCreated = true; - + if (!selectedDbSettings.verifyDatabaseExists()) { dbCreated = selectedDbSettings.createDatabase(); } @@ -493,18 +522,20 @@ public void saveNewCentralRepo() throws CentralRepoException { } /** - * This method retrieves the current status. - * Note: this could be a dirty value if testing of the connection has not been performed. - * @return The current status of the database connection. + * This method retrieves the current status. Note: this could be a dirty + * value if testing of the connection has not been performed. + * + * @return The current status of the database connection. */ public DatabaseTestResult getStatus() { return testingStatus; } /** - * This method retrieves the currently selected database choice. - * NOTE: This choice may not align with the saved setting. - * @return The currently selected database choice. + * This method retrieves the currently selected database choice. NOTE: This + * choice may not align with the saved setting. + * + * @return The currently selected database choice. */ public CentralRepoDbChoice getSelectedDbChoice() { return selectedDbChoice; @@ -518,8 +549,10 @@ public void clearStatus() { } /** - * This method sets the currently selected database choice and sets the testing status to untested. - * @param newSelected The new database choice. + * This method sets the currently selected database choice and sets the + * testing status to untested. + * + * @param newSelected The new database choice. */ public void setSelctedDbChoice(CentralRepoDbChoice newSelected) { selectedDbChoice = newSelected; @@ -527,8 +560,8 @@ public void setSelctedDbChoice(CentralRepoDbChoice newSelected) { } /** - * This method tests whether or not the settings have been filled in for the UI. - * NOTE: This does not check the connectivity status of these settings. + * This method tests whether or not the settings have been filled in for the + * UI. NOTE: This does not check the connectivity status of these settings. * * @return True if database settings are valid. */ @@ -541,13 +574,11 @@ public boolean testDatabaseSettingsAreValid( dbSettingsPostgres.setDbName(CENTRAL_REPO_DB_NAME); dbSettingsPostgres.setUserName(tbDbUsername); dbSettingsPostgres.setPassword(jpDbPassword); - } - else if (selectedDbChoice == CentralRepoDbChoice.SQLITE) { + } else if (selectedDbChoice == CentralRepoDbChoice.SQLITE) { File databasePath = new File(tfDatabasePath); dbSettingsSqlite.setDbName(SqliteCentralRepoSettings.DEFAULT_DBNAME); dbSettingsSqlite.setDbDirectory(databasePath.getPath()); - } - else if (selectedDbChoice != CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { + } else if (selectedDbChoice != CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { throw new IllegalStateException("Central Repo has an unknown selected platform: " + selectedDbChoice); } @@ -555,19 +586,21 @@ else if (selectedDbChoice != CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { } /** - * This method tests the current database settings to see if a valid connection can be made. - * @return The result of testing the connection. + * This method tests the current database settings to see if a valid + * connection can be made. + * + * @return The result of testing the connection. */ public DatabaseTestResult testStatus() { try { CentralRepoDbConnectivityManager manager = getSelectedSettings(); - if (manager != null) + if (manager != null) { testingStatus = manager.testStatus(); - } - catch (CentralRepoException e) { + } + } catch (CentralRepoException e) { logger.log(Level.WARNING, "unable to test status of db connection in central repo", e); } - + return testingStatus; } } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form index 812a3984e847f6ffe117ec33a998b1187808ac2c..d8460c48c7f340fe23e953051fa8a850a0757fac 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form @@ -31,8 +31,14 @@ <Group type="102" attributes="0"> <EmptySpace min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="pnButtons" max="32767" attributes="0"/> - <Component id="pnSQLiteSettings" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="pnButtons" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="bnOk" linkSize="2" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="11" max="-2" attributes="0"/> + <Component id="bnCancel" linkSize="2" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="pnSQLiteSettings" alignment="0" pref="648" max="32767" attributes="0"/> </Group> <EmptySpace min="-2" max="-2" attributes="0"/> </Group> @@ -44,7 +50,13 @@ <EmptySpace min="-2" max="-2" attributes="0"/> <Component id="pnSQLiteSettings" max="32767" attributes="0"/> <EmptySpace max="32767" attributes="0"/> - <Component id="pnButtons" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pnButtons" alignment="1" min="-2" max="-2" attributes="0"/> + <Group type="103" alignment="1" groupAlignment="3" attributes="0"> + <Component id="bnOk" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="bnCancel" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> <EmptySpace min="-2" max="-2" attributes="0"/> </Group> </Group> @@ -56,59 +68,15 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="32767" attributes="0"/> - <Component id="bnOk" linkSize="2" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="11" max="-2" attributes="0"/> - <Component id="bnCancel" linkSize="2" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="0" pref="0" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="bnOk" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="bnCancel" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="0" pref="0" max="-2" attributes="0"/> - </Group> + <EmptySpace min="0" pref="25" max="32767" attributes="0"/> </Group> </DimensionLayout> </Layout> - <SubComponents> - <Component class="javax.swing.JButton" name="bnCancel"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnCancel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[79, 23]"/> - </Property> - <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[79, 23]"/> - </Property> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[79, 23]"/> - </Property> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnCancelActionPerformed"/> - </Events> - </Component> - <Component class="javax.swing.JButton" name="bnOk"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnOk.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnOkActionPerformed"/> - </Events> - </Component> - </SubComponents> </Container> <Container class="javax.swing.JPanel" name="pnSQLiteSettings"> <Properties> @@ -119,227 +87,145 @@ </Property> </Properties> - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="lbHostName" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="lbDatabaseType" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="lbDatabasePath" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="lbUserName" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="lbPort" alignment="0" min="-2" max="-2" attributes="0"/> - <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> - <Component id="lbDatabaseDesc" alignment="0" pref="94" max="32767" attributes="0"/> - <Component id="lbUserPassword" alignment="0" max="32767" attributes="0"/> - </Group> - </Group> - <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Component id="tfDatabasePath" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="bnDatabasePathFileOpen" min="-2" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="cbDatabaseType" min="-2" pref="210" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="lbSingleUserSqLite" pref="0" max="32767" attributes="0"/> - </Group> - <Component id="jpDbPassword" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="tbDbUsername" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="tbDbPort" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="tbDbHostname" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="dataBaseFileScrollPane" alignment="0" min="-2" pref="509" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="55" max="-2" attributes="0"/> - <Component id="filler1" min="-2" max="-2" attributes="0"/> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="cbDatabaseType" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="lbSingleUserSqLite" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <Component id="lbDatabaseType" alignment="1" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="lbDatabasePath" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="tfDatabasePath" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="bnDatabasePathFileOpen" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="tbDbHostname" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="lbHostName" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="tbDbPort" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="lbPort" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="tbDbUsername" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="lbUserName" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="jpDbPassword" min="-2" max="-2" attributes="0"/> - <Component id="lbUserPassword" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="lbDatabaseDesc" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="filler1" min="-2" max="-2" attributes="0"/> - </Group> - <Component id="dataBaseFileScrollPane" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JLabel" name="lbDatabasePath"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[80, 14]"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JTextField" name="tfDatabasePath"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[191, 16]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[420, 23]"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JButton" name="bnDatabasePathFileOpen"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnDatabasePathFileOpen.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + <Dimension value="[100, 14]"/> </Property> </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDatabasePathFileOpenActionPerformed"/> - </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="1" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="14" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbHostName"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbHostName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[195, 16]"/> + </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[80, 14]"/> + <Dimension value="[110, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="3" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="14" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JTextField" name="tbDbHostname"> <Properties> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[509, 20]"/> + <Dimension value="[519, 20]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="3" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="10" insetsBottom="0" insetsRight="6" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbPort"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbPort.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[132, 16]"/> + </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[80, 14]"/> + <Dimension value="[90, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="5" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="14" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JTextField" name="tbDbPort"> <Properties> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[509, 20]"/> + <Dimension value="[519, 20]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="5" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="10" insetsBottom="0" insetsRight="6" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbUserName"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserName.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[172, 16]"/> + </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[80, 14]"/> + <Dimension value="[100, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="7" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="14" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JTextField" name="tbDbUsername"> <Properties> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[509, 20]"/> + <Dimension value="[519, 20]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="7" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="10" insetsBottom="0" insetsRight="6" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbUserPassword"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbUserPassword.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[80, 14]"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JPasswordField" name="jpDbPassword"> - <Properties> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[509, 20]"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JComboBox" name="cbDatabaseType"> - <Properties> - <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> - <Connection code="new javax.swing.DefaultComboBoxModel<>(org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.DB_CHOICES)" type="code"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[194, 16]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[120, 20]"/> + <Dimension value="[110, 14]"/> </Property> </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbDatabaseTypeActionPerformed"/> - </Events> - <AuxValues> - <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice>"/> - </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="9" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="14" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> - <Component class="javax.swing.JLabel" name="lbSingleUserSqLite"> + <Component class="javax.swing.JPasswordField" name="jpDbPassword"> <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbSingleUserSqLite.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[381, 14]"/> + <Dimension value="[519, 20]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="9" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="10" insetsBottom="0" insetsRight="6" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbDatabaseType"> <Properties> @@ -347,25 +233,38 @@ <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabaseType.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[80, 14]"/> + <Dimension value="[180, 14]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[80, 14]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[80, 14]"/> + <Dimension value="[100, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="14" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="lbDatabaseDesc"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbDatabaseDesc.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[182, 16]"/> + </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[80, 14]"/> + <Dimension value="[100, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="11" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="14" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.Box$Filler" name="filler1"> <Properties> @@ -376,6 +275,11 @@ <AuxValues> <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalGlue"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Container class="javax.swing.JScrollPane" name="dataBaseFileScrollPane"> <Properties> @@ -386,6 +290,11 @@ <AuxValues> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="11" gridWidth="1" gridHeight="3" fill="1" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="10" insetsBottom="15" insetsRight="6" anchor="18" weightX="1.0" weightY="1.0"/> + </Constraint> + </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <SubComponents> @@ -402,7 +311,155 @@ </Component> </SubComponents> </Container> + <Container class="javax.swing.JPanel" name="pathPanel"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="10" insetsBottom="0" insetsRight="6" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> + <Component id="tfDatabasePath" max="32767" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> + <Component id="bnDatabasePathFileOpen" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="tfDatabasePath" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="bnDatabasePathFileOpen" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="tfDatabasePath"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.tfDatabasePath.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[420, 23]"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="bnDatabasePathFileOpen"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnDatabasePathFileOpen.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDatabasePathFileOpenActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="typePanel"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="10" insetsBottom="2" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> + <Component id="cbDatabaseType" pref="210" max="32767" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> + <Component id="lbSingleUserSqLite" pref="303" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> + <Group type="103" alignment="0" groupAlignment="3" attributes="0"> + <Component id="cbDatabaseType" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lbSingleUserSqLite" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lbSingleUserSqLite"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.lbSingleUserSqLite.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[381, 14]"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="cbDatabaseType"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> + <Connection code="new javax.swing.DefaultComboBoxModel<>(org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.DB_CHOICES)" type="code"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[120, 20]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbDatabaseTypeActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice>"/> + </AuxValues> + </Component> + </SubComponents> + </Container> </SubComponents> </Container> + <Component class="javax.swing.JButton" name="bnCancel"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnCancel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[79, 23]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[79, 23]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[79, 23]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnCancelActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="bnOk"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="EamDbSettingsDialog.bnOk.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnOkActionPerformed"/> + </Events> + </Component> </SubComponents> </Form> diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index b9aadfdeee6600243afdf9f8481882673e0bf5a2..675e7c8807e554a1a18212693d5cc0bfd868dcad 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -41,7 +41,6 @@ import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.filechooser.FileFilter; -import org.netbeans.spi.options.OptionsPanelController; import org.openide.util.NbBundle; import org.openide.util.NbBundle.Messages; import org.openide.windows.WindowManager; @@ -61,15 +60,17 @@ public class EamDbSettingsDialog extends JDialog { private static final Logger logger = Logger.getLogger(EamDbSettingsDialog.class.getName()); - + private static final long serialVersionUID = 1L; - + /** - * This class handles displaying and rendering drop down menu for database choices in central repo. + * This class handles displaying and rendering drop down menu for database + * choices in central repo. */ private class DbChoiceRenderer extends JLabel implements ListCellRenderer<CentralRepoDbChoice>, Serializable { + private static final long serialVersionUID = 1L; - + @Override public Component getListCellRendererComponent( JList<? extends CentralRepoDbChoice> list, CentralRepoDbChoice value, @@ -82,22 +83,20 @@ public Component getListCellRendererComponent( return this; } } - - + private final Collection<JTextField> textBoxes; private final TextBoxChangedListener textBoxChangedListener; private final CentralRepoDbManager manager = new CentralRepoDbManager(); private final DbChoiceRenderer DB_CHOICE_RENDERER = new DbChoiceRenderer(); - + public EamDbSettingsDialog() { this(null); } - + private boolean isDbChoiceSelectable(CentralRepoDbChoice item) { - return (item != CentralRepoDbChoice.POSTGRESQL_MULTIUSER || manager.isPostgresMultiuserAllowed()); + return (item != CentralRepoDbChoice.POSTGRESQL_MULTIUSER || CentralRepoDbManager.isPostgresMultiuserAllowed()); } - - + /** * Creates new form EamDbSettingsDialog */ @@ -123,7 +122,7 @@ public boolean accept(File pathname) { if (pathname.isDirectory()) { return true; } - return pathname.getName().equalsIgnoreCase(SqliteCentralRepoSettings.DEFAULT_DBNAME); + return pathname.getName().equalsIgnoreCase(SqliteCentralRepoSettings.DEFAULT_DBNAME); } @Override @@ -131,32 +130,34 @@ public String getDescription() { return "Directories and Central Repository databases"; } }); - + setupDbChoice(initialMenuItem); valid(); display(); } - private void setupDbChoice(CentralRepoDbChoice initialMenuItem) { // setup initially selected item - CentralRepoDbChoice toSelect = (initialMenuItem == null) ? - (Arrays.asList(CentralRepoDbChoice.DB_CHOICES).contains(manager.getSelectedDbChoice())) ? - manager.getSelectedDbChoice() : - CentralRepoDbChoice.DB_CHOICES[0] : - initialMenuItem; - + CentralRepoDbChoice toSelect = (initialMenuItem == null) + ? (Arrays.asList(CentralRepoDbChoice.DB_CHOICES).contains(manager.getSelectedDbChoice())) + ? manager.getSelectedDbChoice() + : CentralRepoDbChoice.DB_CHOICES[0] + : initialMenuItem; + cbDatabaseType.setRenderer(DB_CHOICE_RENDERER); changeDbSelection(toSelect); } - - - - /** - * This method prompts user based on testing status (i.e. failure to connect, invalid schema, db does not exist, etc.). - * @param manager The manager to use when setting up the database. - * @param dialog If non-null value, validates settings and updates 'okay' button enabled state. - * @return Whether or not the ultimate status after prompts is okay to continue. + + /** + * This method prompts user based on testing status (i.e. failure to + * connect, invalid schema, db does not exist, etc.). + * + * @param manager The manager to use when setting up the database. + * @param dialog If non-null value, validates settings and updates 'okay' + * button enabled state. + * + * @return Whether or not the ultimate status after prompts is okay to + * continue. */ @NbBundle.Messages({"EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Central Repository Database", "EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Central Repository Database exists but is not the right format. Manually delete it or choose a different path (if applicable).", @@ -184,13 +185,13 @@ private static boolean promptTestStatusWarnings(CentralRepoDbManager manager, Ea } return (manager.getStatus() == DatabaseTestResult.TESTED_OK); - } - - - /** - * This method prompts the user whether or not they would like to create a database in the instance that - * it doesn't exist. - * @param manager The manager to use when setting up the database. + } + + /** + * This method prompts the user whether or not they would like to create a + * database in the instance that it doesn't exist. + * + * @param manager The manager to use when setting up the database. * @param dialog If non-null value, validates settings and updates 'okay' * button enabled state. * @@ -204,26 +205,28 @@ public static boolean promptCreateDatabase(CentralRepoDbManager manager, EamDbSe JOptionPane.YES_NO_OPTION)) { try { manager.createDb(); - + } catch (CentralRepoException e) { onPromptStatusError(manager); return false; } - + if (dialog != null) { dialog.valid(); } return true; } - + return manager.testStatus() == DatabaseTestResult.TESTED_OK; } - /** - * When an error occurs while going through promptTestStatusWarning, this method is called. - * @param manager1 The manager to use as service class. - * @throws HeadlessException + * When an error occurs while going through promptTestStatusWarning, this + * method is called. + * + * @param manager1 The manager to use as service class. + * + * @throws HeadlessException */ private static void onPromptStatusError(CentralRepoDbManager manager1) { // in the event that there is a failure to connect, notify user with corresponding message @@ -240,7 +243,6 @@ private static void onPromptStatusError(CentralRepoDbManager manager1) { Bundle.EamDbSettingsDialog_okButton_createDbError_title(), JOptionPane.WARNING_MESSAGE); } - /** * This method is called from within the constructor to initialize the form. @@ -250,15 +252,12 @@ private static void onPromptStatusError(CentralRepoDbManager manager1) { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; fcDatabasePath = new javax.swing.JFileChooser(); pnButtons = new javax.swing.JPanel(); - bnCancel = new javax.swing.JButton(); - bnOk = new javax.swing.JButton(); pnSQLiteSettings = new javax.swing.JPanel(); lbDatabasePath = new javax.swing.JLabel(); - tfDatabasePath = new javax.swing.JTextField(); - bnDatabasePathFileOpen = new javax.swing.JButton(); lbHostName = new javax.swing.JLabel(); tbDbHostname = new javax.swing.JTextField(); lbPort = new javax.swing.JLabel(); @@ -267,112 +266,166 @@ private void initComponents() { tbDbUsername = new javax.swing.JTextField(); lbUserPassword = new javax.swing.JLabel(); jpDbPassword = new javax.swing.JPasswordField(); - cbDatabaseType = new javax.swing.JComboBox<>(); - lbSingleUserSqLite = new javax.swing.JLabel(); lbDatabaseType = new javax.swing.JLabel(); lbDatabaseDesc = new javax.swing.JLabel(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767)); dataBaseFileScrollPane = new javax.swing.JScrollPane(); dataBaseFileTextArea = new javax.swing.JTextArea(); + pathPanel = new javax.swing.JPanel(); + tfDatabasePath = new javax.swing.JTextField(); + bnDatabasePathFileOpen = new javax.swing.JButton(); + typePanel = new javax.swing.JPanel(); + lbSingleUserSqLite = new javax.swing.JLabel(); + cbDatabaseType = new javax.swing.JComboBox<>(); + bnCancel = new javax.swing.JButton(); + bnOk = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setResizable(false); - org.openide.awt.Mnemonics.setLocalizedText(bnCancel, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnCancel.text")); // NOI18N - bnCancel.setMaximumSize(new java.awt.Dimension(79, 23)); - bnCancel.setMinimumSize(new java.awt.Dimension(79, 23)); - bnCancel.setPreferredSize(new java.awt.Dimension(79, 23)); - bnCancel.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - bnCancelActionPerformed(evt); - } - }); - - org.openide.awt.Mnemonics.setLocalizedText(bnOk, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnOk.text")); // NOI18N - bnOk.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - bnOkActionPerformed(evt); - } - }); - javax.swing.GroupLayout pnButtonsLayout = new javax.swing.GroupLayout(pnButtons); pnButtons.setLayout(pnButtonsLayout); pnButtonsLayout.setHorizontalGroup( pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnButtonsLayout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(bnOk) - .addGap(11, 11, 11) - .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) + .addGap(0, 0, Short.MAX_VALUE) ); - - pnButtonsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {bnCancel, bnOk}); - pnButtonsLayout.setVerticalGroup( pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnButtonsLayout.createSequentialGroup() - .addGap(0, 0, 0) - .addGroup(pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bnOk) - .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, 0)) + .addGap(0, 25, Short.MAX_VALUE) ); pnSQLiteSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + pnSQLiteSettings.setLayout(new java.awt.GridBagLayout()); org.openide.awt.Mnemonics.setLocalizedText(lbDatabasePath, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbDatabasePath.text")); // NOI18N - lbDatabasePath.setPreferredSize(new java.awt.Dimension(80, 14)); - - tfDatabasePath.setText(org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.tfDatabasePath.text")); // NOI18N - tfDatabasePath.setToolTipText(org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.tfDatabasePath.toolTipText")); // NOI18N - tfDatabasePath.setPreferredSize(new java.awt.Dimension(420, 23)); - - org.openide.awt.Mnemonics.setLocalizedText(bnDatabasePathFileOpen, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnDatabasePathFileOpen.text")); // NOI18N - bnDatabasePathFileOpen.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - bnDatabasePathFileOpenActionPerformed(evt); - } - }); + lbDatabasePath.setMaximumSize(new java.awt.Dimension(191, 16)); + lbDatabasePath.setPreferredSize(new java.awt.Dimension(100, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbDatabasePath, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbHostName, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbHostName.text")); // NOI18N - lbHostName.setPreferredSize(new java.awt.Dimension(80, 14)); - - tbDbHostname.setPreferredSize(new java.awt.Dimension(509, 20)); + lbHostName.setMaximumSize(new java.awt.Dimension(195, 16)); + lbHostName.setPreferredSize(new java.awt.Dimension(110, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbHostName, gridBagConstraints); + + tbDbHostname.setPreferredSize(new java.awt.Dimension(519, 20)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(tbDbHostname, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbPort, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbPort.text")); // NOI18N - lbPort.setPreferredSize(new java.awt.Dimension(80, 14)); - - tbDbPort.setPreferredSize(new java.awt.Dimension(509, 20)); + lbPort.setMaximumSize(new java.awt.Dimension(132, 16)); + lbPort.setPreferredSize(new java.awt.Dimension(90, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 5; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbPort, gridBagConstraints); + + tbDbPort.setPreferredSize(new java.awt.Dimension(519, 20)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 5; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(tbDbPort, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbUserName, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbUserName.text")); // NOI18N - lbUserName.setPreferredSize(new java.awt.Dimension(80, 14)); - - tbDbUsername.setPreferredSize(new java.awt.Dimension(509, 20)); + lbUserName.setMaximumSize(new java.awt.Dimension(172, 16)); + lbUserName.setPreferredSize(new java.awt.Dimension(100, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 7; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbUserName, gridBagConstraints); + + tbDbUsername.setPreferredSize(new java.awt.Dimension(519, 20)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 7; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(tbDbUsername, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbUserPassword, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbUserPassword.text")); // NOI18N - lbUserPassword.setPreferredSize(new java.awt.Dimension(80, 14)); - - jpDbPassword.setPreferredSize(new java.awt.Dimension(509, 20)); - - cbDatabaseType.setModel(new javax.swing.DefaultComboBoxModel<>(org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.DB_CHOICES)); - cbDatabaseType.setPreferredSize(new java.awt.Dimension(120, 20)); - cbDatabaseType.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - cbDatabaseTypeActionPerformed(evt); - } - }); - - org.openide.awt.Mnemonics.setLocalizedText(lbSingleUserSqLite, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbSingleUserSqLite.text")); // NOI18N - lbSingleUserSqLite.setPreferredSize(new java.awt.Dimension(381, 14)); + lbUserPassword.setMaximumSize(new java.awt.Dimension(194, 16)); + lbUserPassword.setPreferredSize(new java.awt.Dimension(110, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 9; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbUserPassword, gridBagConstraints); + + jpDbPassword.setPreferredSize(new java.awt.Dimension(519, 20)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 9; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(jpDbPassword, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbDatabaseType, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbDatabaseType.text")); // NOI18N - lbDatabaseType.setMaximumSize(new java.awt.Dimension(80, 14)); + lbDatabaseType.setMaximumSize(new java.awt.Dimension(180, 14)); lbDatabaseType.setMinimumSize(new java.awt.Dimension(80, 14)); - lbDatabaseType.setPreferredSize(new java.awt.Dimension(80, 14)); + lbDatabaseType.setPreferredSize(new java.awt.Dimension(100, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(12, 14, 0, 0); + pnSQLiteSettings.add(lbDatabaseType, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbDatabaseDesc, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbDatabaseDesc.text")); // NOI18N - lbDatabaseDesc.setPreferredSize(new java.awt.Dimension(80, 14)); + lbDatabaseDesc.setMaximumSize(new java.awt.Dimension(182, 16)); + lbDatabaseDesc.setPreferredSize(new java.awt.Dimension(100, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 11; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbDatabaseDesc, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 12; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + pnSQLiteSettings.add(filler1, gridBagConstraints); dataBaseFileScrollPane.setBorder(null); @@ -383,82 +436,115 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { dataBaseFileTextArea.setRows(3); dataBaseFileScrollPane.setViewportView(dataBaseFileTextArea); - javax.swing.GroupLayout pnSQLiteSettingsLayout = new javax.swing.GroupLayout(pnSQLiteSettings); - pnSQLiteSettings.setLayout(pnSQLiteSettingsLayout); - pnSQLiteSettingsLayout.setHorizontalGroup( - pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnSQLiteSettingsLayout.createSequentialGroup() - .addContainerGap() - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbHostName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(lbDatabaseDesc, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE) - .addComponent(lbUserPassword, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGap(10, 10, 10) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addGroup(pnSQLiteSettingsLayout.createSequentialGroup() - .addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(bnDatabasePathFileOpen)) - .addGroup(pnSQLiteSettingsLayout.createSequentialGroup() - .addComponent(cbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)) - .addComponent(jpDbPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(tbDbUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(tbDbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(tbDbHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(dataBaseFileScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 509, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) - .addGroup(pnSQLiteSettingsLayout.createSequentialGroup() - .addGap(55, 55, 55) - .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)) + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 11; + gridBagConstraints.gridheight = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.weighty = 1.0; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 15, 6); + pnSQLiteSettings.add(dataBaseFileScrollPane, gridBagConstraints); + + tfDatabasePath.setText(org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.tfDatabasePath.text")); // NOI18N + tfDatabasePath.setToolTipText(org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.tfDatabasePath.toolTipText")); // NOI18N + tfDatabasePath.setPreferredSize(new java.awt.Dimension(420, 23)); + + org.openide.awt.Mnemonics.setLocalizedText(bnDatabasePathFileOpen, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnDatabasePathFileOpen.text")); // NOI18N + bnDatabasePathFileOpen.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnDatabasePathFileOpenActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pathPanelLayout = new javax.swing.GroupLayout(pathPanel); + pathPanel.setLayout(pathPanelLayout); + pathPanelLayout.setHorizontalGroup( + pathPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pathPanelLayout.createSequentialGroup() + .addGap(0, 0, 0) + .addComponent(tfDatabasePath, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(bnDatabasePathFileOpen) + .addGap(0, 0, 0)) ); - pnSQLiteSettingsLayout.setVerticalGroup( - pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnSQLiteSettingsLayout.createSequentialGroup() - .addGap(6, 6, 6) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(cbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(lbDatabaseType, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lbDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + pathPanelLayout.setVerticalGroup( + pathPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pathPanelLayout.createSequentialGroup() + .addGap(0, 0, 0) + .addGroup(pathPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(bnDatabasePathFileOpen)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(tbDbHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbHostName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(tbDbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(tbDbUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jpDbPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbUserPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnSQLiteSettingsLayout.createSequentialGroup() - .addComponent(lbDatabaseDesc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(dataBaseFileScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) + .addGap(0, 0, 0)) ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(pathPanel, gridBagConstraints); + + org.openide.awt.Mnemonics.setLocalizedText(lbSingleUserSqLite, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbSingleUserSqLite.text")); // NOI18N + lbSingleUserSqLite.setPreferredSize(new java.awt.Dimension(381, 14)); + + cbDatabaseType.setModel(new javax.swing.DefaultComboBoxModel<>(org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.DB_CHOICES)); + cbDatabaseType.setPreferredSize(new java.awt.Dimension(120, 20)); + cbDatabaseType.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cbDatabaseTypeActionPerformed(evt); + } + }); + + javax.swing.GroupLayout typePanelLayout = new javax.swing.GroupLayout(typePanel); + typePanel.setLayout(typePanelLayout); + typePanelLayout.setHorizontalGroup( + typePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(typePanelLayout.createSequentialGroup() + .addGap(0, 0, 0) + .addComponent(cbDatabaseType, 0, 210, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE) + .addGap(0, 0, 0)) + ); + typePanelLayout.setVerticalGroup( + typePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(typePanelLayout.createSequentialGroup() + .addGap(0, 0, 0) + .addGroup(typePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(cbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 0, 0)) + ); + + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(12, 10, 2, 0); + pnSQLiteSettings.add(typePanel, gridBagConstraints); + + org.openide.awt.Mnemonics.setLocalizedText(bnCancel, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnCancel.text")); // NOI18N + bnCancel.setMaximumSize(new java.awt.Dimension(79, 23)); + bnCancel.setMinimumSize(new java.awt.Dimension(79, 23)); + bnCancel.setPreferredSize(new java.awt.Dimension(79, 23)); + bnCancel.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnCancelActionPerformed(evt); + } + }); + + org.openide.awt.Mnemonics.setLocalizedText(bnOk, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnOk.text")); // NOI18N + bnOk.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnOkActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( @@ -466,17 +552,29 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pnButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addComponent(pnButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(bnOk) + .addGap(11, 11, 11) + .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, 648, Short.MAX_VALUE)) .addContainerGap()) ); + + layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {bnCancel, bnOk}); + layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(pnButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pnButtons, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bnOk) + .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); @@ -490,12 +588,10 @@ private void customizeComponents() { if (manager.getSelectedDbChoice() == CentralRepoDbChoice.SQLITE) { updatePostgresFields(false); updateSqliteFields(true); - } - else if (manager.getSelectedDbChoice() == CentralRepoDbChoice.POSTGRESQL_CUSTOM) { + } else if (manager.getSelectedDbChoice() == CentralRepoDbChoice.POSTGRESQL_CUSTOM) { updatePostgresFields(true); updateSqliteFields(false); - } - else { + } else { updatePostgresFields(false); updateSqliteFields(false); } @@ -530,53 +626,63 @@ private void bnDatabasePathFileOpenActionPerformed(java.awt.event.ActionEvent ev "EamDbSettingsDialog.okButton.errorMsg.text=Please restart Autopsy to begin using the new database platform.", "EamDbSettingsDialog.okButton.connectionErrorMsg.text=Failed to connect to central repository database."}) private void bnOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnOkActionPerformed - if (testStatusAndCreate(this, manager, this)) + if (testStatusAndCreate(this, manager, this)) { dispose(); + } }//GEN-LAST:event_bnOkActionPerformed - /** - * This method tests status for central repo db / creation and prompts user accordingly. - * @param parent The parent component (the anchor for displaying dialogs). - * @param manager The central repo db manager with settings to be tested and saved. - * @return Whether or not central repo db was successfully be created or found. + * This method tests status for central repo db / creation and prompts user + * accordingly. + * + * @param parent The parent component (the anchor for displaying dialogs). + * @param manager The central repo db manager with settings to be tested and + * saved. + * + * @return Whether or not central repo db was successfully be created or + * found. */ public static boolean testStatusAndCreate(Component parent, CentralRepoDbManager manager) { return testStatusAndCreate(parent, manager, null); } - - + /** - * This method tests status for central repo db / creation and prompts user accordingly. - * @param parent The parent component (the anchor for displaying dialogs). - * @param manager The central repo db manager with settings to be tested and saved. - * @param dialog The db settings dialog; if non-null, will validate okay button state. - * @return Whether or not central repo db was successfully be created or found. + * This method tests status for central repo db / creation and prompts user + * accordingly. + * + * @param parent The parent component (the anchor for displaying dialogs). + * @param manager The central repo db manager with settings to be tested and + * saved. + * @param dialog The db settings dialog; if non-null, will validate okay + * button state. + * + * @return Whether or not central repo db was successfully be created or + * found. */ private static boolean testStatusAndCreate(Component parent, CentralRepoDbManager manager, EamDbSettingsDialog dialog) { parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); manager.testStatus(); - - if (dialog != null) + + if (dialog != null) { dialog.valid(); - + } + boolean testedOk = promptTestStatusWarnings(manager, dialog); if (!testedOk) { parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); return false; } - - try{ + + try { manager.saveNewCentralRepo(); - } - catch (CentralRepoException e) { + } catch (CentralRepoException e) { SwingUtilities.invokeLater(() -> { JOptionPane.showMessageDialog(parent, - Bundle.EamDbSettingsDialog_okButton_errorMsg_text(), - Bundle.EamDbSettingsDialog_okButton_errorTitle_text(), - JOptionPane.WARNING_MESSAGE); + Bundle.EamDbSettingsDialog_okButton_errorMsg_text(), + Bundle.EamDbSettingsDialog_okButton_errorTitle_text(), + JOptionPane.WARNING_MESSAGE); }); - + parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); return false; } @@ -584,14 +690,13 @@ private static boolean testStatusAndCreate(Component parent, CentralRepoDbManage parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); return true; } - - + /** - * This method returns if changes to the central repository configuration were - * successfully applied. + * This method returns if changes to the central repository configuration + * were successfully applied. * - * @return True if the database configuration was successfully changed; false - * if it was not. + * @return True if the database configuration was successfully changed; + * false if it was not. */ public boolean wasConfigurationChanged() { return manager.wasConfigurationChanged(); @@ -611,11 +716,10 @@ private void changeDbSelection(CentralRepoDbChoice selectedItem) { if (isDbChoiceSelectable(selectedItem)) { manager.setSelctedDbChoice(selectedItem); cbDatabaseType.setSelectedItem(selectedItem); - } - else { + } else { cbDatabaseType.setSelectedItem(manager.getSelectedDbChoice()); } - + customizeComponents(); } @@ -627,14 +731,14 @@ private void updateFullDbPath() { private void displayDatabaseSettings(CentralRepoDbChoice choice) { boolean isSqlite = choice == CentralRepoDbChoice.SQLITE; boolean isPostgres = choice == CentralRepoDbChoice.POSTGRESQL_CUSTOM; - + lbDatabasePath.setVisible(isSqlite); tfDatabasePath.setVisible(isSqlite); lbDatabaseDesc.setVisible(isSqlite); dataBaseFileTextArea.setVisible(isSqlite); lbSingleUserSqLite.setVisible(isSqlite); bnDatabasePathFileOpen.setVisible(isSqlite); - + lbHostName.setVisible(isPostgres); tbDbHostname.setVisible(isPostgres); lbPort.setVisible(isPostgres); @@ -715,7 +819,7 @@ private static void configureTextPrompts(Collection<TextPrompt> textPrompts) { * Adds a change listener to a collection of text fields. * * @param textFields The text fields. - * @param listener The change listener. + * @param listener The change listener. */ private static void addDocumentListeners(Collection<JTextField> textFields, TextBoxChangedListener listener) { textFields.forEach((textField) -> { @@ -738,8 +842,7 @@ private boolean databaseFieldsArePopulated() { // && !tbDbName.getText().trim().isEmpty() && !tbDbUsername.getText().trim().isEmpty() && 0 < jpDbPassword.getPassword().length; - } - else if (manager.getSelectedDbChoice() == CentralRepoDbChoice.SQLITE) { + } else if (manager.getSelectedDbChoice() == CentralRepoDbChoice.SQLITE) { result = !tfDatabasePath.getText().trim().isEmpty(); } @@ -756,7 +859,6 @@ private boolean checkFields() { && databaseSettingsAreValid(); } - /** * Validates that the form is filled out correctly for our usage. * @@ -782,9 +884,7 @@ private boolean enableOkButton(boolean isValidInput) { return true; } - - - + /** * Tests whether or not the database settings are valid. * @@ -793,16 +893,15 @@ private boolean enableOkButton(boolean isValidInput) { private boolean databaseSettingsAreValid() { try { manager.testDatabaseSettingsAreValid( - tbDbHostname.getText().trim(), - tbDbPort.getText().trim(), - tbDbUsername.getText().trim(), - tfDatabasePath.getText().trim(), + tbDbHostname.getText().trim(), + tbDbPort.getText().trim(), + tbDbUsername.getText().trim(), + tfDatabasePath.getText().trim(), new String(jpDbPassword.getPassword())); - } - catch (CentralRepoException | NumberFormatException | IllegalStateException e) { + } catch (CentralRepoException | NumberFormatException | IllegalStateException e) { return false; } - + return true; } @@ -854,11 +953,13 @@ public void removeUpdate(DocumentEvent e) { private javax.swing.JLabel lbSingleUserSqLite; private javax.swing.JLabel lbUserName; private javax.swing.JLabel lbUserPassword; + private javax.swing.JPanel pathPanel; private javax.swing.JPanel pnButtons; private javax.swing.JPanel pnSQLiteSettings; private javax.swing.JTextField tbDbHostname; private javax.swing.JTextField tbDbPort; private javax.swing.JTextField tbDbUsername; private javax.swing.JTextField tfDatabasePath; + private javax.swing.JPanel typePanel; // End of variables declaration//GEN-END:variables } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index 942a113ff8f1f152ec5f09a39476e64bd3a1e2c3..158a83b7d278336726bbd764c7f2b0a6f4675e56 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -65,16 +65,16 @@ <Component id="organizationPanel" alignment="1" max="32767" attributes="0"/> <Component id="casesPanel" alignment="0" max="32767" attributes="0"/> <Group type="102" attributes="0"> - <Component id="cbUseCentralRepo" min="-2" pref="162" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="ingestRunningWarningLabel" max="32767" attributes="0"/> + <Component id="cbUseCentralRepo" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="ingestRunningWarningLabel" pref="840" max="32767" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Component id="tbOops" min="-2" pref="974" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index f668e2f6d079ab1348a40d4ae313aa87bb3e4dc5..7cb1e566ddd8ada7918754cc1dc2efdc9937721e 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -590,9 +590,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(organizationPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(casesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(cbUseCentralRepo, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(cbUseCentralRepo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 840, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 974, javax.swing.GroupLayout.PREFERRED_SIZE))) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form index 9010e849e9a977215df976724fd08f227e840469..f7c005b25497a722bf7245eecdf2ca6d5e68a3c4 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form @@ -26,12 +26,12 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="casesSplitPane" alignment="1" max="32767" attributes="0"/> + <Component id="casesSplitPane" alignment="1" pref="850" max="32767" attributes="0"/> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="casesSplitPane" alignment="0" max="32767" attributes="0"/> + <Component id="casesSplitPane" alignment="0" pref="570" max="32767" attributes="0"/> </Group> </DimensionLayout> </Layout> @@ -39,6 +39,7 @@ <Container class="javax.swing.JSplitPane" name="casesSplitPane"> <Properties> <Property name="dividerLocation" type="int" value="380"/> + <Property name="resizeWeight" type="double" value="0.5"/> </Properties> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JSplitPaneSupportLayout"/> @@ -50,122 +51,17 @@ </Constraint> </Constraints> - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace min="10" pref="10" max="-2" attributes="0"/> - <Component id="dataSourcesScrollPane" pref="0" max="32767" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Group type="103" groupAlignment="1" attributes="0"> - <Component id="orgLabel" min="-2" pref="88" max="-2" attributes="0"/> - <Component id="caseNumberLabel" min="-2" pref="88" max="-2" attributes="0"/> - <Component id="examinerNameLabel" alignment="1" min="-2" pref="88" max="-2" attributes="0"/> - <Component id="examinerEmailLabel" alignment="1" min="-2" pref="88" max="-2" attributes="0"/> - <Component id="examinerPhoneLabel" alignment="1" min="-2" pref="88" max="-2" attributes="0"/> - </Group> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="caseNumberValueLabel" max="32767" attributes="0"/> - <Component id="orgValueLabel" alignment="0" max="32767" attributes="0"/> - </Group> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="examinerNameValueLabel" max="32767" attributes="0"/> - <Component id="examinerEmailValueLabel" max="32767" attributes="0"/> - <Component id="examinerPhoneValueLabel" alignment="0" max="32767" attributes="0"/> - </Group> - </Group> - </Group> - </Group> - <Component id="notesLabel" min="-2" max="-2" attributes="0"/> - <Group type="102" attributes="0"> - <EmptySpace min="10" pref="10" max="-2" attributes="0"/> - <Component id="notesScrollPane" pref="428" max="32767" attributes="0"/> - </Group> - </Group> - </Group> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - <Component id="closeButton" min="-2" max="-2" attributes="0"/> - </Group> - <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="caseInfoLabel" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="dataSourcesLabel" alignment="0" min="-2" pref="77" max="-2" attributes="0"/> - </Group> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> - </Group> - <EmptySpace max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="caseInfoLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="1" attributes="0"> - <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Component id="orgLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="caseNumberLabel" max="32767" attributes="0"/> - <Component id="caseNumberValueLabel" max="32767" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="examinerNameLabel" max="32767" attributes="0"/> - <Component id="examinerNameValueLabel" max="32767" attributes="0"/> - </Group> - </Group> - <Component id="orgValueLabel" alignment="0" min="-2" pref="14" max="-2" attributes="0"/> - </Group> - <EmptySpace max="-2" attributes="0"/> - <Component id="examinerEmailLabel" min="-2" max="-2" attributes="0"/> - </Group> - <Component id="examinerEmailValueLabel" min="-2" pref="14" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="examinerPhoneLabel" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="examinerPhoneValueLabel" alignment="0" min="-2" pref="14" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="notesLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="notesScrollPane" pref="55" max="32767" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="dataSourcesLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="dataSourcesScrollPane" pref="129" max="32767" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="closeButton" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Container class="javax.swing.JScrollPane" name="dataSourcesScrollPane"> <AuxValues> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="9" gridWidth="5" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="22" insetsBottom="0" insetsRight="12" anchor="18" weightX="1.0" weightY="1.0"/> + </Constraint> + </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <SubComponents> @@ -190,10 +86,21 @@ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> <Border info="null"/> </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[25, 54]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[160, 70]"/> + </Property> </Properties> <AuxValues> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="7" gridWidth="5" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="28" insetsBottom="0" insetsRight="12" anchor="18" weightX="1.0" weightY="0.0"/> + </Constraint> + </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <SubComponents> @@ -219,66 +126,179 @@ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.caseInfoLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[237, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[130, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="13" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="dataSourcesLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.dataSourcesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[237, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[130, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="8" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="notesLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.notesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[237, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[130, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="6" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="18" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="orgLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.orgLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[237, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[130, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="1" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="18" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="caseNumberLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.caseNumberLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[237, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[130, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="2" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="18" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="examinerEmailLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.examinerEmailLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[237, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[130, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="4" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="18" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="examinerNameLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.examinerNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[237, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[130, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="3" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="18" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="examinerPhoneLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.examinerPhoneLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[237, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[130, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="5" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="18" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="orgValueLabel"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="7" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="caseNumberValueLabel"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="7" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="examinerNameValueLabel"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="6" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="examinerEmailValueLabel"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="6" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="examinerPhoneValueLabel"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="5" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="6" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="closeButton"> <Properties> @@ -286,18 +306,40 @@ <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="ManageCasesDialog.closeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[65, 23]"/> + <Dimension value="[140, 23]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[65, 23]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[65, 23]"/> + <Dimension value="[90, 23]"/> </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="closeButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="10" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="285" insetsBottom="13" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.Box$Filler" name="filler1"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="10" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> </SubComponents> </Container> @@ -312,7 +354,7 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <Component id="casesScrollPane" pref="379" max="32767" attributes="0"/> + <Component id="casesScrollPane" pref="318" max="32767" attributes="0"/> <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> </Group> </Group> @@ -320,7 +362,7 @@ <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <Component id="casesScrollPane" pref="361" max="32767" attributes="0"/> + <Component id="casesScrollPane" pref="528" max="32767" attributes="0"/> <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> </Group> </Group> diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java index 47697f73ce27438a06778ce8839b6ecc477cded7..b4aa36f78a8ee1da909e5dd9560f5db8f191c0cf 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java @@ -1,7 +1,7 @@ /* * Central Repository * - * Copyright 2018 Basis Technology Corp. + * Copyright 2018-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -100,6 +100,7 @@ static void displayManageCasesDialog() { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; casesSplitPane = new javax.swing.JSplitPane(); caseInfoPanel = new javax.swing.JPanel(); @@ -121,6 +122,7 @@ private void initComponents() { examinerEmailValueLabel = new javax.swing.JLabel(); examinerPhoneValueLabel = new javax.swing.JLabel(); closeButton = new javax.swing.JButton(); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); casesPanel = new javax.swing.JPanel(); casesScrollPane = new javax.swing.JScrollPane(); casesTable = new javax.swing.JTable(); @@ -129,13 +131,29 @@ private void initComponents() { setMinimumSize(new java.awt.Dimension(400, 400)); casesSplitPane.setDividerLocation(380); + casesSplitPane.setResizeWeight(0.5); + + caseInfoPanel.setLayout(new java.awt.GridBagLayout()); dataSourcesTable.setAutoCreateRowSorter(true); dataSourcesTable.setModel(dataSourcesTableModel); dataSourcesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); dataSourcesScrollPane.setViewportView(dataSourcesTable); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 9; + gridBagConstraints.gridwidth = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.weighty = 1.0; + gridBagConstraints.insets = new java.awt.Insets(7, 22, 0, 12); + caseInfoPanel.add(dataSourcesScrollPane, gridBagConstraints); + notesScrollPane.setBorder(null); + notesScrollPane.setMinimumSize(new java.awt.Dimension(25, 54)); + notesScrollPane.setPreferredSize(new java.awt.Dimension(160, 70)); notesTextArea.setEditable(false); notesTextArea.setBackground(new java.awt.Color(240, 240, 240)); @@ -146,117 +164,177 @@ private void initComponents() { notesTextArea.setBorder(null); notesScrollPane.setViewportView(notesTextArea); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 7; + gridBagConstraints.gridwidth = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(7, 28, 0, 12); + caseInfoPanel.add(notesScrollPane, gridBagConstraints); + org.openide.awt.Mnemonics.setLocalizedText(caseInfoLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.caseInfoLabel.text")); // NOI18N + caseInfoLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + caseInfoLabel.setPreferredSize(new java.awt.Dimension(130, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 0); + caseInfoPanel.add(caseInfoLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.dataSourcesLabel.text")); // NOI18N + dataSourcesLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + dataSourcesLabel.setPreferredSize(new java.awt.Dimension(130, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 8; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 12, 0, 0); + caseInfoPanel.add(dataSourcesLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(notesLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.notesLabel.text")); // NOI18N + notesLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + notesLabel.setPreferredSize(new java.awt.Dimension(130, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 6; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(notesLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(orgLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.orgLabel.text")); // NOI18N + orgLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + orgLabel.setPreferredSize(new java.awt.Dimension(130, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(orgLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.caseNumberLabel.text")); // NOI18N + caseNumberLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + caseNumberLabel.setPreferredSize(new java.awt.Dimension(130, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(caseNumberLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(examinerEmailLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerEmailLabel.text")); // NOI18N + examinerEmailLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + examinerEmailLabel.setPreferredSize(new java.awt.Dimension(130, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 4; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(examinerEmailLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(examinerNameLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerNameLabel.text")); // NOI18N + examinerNameLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + examinerNameLabel.setPreferredSize(new java.awt.Dimension(130, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(examinerNameLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerPhoneLabel.text")); // NOI18N + examinerPhoneLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + examinerPhoneLabel.setPreferredSize(new java.awt.Dimension(130, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 5; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(examinerPhoneLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 1; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 7, 0, 12); + caseInfoPanel.add(orgValueLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 7, 0, 12); + caseInfoPanel.add(caseNumberValueLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 6, 0, 12); + caseInfoPanel.add(examinerNameValueLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(9, 6, 0, 12); + caseInfoPanel.add(examinerEmailValueLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 6, 0, 12); + caseInfoPanel.add(examinerPhoneValueLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.closeButton.text")); // NOI18N - closeButton.setMaximumSize(new java.awt.Dimension(65, 23)); + closeButton.setMaximumSize(new java.awt.Dimension(140, 23)); closeButton.setMinimumSize(new java.awt.Dimension(65, 23)); - closeButton.setPreferredSize(new java.awt.Dimension(65, 23)); + closeButton.setPreferredSize(new java.awt.Dimension(90, 23)); closeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closeButtonActionPerformed(evt); } }); - - javax.swing.GroupLayout caseInfoPanelLayout = new javax.swing.GroupLayout(caseInfoPanel); - caseInfoPanel.setLayout(caseInfoPanelLayout); - caseInfoPanelLayout.setHorizontalGroup( - caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGap(10, 10, 10) - .addComponent(dataSourcesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGap(6, 6, 6) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(orgLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNumberLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(examinerNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(examinerEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(examinerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseNumberValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(orgValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGap(6, 6, 6) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(examinerNameValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerEmailValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerPhoneValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) - .addComponent(notesLabel) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGap(10, 10, 10) - .addComponent(notesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 428, Short.MAX_VALUE)))) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, caseInfoPanelLayout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseInfoLabel) - .addComponent(dataSourcesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, Short.MAX_VALUE))) - .addContainerGap()) - ); - caseInfoPanelLayout.setVerticalGroup( - caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, caseInfoPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(caseInfoLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addComponent(orgLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(caseNumberValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(examinerNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerNameValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addComponent(orgValueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(examinerEmailLabel)) - .addComponent(examinerEmailValueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(examinerPhoneLabel) - .addComponent(examinerPhoneValueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(notesLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(notesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(dataSourcesLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(dataSourcesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 10; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 285, 13, 12); + caseInfoPanel.add(closeButton, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 10; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 1.0; + caseInfoPanel.add(filler1, gridBagConstraints); casesSplitPane.setRightComponent(caseInfoPanel); @@ -270,13 +348,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { casesPanelLayout.setHorizontalGroup( casesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(casesPanelLayout.createSequentialGroup() - .addComponent(casesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE) + .addComponent(casesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE) .addGap(0, 0, 0)) ); casesPanelLayout.setVerticalGroup( casesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(casesPanelLayout.createSequentialGroup() - .addComponent(casesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) + .addComponent(casesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 528, Short.MAX_VALUE) .addGap(40, 40, 40)) ); @@ -286,11 +364,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(casesSplitPane, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(casesSplitPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 850, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(casesSplitPane) + .addComponent(casesSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 570, Short.MAX_VALUE) ); pack(); diff --git a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form index 74ebe1bd30aadd4fd4bbf3204c4e4a3ee4e1ae85..ffd6af0ea7545a662e56332ee845033bd1aa6401 100644 --- a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form +++ b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form @@ -8,8 +8,11 @@ </Component> </NonVisualComponents> <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[499, 646]"/> + </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[450, 570]"/> + <Dimension value="[499, 646]"/> </Property> <Property name="resizable" type="boolean" value="false"/> </Properties> @@ -29,7 +32,7 @@ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> - <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,-122,0,0,1,-62"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,-122,0,0,1,-11"/> </AuxValues> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> @@ -37,10 +40,13 @@ <Container class="javax.swing.JPanel" name="jPanel1"> <Properties> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="null"/> + <Dimension value="[499, 646]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[499, 646]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[450, 646]"/> + <Dimension value="[499, 646]"/> </Property> <Property name="requestFocusEnabled" type="boolean" value="false"/> </Properties> @@ -54,7 +60,7 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> <Component id="dataSourcesLabel" max="32767" attributes="0"/> @@ -63,93 +69,94 @@ <Group type="102" alignment="1" attributes="0"> <Group type="103" groupAlignment="1" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - <Component id="intraCaseRadio" min="-2" pref="383" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> + <Component id="intraCaseRadio" max="32767" attributes="0"/> </Group> <Component id="scopeLabel" max="32767" attributes="0"/> </Group> <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> - <Component id="percentageThresholdCheck" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <Component id="percentageThresholdCheck" pref="184" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="1" max="-2" attributes="0"/> <Component id="percentageThresholdInputBox" min="-2" pref="40" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="percentageThresholdTextTwo" max="32767" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="percentageThresholdTextTwo" pref="247" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> </Group> <Group type="102" alignment="1" attributes="0"> - <Component id="errorText" min="-2" pref="330" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> + <Component id="errorText" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> <Component id="searchButton" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> </Group> <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="containerPanel" min="-2" max="-2" attributes="0"/> - <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> - <Component id="commonItemSearchDescription" alignment="0" max="32767" attributes="0"/> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> - <Component id="interCaseRadio" min="-2" pref="383" max="-2" attributes="0"/> - </Group> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="commonItemSearchDescription" alignment="0" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> + <Component id="interCaseRadio" max="32767" attributes="0"/> </Group> </Group> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace min="-2" pref="84" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="containerPanel" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> </Group> </Group> </Group> <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="displayResultsLabel" min="-2" max="-2" attributes="0"/> - </Group> <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="caseResultsRadioButton" min="-2" pref="410" max="-2" attributes="0"/> - <Component id="countResultsRadioButton" max="32767" attributes="0"/> - </Group> + <Component id="caseResultsRadioButton" max="32767" attributes="0"/> + <EmptySpace min="49" pref="49" max="-2" attributes="0"/> </Group> + <Component id="countResultsRadioButton" max="32767" attributes="0"/> </Group> <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="displayResultsLabel" min="-2" pref="225" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Component id="commonItemSearchDescription" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <Component id="scopeLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <Component id="intraCaseRadio" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Component id="interCaseRadio" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Component id="containerPanel" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="3" attributes="0"> <Component id="percentageThresholdCheck" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="percentageThresholdInputBox" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="percentageThresholdTextTwo" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <Component id="displayResultsLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <Component id="caseResultsRadioButton" min="-2" max="-2" attributes="0"/> - <EmptySpace min="0" pref="0" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> <Component id="countResultsRadioButton" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <Component id="dataSourcesLabel" min="-2" pref="14" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="3" attributes="0"> <Component id="searchButton" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="errorText" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace min="-2" pref="14" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -204,12 +211,15 @@ <Color blue="0" green="0" red="0" type="rgb"/> </Property> <Property name="opaque" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[477, 326]"/> + </Property> </Properties> <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <EmptySpace min="0" pref="430" max="32767" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> </Group> </DimensionLayout> <DimensionLayout dim="1"> @@ -251,6 +261,9 @@ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/commonpropertiessearch/Bundle.properties" key="CommonAttributePanel.percentageThresholdTextTwo.text_1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[260, 16]"/> + </Property> </Properties> </Component> <Component class="javax.swing.JLabel" name="dataSourcesLabel"> @@ -278,6 +291,15 @@ </Property> <Property name="enabled" type="boolean" value="false"/> <Property name="horizontalTextPosition" type="int" value="10"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[100, 25]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[100, 25]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[100, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="searchButtonActionPerformed"/> diff --git a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java index 5e7aa3adb4776cb244fcd386bf19b6df26962932..b301e69d049da87bbddec08c31a28c748ec1a52d 100644 --- a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java @@ -640,7 +640,8 @@ private void initComponents() { countResultsRadioButton = new javax.swing.JRadioButton(); displayResultsLabel = new javax.swing.JLabel(); - setMinimumSize(new java.awt.Dimension(450, 570)); + setMaximumSize(new java.awt.Dimension(499, 646)); + setMinimumSize(new java.awt.Dimension(499, 646)); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { @@ -648,8 +649,9 @@ public void windowClosed(java.awt.event.WindowEvent evt) { } }); - jPanel1.setMaximumSize(null); - jPanel1.setPreferredSize(new java.awt.Dimension(450, 646)); + jPanel1.setMaximumSize(new java.awt.Dimension(499, 646)); + jPanel1.setMinimumSize(new java.awt.Dimension(499, 646)); + jPanel1.setPreferredSize(new java.awt.Dimension(499, 646)); jPanel1.setRequestFocusEnabled(false); org.openide.awt.Mnemonics.setLocalizedText(commonItemSearchDescription, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.commonItemSearchDescription.text")); // NOI18N @@ -677,12 +679,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { containerPanel.setBackground(new java.awt.Color(0, 0, 0)); containerPanel.setOpaque(false); + containerPanel.setPreferredSize(new java.awt.Dimension(477, 326)); javax.swing.GroupLayout containerPanelLayout = new javax.swing.GroupLayout(containerPanel); containerPanel.setLayout(containerPanelLayout); containerPanelLayout.setHorizontalGroup( containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 430, Short.MAX_VALUE) + .addGap(0, 0, Short.MAX_VALUE) ); containerPanelLayout.setVerticalGroup( containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -703,6 +706,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { percentageThresholdInputBox.setPreferredSize(new java.awt.Dimension(40, 24)); org.openide.awt.Mnemonics.setLocalizedText(percentageThresholdTextTwo, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.percentageThresholdTextTwo.text_1")); // NOI18N + percentageThresholdTextTwo.setMaximumSize(new java.awt.Dimension(260, 16)); org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.dataSourcesLabel.text")); // NOI18N @@ -713,6 +717,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.searchButton.text")); // NOI18N searchButton.setEnabled(false); searchButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING); + searchButton.setMaximumSize(new java.awt.Dimension(100, 25)); + searchButton.setMinimumSize(new java.awt.Dimension(100, 25)); + searchButton.setPreferredSize(new java.awt.Dimension(100, 25)); searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchButtonActionPerformed(evt); @@ -746,42 +753,44 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(intraCaseRadio, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(20, 20, 20) + .addComponent(intraCaseRadio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(scopeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(37, 37, 37)) .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(percentageThresholdCheck) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(percentageThresholdCheck, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE) + .addGap(1, 1, 1) .addComponent(percentageThresholdInputBox, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(percentageThresholdTextTwo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(percentageThresholdTextTwo, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() - .addComponent(errorText, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(searchButton) + .addComponent(errorText) + .addGap(6, 6, 6) + .addComponent(searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(containerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(commonItemSearchDescription, javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() - .addGap(20, 20, 20) - .addComponent(interCaseRadio, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(commonItemSearchDescription, javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() + .addGap(20, 20, 20) + .addComponent(interCaseRadio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGap(84, 84, 84)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(containerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()))) .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(30, 30, 30) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() - .addContainerGap() - .addComponent(displayResultsLabel)) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGap(30, 30, 30) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseResultsRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(countResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addComponent(caseResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(49, 49, 49)) + .addComponent(countResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(10, 10, 10)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(displayResultsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -800,7 +809,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(percentageThresholdCheck) .addComponent(percentageThresholdInputBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(percentageThresholdTextTwo)) + .addComponent(percentageThresholdTextTwo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(displayResultsLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) @@ -811,9 +820,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(dataSourcesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(searchButton) + .addComponent(searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(errorText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(14, 14, 14)) ); getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form index 15993c7cfecfceb4c987adcf510ac7601d59e986..394f5a3198d43b9c43feaf88ab181523911150b3 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form @@ -56,47 +56,61 @@ </Property> </Properties> - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace pref="242" max="32767" attributes="0"/> - <Component id="applyButton" min="-2" pref="70" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="cancelButton" min="-2" pref="70" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="12" max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="applyButton" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="cancelButton" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="0" pref="4" max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JButton" name="applyButton"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AdvancedConfigurationDialog.applyButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[150, 25]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[71, 25]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[71, 25]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="2" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="cancelButton"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="AdvancedConfigurationDialog.cancelButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[150, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="7" insetsBottom="2" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.Box$Filler" name="filler3"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> </SubComponents> </Container> diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.java b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.java index a62d3a14597a1cdad21db0bbfef247aebd1858a8..ac6dbc8216df727feeb7d0b3eae0673fa46a4979 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.java @@ -70,12 +70,14 @@ public void display(JPanel panel) { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; jSeparator1 = new javax.swing.JSeparator(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4)); jPanel1 = new javax.swing.JPanel(); applyButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); + filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4)); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); @@ -86,35 +88,40 @@ private void initComponents() { jPanel1.setMaximumSize(new java.awt.Dimension(4000, 27)); jPanel1.setMinimumSize(new java.awt.Dimension(100, 27)); jPanel1.setPreferredSize(new java.awt.Dimension(400, 27)); + jPanel1.setLayout(new java.awt.GridBagLayout()); applyButton.setText(org.openide.util.NbBundle.getMessage(AdvancedConfigurationDialog.class, "AdvancedConfigurationDialog.applyButton.text")); // NOI18N + applyButton.setMaximumSize(new java.awt.Dimension(150, 25)); + applyButton.setMinimumSize(new java.awt.Dimension(71, 25)); + applyButton.setPreferredSize(new java.awt.Dimension(71, 25)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0); + jPanel1.add(applyButton, gridBagConstraints); cancelButton.setText(org.openide.util.NbBundle.getMessage(AdvancedConfigurationDialog.class, "AdvancedConfigurationDialog.cancelButton.text")); // NOI18N + cancelButton.setMaximumSize(new java.awt.Dimension(150, 25)); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); - - javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() - .addContainerGap(242, Short.MAX_VALUE) - .addComponent(applyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(12, 12, 12)) - ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(applyButton) - .addComponent(cancelButton)) - .addGap(0, 4, Short.MAX_VALUE)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 7, 2, 12); + jPanel1.add(cancelButton, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 1.0; + jPanel1.add(filler3, gridBagConstraints); getContentPane().add(jPanel1); getContentPane().add(filler2); @@ -131,6 +138,7 @@ private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN- private javax.swing.JButton cancelButton; private javax.swing.Box.Filler filler1; private javax.swing.Box.Filler filler2; + private javax.swing.Box.Filler filler3; private javax.swing.JPanel jPanel1; private javax.swing.JSeparator jSeparator1; // End of variables declaration//GEN-END:variables diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form index fc2e7d551d7184ca46506d52433b39427277425f..5827ce617f8d565d93aaed03b1ec6eca46257f54 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form @@ -75,67 +75,25 @@ </Property> </Properties> - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="pageLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="currentPageLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="ofLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="totalPageLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="41" max="-2" attributes="0"/> - <Component id="pageLabel2" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Component id="prevPageButton" min="-2" pref="23" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> - <Component id="nextPageButton" min="-2" pref="23" max="-2" attributes="0"/> - <EmptySpace pref="383" max="32767" attributes="0"/> - </Group> - <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace pref="280" max="32767" attributes="0"/> - <Component id="artifactLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="84" max="32767" attributes="0"/> - </Group> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="103" alignment="0" groupAlignment="3" attributes="0"> - <Component id="pageLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="currentPageLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="ofLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="totalPageLabel" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <Component id="nextPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/> - <Component id="prevPageButton" alignment="0" min="-2" pref="23" max="-2" attributes="0"/> - <Component id="pageLabel2" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace pref="35" max="32767" attributes="0"/> - </Group> - <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Component id="artifactLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace min="0" pref="58" max="32767" attributes="0"/> - </Group> - </Group> - </Group> - </DimensionLayout> - </Layout> + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JLabel" name="totalPageLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.totalPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 16]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[25, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="ofLabel"> <Properties> @@ -143,6 +101,11 @@ <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.ofLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="currentPageLabel"> <Properties> @@ -150,15 +113,20 @@ <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.currentPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[18, 14]"/> + <Dimension value="[38, 14]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[18, 14]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[18, 14]"/> + <Dimension value="[20, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="7" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="pageLabel"> <Properties> @@ -166,6 +134,11 @@ <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="DataContentViewerArtifact.pageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="nextPageButton"> <Properties> @@ -193,6 +166,11 @@ <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="nextPageButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="6" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="35" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="pageLabel2"> <Properties> @@ -206,6 +184,11 @@ <Dimension value="[29, 14]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="41" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="prevPageButton"> <Properties> @@ -233,8 +216,33 @@ <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="prevPageButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="5" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="35" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="artifactLabel"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="8" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="0" insetsBottom="0" insetsRight="8" anchor="12" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.Box$Filler" name="filler1"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="7" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> </Component> </SubComponents> </Container> diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java index fb80ad86f2f3ade7480e30e9916a7ce01d9e500e..78ccd6e4ec019acac29c0738b91a06a7862fcb7f 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -202,6 +202,7 @@ private void updateColumnSizes() { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; rightClickMenu = new javax.swing.JPopupMenu(); copyMenuItem = new javax.swing.JMenuItem(); @@ -216,6 +217,7 @@ private void initComponents() { pageLabel2 = new javax.swing.JLabel(); prevPageButton = new javax.swing.JButton(); artifactLabel = new javax.swing.JLabel(); + filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); resultsTableScrollPane = new javax.swing.JScrollPane(); copyMenuItem.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.copyMenuItem.text")); // NOI18N @@ -230,17 +232,48 @@ private void initComponents() { jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); jPanel1.setPreferredSize(new java.awt.Dimension(620, 58)); + jPanel1.setLayout(new java.awt.GridBagLayout()); totalPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.totalPageLabel.text")); // NOI18N + totalPageLabel.setMaximumSize(new java.awt.Dimension(40, 16)); + totalPageLabel.setPreferredSize(new java.awt.Dimension(25, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(3, 12, 0, 0); + jPanel1.add(totalPageLabel, gridBagConstraints); ofLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.ofLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(3, 12, 0, 0); + jPanel1.add(ofLabel, gridBagConstraints); currentPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.currentPageLabel.text")); // NOI18N - currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 14)); + currentPageLabel.setMaximumSize(new java.awt.Dimension(38, 14)); currentPageLabel.setMinimumSize(new java.awt.Dimension(18, 14)); - currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 14)); + currentPageLabel.setPreferredSize(new java.awt.Dimension(20, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(4, 7, 0, 0); + jPanel1.add(currentPageLabel, gridBagConstraints); pageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.pageLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(3, 12, 0, 0); + jPanel1.add(pageLabel, gridBagConstraints); nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.nextPageButton.text")); // NOI18N @@ -255,10 +288,23 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { nextPageButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 6; + gridBagConstraints.gridy = 0; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 0, 35, 0); + jPanel1.add(nextPageButton, gridBagConstraints); pageLabel2.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.pageLabel2.text")); // NOI18N pageLabel2.setMaximumSize(new java.awt.Dimension(29, 14)); pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(3, 41, 0, 0); + jPanel1.add(pageLabel2, gridBagConstraints); prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.prevPageButton.text")); // NOI18N @@ -273,51 +319,25 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { prevPageButtonActionPerformed(evt); } }); - - javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addContainerGap() - .addComponent(pageLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(ofLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(totalPageLabel) - .addGap(41, 41, 41) - .addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(383, Short.MAX_VALUE)) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() - .addContainerGap(280, Short.MAX_VALUE) - .addComponent(artifactLabel) - .addContainerGap(84, Short.MAX_VALUE))) - ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(pageLabel) - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(ofLabel) - .addComponent(totalPageLabel)) - .addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(35, Short.MAX_VALUE)) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(artifactLabel) - .addGap(0, 58, Short.MAX_VALUE))) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 5; + gridBagConstraints.gridy = 0; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 5, 35, 0); + jPanel1.add(prevPageButton, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 8; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(3, 0, 0, 8); + jPanel1.add(artifactLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 7; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.1; + jPanel1.add(filler1, gridBagConstraints); jScrollPane1.setViewportView(jPanel1); @@ -359,6 +379,7 @@ private void prevPageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GE private javax.swing.JLabel artifactLabel; private javax.swing.JMenuItem copyMenuItem; private javax.swing.JLabel currentPageLabel; + private javax.swing.Box.Filler filler1; private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JButton nextPageButton; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.form b/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.form index f604a6257e52f813c1df4c8d9556e76cfd6258dd..83e04a9d1b6882c8d96ba760816d949fc060eba1 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.form @@ -3,7 +3,7 @@ <Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Properties> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[625, 465]"/> + <Dimension value="[727, 495]"/> </Property> </Properties> <AuxValues> @@ -37,7 +37,7 @@ <Border info="null"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[625, 465]"/> + <Dimension value="[727, 493]"/> </Property> </Properties> @@ -46,7 +46,7 @@ <Container class="javax.swing.JPanel" name="viewPreferencesPanel"> <Properties> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[625, 465]"/> + <Dimension value="[727, 492]"/> </Property> </Properties> @@ -72,7 +72,7 @@ <Component id="currentCaseSettingsPanel" min="-2" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/> <Component id="currentSessionSettingsPanel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -93,73 +93,103 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> - <EmptySpace min="10" pref="10" max="-2" attributes="0"/> - <Component id="hideOtherUsersTagsCheckbox" min="-2" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="scoColumnsLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="135" max="-2" attributes="0"/> - <Component id="jScrollPane1" min="-2" pref="272" max="-2" attributes="0"/> + <Component id="maxResultsLabel" max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="maxResultsSpinner" min="-2" pref="74" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="325" max="-2" attributes="0"/> </Group> - <Component id="hideOtherUsersTagsLabel" alignment="0" min="-2" max="-2" attributes="0"/> - <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="hideKnownFilesLabel" alignment="0" min="-2" max="-2" attributes="0"/> - <Group type="103" alignment="0" groupAlignment="1" attributes="0"> - <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="hideKnownFilesLabel" max="32767" attributes="0"/> <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="dataSourcesHideSlackCheckbox" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="viewsHideSlackCheckbox" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="hideOtherUsersTagsLabel" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="77" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="scoColumnsLabel" alignment="1" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Component id="hideOtherUsersTagsCheckbox" max="32767" attributes="0"/> + </Group> </Group> + <EmptySpace min="-2" pref="99" max="-2" attributes="0"/> </Group> - <Component id="hideSlackFilesLabel" alignment="0" min="-2" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="dataSourcesHideKnownCheckbox" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="viewsHideKnownCheckbox" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Component id="scoColumnsWrapAroundText" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="93" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Component id="scoColumnsCheckbox" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="14" max="-2" attributes="0"/> </Group> </Group> - </Group> - <Group type="102" attributes="0"> <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> - <Component id="scoColumnsCheckbox" min="-2" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> - <Component id="scoColumnsWrapAroundText" min="-2" max="-2" attributes="0"/> + <Component id="hideSlackFilesLabel" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="51" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="dataSourcesHideSlackCheckbox" alignment="0" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="viewsHideKnownCheckbox" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="103" max="-2" attributes="0"/> + </Group> + <Component id="dataSourcesHideKnownCheckbox" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="viewsHideSlackCheckbox" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="116" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace type="separate" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="displayTimeLabel" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="selectFileLabel" min="-2" max="-2" attributes="0"/> - <Component id="translateTextLabel" alignment="0" min="-2" pref="120" max="-2" attributes="0"/> <Group type="102" attributes="0"> - <EmptySpace min="10" pref="10" max="-2" attributes="0"/> + <Component id="displayTimeLabel" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="91" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="translateTextLabel" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="46" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="selectFileLabel" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="90" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="fileNameTranslationColumnCheckbox" min="-2" max="-2" attributes="0"/> - <Component id="keepCurrentViewerRadioButton" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="useBestViewerRadioButton" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="useLocalTimeRadioButton" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="useAnotherTimeRadioButton" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace min="24" pref="24" max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + </Group> + <Component id="fileNameTranslationColumnCheckbox" max="32767" attributes="0"/> + <Component id="useAnotherTimeRadioButton" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="useLocalTimeRadioButton" alignment="0" max="32767" attributes="0"/> + <Component id="keepCurrentViewerRadioButton" alignment="0" max="32767" attributes="0"/> + <Component id="useBestViewerRadioButton" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="44" max="-2" attributes="0"/> + </Group> </Group> </Group> </Group> </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="maxResultsLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="maxResultsSpinner" min="-2" pref="74" max="-2" attributes="0"/> - </Group> </Group> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -202,7 +232,7 @@ <EmptySpace max="-2" attributes="0"/> <Component id="useLocalTimeRadioButton" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="useAnotherTimeRadioButton" min="-2" max="-2" attributes="0"/> + <Component id="useAnotherTimeRadioButton" min="-2" pref="25" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="jScrollPane1" min="-2" pref="67" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> @@ -365,7 +395,6 @@ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/corecomponents/Bundle.properties" key="ViewPreferencesPanel.scoColumnsCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> - <Property name="horizontalAlignment" type="int" value="11"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scoColumnsCheckboxActionPerformed"/> @@ -453,10 +482,10 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="groupByDataSourceCheckbox" min="-2" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="groupByDataSourceCheckbox" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="474" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -497,9 +526,9 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="hideRejectedResultsCheckbox" min="-2" pref="259" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="hideRejectedResultsCheckbox" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="418" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.java index fb85efcf0ccdadcf1198d8103e3ea45fd32adda9..acb6446c9d42d280300ac51be655d4173cf5f580 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.java @@ -31,7 +31,6 @@ import org.sleuthkit.autopsy.coreutils.TimeZoneUtils; import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent; import org.sleuthkit.autopsy.texttranslation.TextTranslationService; -import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; /** * Panel for configuring view preferences. @@ -180,12 +179,12 @@ private void initComponents() { currentSessionSettingsPanel = new javax.swing.JPanel(); hideRejectedResultsCheckbox = new javax.swing.JCheckBox(); - setPreferredSize(new java.awt.Dimension(625, 465)); + setPreferredSize(new java.awt.Dimension(727, 495)); viewPreferencesScrollPane.setBorder(null); - viewPreferencesScrollPane.setPreferredSize(new java.awt.Dimension(625, 465)); + viewPreferencesScrollPane.setPreferredSize(new java.awt.Dimension(727, 493)); - viewPreferencesPanel.setPreferredSize(new java.awt.Dimension(625, 465)); + viewPreferencesPanel.setPreferredSize(new java.awt.Dimension(727, 492)); globalSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.globalSettingsPanel.border.title"))); // NOI18N @@ -267,7 +266,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { org.openide.awt.Mnemonics.setLocalizedText(scoColumnsLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.scoColumnsLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(scoColumnsCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.scoColumnsCheckbox.text")); // NOI18N - scoColumnsCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); scoColumnsCheckbox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { scoColumnsCheckboxActionPerformed(evt); @@ -310,53 +308,74 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) { .addContainerGap() .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addGap(10, 10, 10) - .addComponent(hideOtherUsersTagsCheckbox)) - .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addComponent(scoColumnsLabel) - .addGap(135, 135, 135) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(hideOtherUsersTagsLabel) + .addComponent(maxResultsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(maxResultsSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(325, 325, 325)) .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(hideKnownFilesLabel) - .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(hideKnownFilesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(hideOtherUsersTagsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(77, 77, 77)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, globalSettingsPanelLayout.createSequentialGroup() + .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(scoColumnsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, globalSettingsPanelLayout.createSequentialGroup() + .addGap(10, 10, 10) + .addComponent(hideOtherUsersTagsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGap(99, 99, 99)) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addGap(32, 32, 32) + .addComponent(scoColumnsWrapAroundText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(93, 93, 93)) .addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGap(10, 10, 10) - .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(dataSourcesHideSlackCheckbox) - .addComponent(viewsHideSlackCheckbox))) - .addComponent(hideSlackFilesLabel)) - .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addGap(10, 10, 10) - .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(dataSourcesHideKnownCheckbox) - .addComponent(viewsHideKnownCheckbox)))) + .addComponent(scoColumnsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(14, 14, 14))) + .addGap(10, 10, 10)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, globalSettingsPanelLayout.createSequentialGroup() + .addComponent(hideSlackFilesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(51, 51, 51)) .addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGap(10, 10, 10) - .addComponent(scoColumnsCheckbox)) - .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addGap(32, 32, 32) - .addComponent(scoColumnsWrapAroundText))) - .addGap(18, 18, 18) + .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(dataSourcesHideSlackCheckbox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, globalSettingsPanelLayout.createSequentialGroup() + .addComponent(viewsHideKnownCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(103, 103, 103)) + .addComponent(dataSourcesHideKnownCheckbox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(viewsHideSlackCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(116, 116, 116))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(displayTimeLabel) - .addComponent(selectFileLabel) - .addComponent(translateTextLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(displayTimeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(91, 91, 91)) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(translateTextLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(46, 46, 46)) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(selectFileLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(90, 90, 90)) .addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(fileNameTranslationColumnCheckbox) - .addComponent(keepCurrentViewerRadioButton) - .addComponent(useBestViewerRadioButton) - .addComponent(useLocalTimeRadioButton) - .addComponent(useAnotherTimeRadioButton))))) - .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addComponent(maxResultsLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(maxResultsSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addGap(24, 24, 24) + .addComponent(jScrollPane1)) + .addComponent(fileNameTranslationColumnCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(useAnotherTimeRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(useLocalTimeRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(keepCurrentViewerRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(useBestViewerRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(44, 44, 44))))))) + .addContainerGap()) ); globalSettingsPanelLayout.setVerticalGroup( globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -396,7 +415,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(useLocalTimeRadioButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(useAnotherTimeRadioButton) + .addComponent(useAnotherTimeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) @@ -425,8 +444,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { currentCaseSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(currentCaseSettingsPanelLayout.createSequentialGroup() .addContainerGap() - .addComponent(groupByDataSourceCheckbox) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(groupByDataSourceCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(474, 474, 474)) ); currentCaseSettingsPanelLayout.setVerticalGroup( currentCaseSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -450,8 +469,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { currentSessionSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(currentSessionSettingsPanelLayout.createSequentialGroup() .addContainerGap() - .addComponent(hideRejectedResultsCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(hideRejectedResultsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(418, 418, 418)) ); currentSessionSettingsPanelLayout.setVerticalGroup( currentSessionSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -480,7 +499,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(currentCaseSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(currentSessionSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(0, 0, 0)) ); viewPreferencesScrollPane.setViewportView(viewPreferencesPanel); diff --git a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form index c7d9f2b4ee8e405e3c009e2c50a311456c1c5bab..09e12b5693dd012169a6b9c6024a3568a001790a 100644 --- a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form @@ -21,7 +21,7 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="pagingPanel" max="32767" attributes="0"/> + <Component id="pagingPanel" pref="0" max="32767" attributes="0"/> <Component id="resultsSplitPane" max="32767" attributes="0"/> </Group> </DimensionLayout> @@ -30,7 +30,7 @@ <Group type="102" alignment="1" attributes="0"> <Component id="pagingPanel" min="-2" max="-2" attributes="0"/> <EmptySpace min="-2" pref="0" max="-2" attributes="0"/> - <Component id="resultsSplitPane" max="32767" attributes="0"/> + <Component id="resultsSplitPane" pref="436" max="32767" attributes="0"/> <EmptySpace min="0" pref="0" max="-2" attributes="0"/> </Group> </Group> @@ -50,53 +50,7 @@ <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> </AuxValues> - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="currentPageLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="pageControlsLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="previousPageButton" min="-2" max="-2" attributes="0"/> - <EmptySpace min="0" pref="0" max="-2" attributes="0"/> - <Component id="nextPageButton" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="gotoPageLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="gotoPageField" min="-2" pref="64" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="pageSizeLabel" min="-2" pref="52" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="pageSizeComboBox" min="-2" pref="55" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="nextPageButton" alignment="1" min="-2" max="-2" attributes="0"/> - <Group type="103" alignment="1" groupAlignment="0" attributes="0"> - <Component id="previousPageButton" alignment="1" min="-2" max="-2" attributes="0"/> - <Component id="currentPageLabel" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="pageControlsLabel" alignment="1" min="-2" max="-2" attributes="0"/> - </Group> - <Group type="103" alignment="1" groupAlignment="3" attributes="0"> - <Component id="gotoPageLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="gotoPageField" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="pageSizeLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="pageSizeComboBox" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JButton" name="previousPageButton"> <Properties> @@ -118,6 +72,11 @@ <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="previousPageButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="0" gridWidth="1" gridHeight="2" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="12" insetsBottom="6" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="currentPageLabel"> <Properties> @@ -125,15 +84,20 @@ <ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="ResultsPanel.currentPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[90, 23]"/> + <Dimension value="[190, 23]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[90, 23]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[90, 23]"/> + <Dimension value="[100, 23]"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="14" insetsBottom="6" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="nextPageButton"> <Properties> @@ -155,74 +119,105 @@ <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="nextPageButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="0" gridWidth="1" gridHeight="2" fill="0" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="0" insetsBottom="6" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="pageControlsLabel"> <Properties> + <Property name="horizontalAlignment" type="int" value="11"/> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="ResultsPanel.pageControlsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[33, 23]"/> + <Dimension value="[133, 23]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[33, 23]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[33, 23]"/> + <Dimension value="[60, 23]"/> </Property> </Properties> <AuxValues> <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="18" insetsBottom="6" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="gotoPageLabel"> <Properties> + <Property name="horizontalAlignment" type="int" value="11"/> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="ResultsPanel.gotoPageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[70, 23]"/> + <Dimension value="[170, 23]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[70, 23]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[70, 23]"/> + <Dimension value="[100, 23]"/> </Property> </Properties> <AuxValues> <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="6" gridY="0" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="18" insetsBottom="6" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JTextField" name="gotoPageField"> <Properties> <Property name="enabled" type="boolean" value="false"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[26, 22]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="gotoPageFieldActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="7" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="pageSizeLabel"> <Properties> + <Property name="horizontalAlignment" type="int" value="11"/> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/filequery/Bundle.properties" key="ResultsPanel.pageSizeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[60, 23]"/> + <Dimension value="[160, 23]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[60, 23]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[60, 23]"/> + <Dimension value="[90, 23]"/> </Property> </Properties> <AuxValues> <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="9" gridY="0" gridWidth="1" gridHeight="2" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="18" insetsBottom="6" insetsRight="0" anchor="12" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JComboBox" name="pageSizeComboBox"> <Properties> @@ -239,6 +234,79 @@ <AuxValues> <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<Integer>"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="10" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="5" insetsBottom="0" insetsRight="277" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.Box$Filler" name="filler1"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="11" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.1" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.Box$Filler" name="filler2"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.Box$Filler" name="filler3"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="5" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.Box$Filler" name="filler4"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="8" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> </SubComponents> </Container> @@ -282,7 +350,7 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <EmptySpace min="0" pref="775" max="32767" attributes="0"/> + <EmptySpace min="0" pref="779" max="32767" attributes="0"/> <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> <Component id="instancesScrollPane" alignment="0" max="32767" attributes="0"/> </Group> diff --git a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java index 7a750f50eb0e434955f0a0167e5693163218d6a0..0acc2e1bf3556599571ce51f75eeceb435a68c12 100644 --- a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java @@ -410,6 +410,7 @@ private void updateControls() { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; javax.swing.JPanel pagingPanel = new javax.swing.JPanel(); previousPageButton = new javax.swing.JButton(); @@ -420,6 +421,10 @@ private void initComponents() { gotoPageField = new javax.swing.JTextField(); javax.swing.JLabel pageSizeLabel = new javax.swing.JLabel(); pageSizeComboBox = new javax.swing.JComboBox<>(); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); javax.swing.JSplitPane resultsSplitPane = new javax.swing.JSplitPane(); javax.swing.JPanel instancesPanel = new javax.swing.JPanel(); javax.swing.JScrollPane instancesScrollPane = new javax.swing.JScrollPane(); @@ -429,6 +434,7 @@ private void initComponents() { setPreferredSize(new java.awt.Dimension(777, 475)); pagingPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + pagingPanel.setLayout(new java.awt.GridBagLayout()); previousPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N previousPageButton.setBorder(null); @@ -441,11 +447,26 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { previousPageButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 12, 6, 0); + pagingPanel.add(previousPageButton, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(currentPageLabel, org.openide.util.NbBundle.getMessage(ResultsPanel.class, "ResultsPanel.currentPageLabel.text")); // NOI18N - currentPageLabel.setMaximumSize(new java.awt.Dimension(90, 23)); + currentPageLabel.setMaximumSize(new java.awt.Dimension(190, 23)); currentPageLabel.setMinimumSize(new java.awt.Dimension(90, 23)); - currentPageLabel.setPreferredSize(new java.awt.Dimension(90, 23)); + currentPageLabel.setPreferredSize(new java.awt.Dimension(100, 23)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 14, 6, 0); + pagingPanel.add(currentPageLabel, gridBagConstraints); nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N nextPageButton.setBorder(null); @@ -458,28 +479,70 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { nextPageButtonActionPerformed(evt); } }); - + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 0, 6, 0); + pagingPanel.add(nextPageButton, gridBagConstraints); + + pageControlsLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); org.openide.awt.Mnemonics.setLocalizedText(pageControlsLabel, org.openide.util.NbBundle.getMessage(ResultsPanel.class, "ResultsPanel.pageControlsLabel.text")); // NOI18N - pageControlsLabel.setMaximumSize(new java.awt.Dimension(33, 23)); + pageControlsLabel.setMaximumSize(new java.awt.Dimension(133, 23)); pageControlsLabel.setMinimumSize(new java.awt.Dimension(33, 23)); - pageControlsLabel.setPreferredSize(new java.awt.Dimension(33, 23)); - + pageControlsLabel.setPreferredSize(new java.awt.Dimension(60, 23)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(6, 18, 6, 0); + pagingPanel.add(pageControlsLabel, gridBagConstraints); + + gotoPageLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); org.openide.awt.Mnemonics.setLocalizedText(gotoPageLabel, org.openide.util.NbBundle.getMessage(ResultsPanel.class, "ResultsPanel.gotoPageLabel.text")); // NOI18N - gotoPageLabel.setMaximumSize(new java.awt.Dimension(70, 23)); + gotoPageLabel.setMaximumSize(new java.awt.Dimension(170, 23)); gotoPageLabel.setMinimumSize(new java.awt.Dimension(70, 23)); - gotoPageLabel.setPreferredSize(new java.awt.Dimension(70, 23)); + gotoPageLabel.setPreferredSize(new java.awt.Dimension(100, 23)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 6; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(6, 18, 6, 0); + pagingPanel.add(gotoPageLabel, gridBagConstraints); gotoPageField.setEnabled(false); + gotoPageField.setPreferredSize(new java.awt.Dimension(26, 22)); gotoPageField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { gotoPageFieldActionPerformed(evt); } }); - + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 7; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 5, 0, 0); + pagingPanel.add(gotoPageField, gridBagConstraints); + + pageSizeLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); org.openide.awt.Mnemonics.setLocalizedText(pageSizeLabel, org.openide.util.NbBundle.getMessage(ResultsPanel.class, "ResultsPanel.pageSizeLabel.text")); // NOI18N - pageSizeLabel.setMaximumSize(new java.awt.Dimension(60, 23)); + pageSizeLabel.setMaximumSize(new java.awt.Dimension(160, 23)); pageSizeLabel.setMinimumSize(new java.awt.Dimension(60, 23)); - pageSizeLabel.setPreferredSize(new java.awt.Dimension(60, 23)); + pageSizeLabel.setPreferredSize(new java.awt.Dimension(90, 23)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 9; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(6, 18, 6, 0); + pagingPanel.add(pageSizeLabel, gridBagConstraints); pageSizeComboBox.setModel(new DefaultComboBoxModel<Integer>(new Integer[] {25,50,75,100,125,150,175,200})); pageSizeComboBox.setSelectedIndex(3); @@ -488,47 +551,34 @@ public void itemStateChanged(java.awt.event.ItemEvent evt) { pageSizeChanged(evt); } }); - - javax.swing.GroupLayout pagingPanelLayout = new javax.swing.GroupLayout(pagingPanel); - pagingPanel.setLayout(pagingPanelLayout); - pagingPanelLayout.setHorizontalGroup( - pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pagingPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(pageControlsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(previousPageButton) - .addGap(0, 0, 0) - .addComponent(nextPageButton) - .addGap(18, 18, 18) - .addComponent(gotoPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(gotoPageField, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(pageSizeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(pageSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); - pagingPanelLayout.setVerticalGroup( - pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pagingPanelLayout.createSequentialGroup() - .addGap(4, 4, 4) - .addGroup(pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(nextPageButton, javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(previousPageButton, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageControlsLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(gotoPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(gotoPageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageSizeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(4, 4, 4)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 10; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 5, 0, 277); + pagingPanel.add(pageSizeComboBox, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 11; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.1; + pagingPanel.add(filler1, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + pagingPanel.add(filler2, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 5; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + pagingPanel.add(filler3, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 8; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + pagingPanel.add(filler4, gridBagConstraints); resultsSplitPane.setDividerLocation(380); resultsSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); @@ -553,7 +603,7 @@ public void itemStateChanged(java.awt.event.ItemEvent evt) { instancesPanel.setLayout(instancesPanelLayout); instancesPanelLayout.setHorizontalGroup( instancesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 775, Short.MAX_VALUE) + .addGap(0, 779, Short.MAX_VALUE) .addGroup(instancesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(instancesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); @@ -576,7 +626,7 @@ public void itemStateChanged(java.awt.event.ItemEvent evt) { this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pagingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pagingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(resultsSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( @@ -584,7 +634,7 @@ public void itemStateChanged(java.awt.event.ItemEvent evt) { .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(pagingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) - .addComponent(resultsSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(resultsSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 436, Short.MAX_VALUE) .addGap(0, 0, 0)) ); }// </editor-fold>//GEN-END:initComponents diff --git a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form index a981e398262e34c61647d76fbc52fd54860ff316..9d613f0cf7b55688a5e38721c35d5bf42991d3bc 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form @@ -21,15 +21,15 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> + <Group type="102" attributes="0"> <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="noteLabel" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="noteLabel" max="32767" attributes="0"/> <Component id="verifyHashesCheckbox" min="-2" max="-2" attributes="0"/> - <Component id="computeHashesCheckbox" min="-2" max="-2" attributes="0"/> <Component id="ingestSettingsLabel" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="computeHashesPanel" alignment="0" max="32767" attributes="0"/> </Group> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace pref="13" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -39,32 +39,23 @@ <EmptySpace max="-2" attributes="0"/> <Component id="ingestSettingsLabel" min="-2" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="computeHashesCheckbox" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="computeHashesPanel" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> <Component id="verifyHashesCheckbox" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> <Component id="noteLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="53" max="32767" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> </Layout> <SubComponents> - <Component class="javax.swing.JCheckBox" name="computeHashesCheckbox"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="org/sleuthkit/autopsy/centralrepository/ingestmodule/Bundle.properties" key="DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="computeHashesCheckboxActionPerformed"/> - </Events> - </Component> <Component class="javax.swing.JCheckBox" name="verifyHashesCheckbox"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties" key="DataSourceIntegrityIngestSettingsPanel.verifyHashesCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="focusable" type="boolean" value="false"/> </Properties> </Component> <Component class="javax.swing.JLabel" name="ingestSettingsLabel"> @@ -86,5 +77,47 @@ </Property> </Properties> </Component> + <Container class="javax.swing.JPanel" name="computeHashesPanel"> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> + <SubComponents> + <Component class="javax.swing.JCheckBox" name="computeHashesCheckbox"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextArea" name="computeHashesTextArea"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="f0" green="f0" red="f0" type="rgb"/> + </Property> + <Property name="columns" type="int" value="20"/> + <Property name="lineWrap" type="boolean" value="true"/> + <Property name="rows" type="int" value="2"/> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties" key="DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="wrapStyleWord" type="boolean" value="true"/> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="null"/> + </Property> + <Property name="focusable" type="boolean" value="false"/> + <Property name="opaque" type="boolean" value="false"/> + <Property name="requestFocusEnabled" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="computeHashesTextAreaMouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="1" gridY="0" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> + </Container> </SubComponents> </Form> diff --git a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java index 57e6cb8577df8e247ddea62da6b3543e758a87b2..2c83297673b2fc69dfb2b7ab237b3ac88a364ba2 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java @@ -1,7 +1,7 @@ /* * Central Repository * - * Copyright 2018 Basis Technology Corp. + * Copyright 2018-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,7 +30,7 @@ final class DataSourceIntegrityIngestSettingsPanel extends IngestModuleIngestJob /** * Creates new form DataSourceIntegrityIngestSettingsPanel */ - public DataSourceIntegrityIngestSettingsPanel(DataSourceIntegrityIngestSettings settings) { + DataSourceIntegrityIngestSettingsPanel(DataSourceIntegrityIngestSettings settings) { initComponents(); customizeComponents(settings); } @@ -58,40 +58,70 @@ public IngestModuleIngestJobSettings getSettings() { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; - computeHashesCheckbox = new javax.swing.JCheckBox(); verifyHashesCheckbox = new javax.swing.JCheckBox(); ingestSettingsLabel = new javax.swing.JLabel(); noteLabel = new javax.swing.JLabel(); + computeHashesPanel = new javax.swing.JPanel(); + computeHashesCheckbox = new javax.swing.JCheckBox(); + computeHashesTextArea = new javax.swing.JTextArea(); setPreferredSize(new java.awt.Dimension(300, 155)); - org.openide.awt.Mnemonics.setLocalizedText(computeHashesCheckbox, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text")); // NOI18N - computeHashesCheckbox.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - computeHashesCheckboxActionPerformed(evt); - } - }); - org.openide.awt.Mnemonics.setLocalizedText(verifyHashesCheckbox, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.verifyHashesCheckbox.text")); // NOI18N + verifyHashesCheckbox.setFocusable(false); ingestSettingsLabel.setFont(ingestSettingsLabel.getFont().deriveFont(ingestSettingsLabel.getFont().getStyle() | java.awt.Font.BOLD)); org.openide.awt.Mnemonics.setLocalizedText(ingestSettingsLabel, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.ingestSettingsLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(noteLabel, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.noteLabel.text")); // NOI18N + computeHashesPanel.setLayout(new java.awt.GridBagLayout()); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + computeHashesPanel.add(computeHashesCheckbox, gridBagConstraints); + + computeHashesTextArea.setEditable(false); + computeHashesTextArea.setBackground(new java.awt.Color(240, 240, 240)); + computeHashesTextArea.setColumns(20); + computeHashesTextArea.setLineWrap(true); + computeHashesTextArea.setRows(2); + computeHashesTextArea.setText(org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text")); // NOI18N + computeHashesTextArea.setWrapStyleWord(true); + computeHashesTextArea.setBorder(null); + computeHashesTextArea.setFocusable(false); + computeHashesTextArea.setOpaque(false); + computeHashesTextArea.setRequestFocusEnabled(false); + computeHashesTextArea.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + computeHashesTextAreaMouseClicked(evt); + } + }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(3, 0, 0, 0); + computeHashesPanel.add(computeHashesTextArea, gridBagConstraints); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(noteLabel) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(noteLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(verifyHashesCheckbox) - .addComponent(computeHashesCheckbox) - .addComponent(ingestSettingsLabel)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(ingestSettingsLabel) + .addComponent(computeHashesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(13, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -99,21 +129,23 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addContainerGap() .addComponent(ingestSettingsLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(computeHashesCheckbox) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(computeHashesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(verifyHashesCheckbox) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGap(18, 18, 18) .addComponent(noteLabel) - .addContainerGap(53, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// </editor-fold>//GEN-END:initComponents - private void computeHashesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_computeHashesCheckboxActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_computeHashesCheckboxActionPerformed + private void computeHashesTextAreaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_computeHashesTextAreaMouseClicked + computeHashesCheckbox.doClick(); + }//GEN-LAST:event_computeHashesTextAreaMouseClicked // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox computeHashesCheckbox; + private javax.swing.JPanel computeHashesPanel; + private javax.swing.JTextArea computeHashesTextArea; private javax.swing.JLabel ingestSettingsLabel; private javax.swing.JLabel noteLabel; private javax.swing.JCheckBox verifyHashesCheckbox; diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java index 2c6b7322f92403a4bb748f19fbf055a49197fdc2..b387ba7d40cc170f4108b03ea85da790b7ad23fe 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -50,7 +50,7 @@ enum BUTTON_PRESSED { } private static final long serialVersionUID = 1L; - private static final Dimension BUTTON_SIZE = new Dimension(65, 23); + private static final Dimension BUTTON_SIZE = new Dimension(85, 23); private FileType fileType; final private AddFileTypePanel addMimeTypePanel; private BUTTON_PRESSED result; @@ -61,9 +61,10 @@ enum BUTTON_PRESSED { * Creates a dialog for creating a file type */ @Messages({"AddMimeTypedialog.title=File Type"}) - AddFileTypeDialog() { + AddFileTypeDialog() { super(WindowManager.getDefault().getMainWindow(), Bundle.AddMimeTypedialog_title(), true); addMimeTypePanel = new AddFileTypePanel(); + init(); } /** @@ -74,23 +75,18 @@ enum BUTTON_PRESSED { AddFileTypeDialog(FileType fileType) { super(WindowManager.getDefault().getMainWindow(), Bundle.AddMimeTypedialog_title(), true); addMimeTypePanel = new AddFileTypePanel(fileType); + init(); } /** - * Displays the add file type dialog. - * + * Do initialization of dialog components. */ - @NbBundle.Messages({ + @NbBundle.Messages({ "AddMimeTypeDialog.addButton.title=OK", "AddMimeTypeDialog.cancelButton.title=Cancel"}) - void display() { + private void init() { setLayout(new BorderLayout()); - /** - * Center the dialog. - */ - setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); - /** * Get the default or saved ingest job settings for this context and use * them to create and add an ingest job settings panel. @@ -120,15 +116,15 @@ public void actionPerformed(ActionEvent e) { //setting both max and preffered size appears to be necessary to change the button size cancelButton.setMaximumSize(BUTTON_SIZE); cancelButton.setPreferredSize(BUTTON_SIZE); - + // Put the buttons in their own panel, under the settings panel. JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS)); - buttonPanel.add(okButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 35), new Dimension(10, 35), new Dimension(10, 35))); buttonPanel.add(cancelButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 35), new Dimension(10, 35), new Dimension(10, 35))); + buttonPanel.validate(); add(buttonPanel, BorderLayout.LINE_END); /** @@ -150,13 +146,23 @@ public void propertyChange(PropertyChangeEvent evt) { } }); enableOkButton(); + setResizable(false); + pack(); + } + + /** + * Displays the add file type dialog. + * + */ + void display() { + /** + * Center the dialog. + */ + setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); /** * Show the dialog. */ - pack(); - setResizable(false); setVisible(true); - } /** diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.form b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.form index 325270ea0b332c646b5d443ec67e7f9c437f242a..7dce458862ea8de9126e9965acee1a0f960c0ed9 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.form @@ -47,7 +47,7 @@ <Component id="jLabel1" min="-2" max="-2" attributes="0"/> <Component id="postHitCheckBox" alignment="0" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <EmptySpace min="0" pref="0" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> <EmptySpace min="71" pref="71" max="-2" attributes="0"/> @@ -85,7 +85,7 @@ <Component id="setNameLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="setNameTextField" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java index c00363bc5638ec5cc9d2dc6f73566f4bc6774f04..f7f1da8755f66d10451ce15a7d36fe47e0f51847 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -312,7 +312,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(postHitCheckBox)) - .addGap(0, 0, Short.MAX_VALUE)) + .addGap(0, 0, 0)) .addGroup(layout.createSequentialGroup() .addGap(71, 71, 71) .addComponent(mimeFormatLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) @@ -342,7 +342,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(setNameLabel) .addComponent(setNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents @@ -350,6 +350,7 @@ private void editSigButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN if (evt.getSource().equals(this.editSigButton) && this.signatureList.getSelectedValue() != null) { int selected = this.signatureList.getSelectedIndex(); this.addSigDialog = new AddFileTypeSignatureDialog(this.signatureList.getSelectedValue()); + this.addSigDialog.display(false); if (addSigDialog.getResult() == BUTTON_PRESSED.OK) { signaturesListModel.removeElementAt(selected); this.signaturesListModel.add(selected, this.addSigDialog.getSignature()); @@ -370,6 +371,7 @@ private void deleteSigButtonActionPerformed(java.awt.event.ActionEvent evt) {//G private void addSigButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addSigButtonActionPerformed if (evt.getSource().equals(this.addSigButton)) { this.addSigDialog = new AddFileTypeSignatureDialog(); + this.addSigDialog.display(true); if (addSigDialog.getResult() == AddFileTypeSignatureDialog.BUTTON_PRESSED.OK) { signaturesListModel.addElement(this.addSigDialog.getSignature()); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java index 770d97ff876aaa8ff695025af3bb47c122c598a0..c8f10e4e367275eb6cc56c0bc86301d11256d5a1 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -42,7 +42,7 @@ final class AddFileTypeSignatureDialog extends JDialog { private static final long serialVersionUID = 1L; - private static final Dimension BUTTON_SIZE = new Dimension(65, 23); + private static final Dimension BUTTON_SIZE = new Dimension(85, 23); private final AddFileTypeSignaturePanel addFileTypeSigPanel; private static final String TITLE = NbBundle.getMessage(RunIngestModulesAction.class, "RunIngestModulesAction.name"); private Signature signature; @@ -63,7 +63,7 @@ enum BUTTON_PRESSED { AddFileTypeSignatureDialog() { super(WindowManager.getDefault().getMainWindow(), TITLE, true); this.addFileTypeSigPanel = new AddFileTypeSignaturePanel(); - this.display(true); + init(); } /** @@ -74,43 +74,12 @@ enum BUTTON_PRESSED { AddFileTypeSignatureDialog(Signature toEdit) { super(WindowManager.getDefault().getMainWindow(), TITLE, true); this.addFileTypeSigPanel = new AddFileTypeSignaturePanel(toEdit); - this.display(false); + init(); } - /** - * Gets the signature that was created by this dialog. - * - * @return the signature. - */ - public Signature getSignature() { - return signature; - } - - /** - * Gets which button was pressed (OK or Cancel). - * - * @return The result. - */ - public BUTTON_PRESSED getResult() { - return result; - } - - /** - * Displays the add signature dialog. - * - * @param add Whether or not this is an edit or a new window. - */ - @Messages({ - "AddFileTypeSignatureDialog.addButton.title=OK", - "AddFileTypeSignatureDialog.cancelButton.title=Cancel"}) - void display(boolean add) { + private void init() { setLayout(new BorderLayout()); - /** - * Center the dialog. - */ - setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); - /** * Get the default or saved ingest job settings for this context and use * them to create and add an ingest job settings panel. @@ -141,14 +110,15 @@ public void actionPerformed(ActionEvent e) { //setting both max and preffered size appears to be necessary to change the button size cancelButton.setMaximumSize(BUTTON_SIZE); cancelButton.setPreferredSize(BUTTON_SIZE); - + // Put the buttons in their own panel, under the settings panel. JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS)); buttonPanel.add(okButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 35), new Dimension(10, 35), new Dimension(10, 35))); buttonPanel.add(cancelButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 35), new Dimension(10, 35), new Dimension(10, 35))); + buttonPanel.validate(); add(buttonPanel, BorderLayout.LINE_END); /** @@ -161,12 +131,44 @@ public void windowClosing(WindowEvent e) { doButtonAction(false); } }); + setResizable(false); + pack(); + } + /** + * Gets the signature that was created by this dialog. + * + * @return the signature. + */ + public Signature getSignature() { + return signature; + } + + /** + * Gets which button was pressed (OK or Cancel). + * + * @return The result. + */ + public BUTTON_PRESSED getResult() { + return result; + } + + /** + * Displays the add signature dialog. + * + * @param add Whether or not this is an edit or a new window. + */ + @Messages({ + "AddFileTypeSignatureDialog.addButton.title=OK", + "AddFileTypeSignatureDialog.cancelButton.title=Cancel"}) + void display(boolean add) { + /** + * Center the dialog. + */ + setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); /** * Show the dialog. */ - pack(); - setResizable(false); setVisible(true); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.form b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.form index f61fb16aae04822a84d82ba9249f352305600872..1dddd44b1d25f0b4a1235872f8089b10214dd2a7 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.form @@ -72,7 +72,7 @@ <Component id="offsetRelativeToComboBox" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="offsetRelativeToLabel" alignment="3" min="-2" max="-2" attributes="0"/> </Group> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java index 6be6a71fe0dc54b26b6df10dd01efd68e7d2eea1..88c181c0fa5c551481a0ae9f7be8e9e66454f030 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -283,7 +283,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(offsetRelativeToComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(offsetRelativeToLabel)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form index 08f79464526d9b3eb55de5679a7cd559cea9cfd5..18cd9b97afe308d9b404af76d5bf36bfa14f6567 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form @@ -11,90 +11,28 @@ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-44,0,0,2,-52"/> </AuxValues> - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="instructionsScrollPane" max="32767" attributes="0"/> - <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Group type="102" attributes="0"> - <Component id="authenticationKeyLabel" min="-2" pref="100" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="authenticationKeyField" min="-2" pref="486" max="-2" attributes="0"/> - </Group> - <Component id="warningLabel" min="-2" pref="551" max="-2" attributes="0"/> - <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="targetLanguageLabel" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="testButton" alignment="0" min="-2" pref="79" max="-2" attributes="0"/> - </Group> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="untranslatedLabel" min="-2" pref="66" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="testUntranslatedTextField" min="-2" pref="140" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="resultLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="testResultValueLabel" max="32767" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="targetLanguageComboBox" max="32767" attributes="0"/> - <EmptySpace min="-2" pref="276" max="-2" attributes="0"/> - </Group> - </Group> - </Group> - </Group> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> - </Group> - <EmptySpace max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="1" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="instructionsScrollPane" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="authenticationKeyField" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="authenticationKeyLabel" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="targetLanguageLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="targetLanguageComboBox" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="testButton" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="testUntranslatedTextField" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="untranslatedLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="resultLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="testResultValueLabel" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace max="-2" attributes="0"/> - <Component id="warningLabel" min="-2" pref="18" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JTextField" name="authenticationKeyField"> <Properties> <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="BingTranslatorSettingsPanel.authenticationKeyField.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[800, 22]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[163, 22]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="1" gridWidth="7" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="14" insetsLeft="5" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="warningLabel"> <Properties> @@ -105,6 +43,11 @@ <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="GoogleTranslatorSettingsPanel.warningLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="4" gridWidth="10" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="7" insetsLeft="12" insetsBottom="6" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="testButton"> <Properties> @@ -115,6 +58,11 @@ <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="testButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="targetLanguageLabel"> <Properties> @@ -122,6 +70,11 @@ <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="BingTranslatorSettingsPanel.targetLanguageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="2" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="10" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JComboBox" name="targetLanguageComboBox"> <Properties> @@ -136,13 +89,29 @@ <AuxValues> <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<LanguageWrapper>"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="2" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JTextField" name="testUntranslatedTextField"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="DEFUALT_TEST_STRING" type="code"/> </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[160, 22]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[160, 22]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="3" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="untranslatedLabel"> <Properties> @@ -150,6 +119,11 @@ <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="BingTranslatorSettingsPanel.untranslatedLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="10" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="resultLabel"> <Properties> @@ -157,20 +131,41 @@ <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="BingTranslatorSettingsPanel.resultLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="6" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="10" insetsLeft="10" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="testResultValueLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="BingTranslatorSettingsPanel.testResultValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[600, 22]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="7" gridY="3" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="7" insetsBottom="0" insetsRight="12" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="authenticationKeyLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="BingTranslatorSettingsPanel.authenticationKeyLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 16]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="1" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="16" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Container class="javax.swing.JScrollPane" name="instructionsScrollPane"> <Properties> @@ -180,10 +175,18 @@ </Border> </Property> <Property name="horizontalScrollBarPolicy" type="int" value="31"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[168, 80]"/> + </Property> </Properties> <AuxValues> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="10" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="13" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="1.0"/> + </Constraint> + </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <SubComponents> @@ -195,14 +198,38 @@ </Property> <Property name="columns" type="int" value="20"/> <Property name="lineWrap" type="boolean" value="true"/> - <Property name="rows" type="int" value="2"/> + <Property name="rows" type="int" value="4"/> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="BingTranslatorSettingsPanel.instructionsTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="wrapStyleWord" type="boolean" value="true"/> + <Property name="caretPosition" type="int" value="0"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1000, 200]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[164, 78]"/> + </Property> </Properties> </Component> </SubComponents> </Container> + <Component class="javax.swing.Box$Filler" name="filler1"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="10" gridY="0" gridWidth="1" gridHeight="5" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.6" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> </SubComponents> </Form> diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java index 5b34605403136ce35e71d2df8572b446cfb0be35..621aec9d2a3f4fb3e4d84bf3fe0af534cf47b130 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java @@ -1,7 +1,7 @@ /* * Autopsy * - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -127,6 +127,7 @@ private void selectLanguageByCode(String code) { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; authenticationKeyField = new javax.swing.JTextField(); warningLabel = new javax.swing.JLabel(); @@ -140,11 +141,33 @@ private void initComponents() { authenticationKeyLabel = new javax.swing.JLabel(); instructionsScrollPane = new javax.swing.JScrollPane(); instructionsTextArea = new javax.swing.JTextArea(); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + + setLayout(new java.awt.GridBagLayout()); authenticationKeyField.setToolTipText(org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.authenticationKeyField.toolTipText")); // NOI18N + authenticationKeyField.setMaximumSize(new java.awt.Dimension(800, 22)); + authenticationKeyField.setPreferredSize(new java.awt.Dimension(163, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 7; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(14, 5, 0, 12); + add(authenticationKeyField, gridBagConstraints); warningLabel.setForeground(new java.awt.Color(255, 0, 0)); org.openide.awt.Mnemonics.setLocalizedText(warningLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.warningLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 4; + gridBagConstraints.gridwidth = 10; + gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(7, 12, 6, 0); + add(warningLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(testButton, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.testButton.text")); // NOI18N testButton.addActionListener(new java.awt.event.ActionListener() { @@ -152,8 +175,23 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { testButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 12, 0, 0); + add(testButton, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(targetLanguageLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.targetLanguageLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 12, 0, 0); + add(targetLanguageLabel, gridBagConstraints); targetLanguageComboBox.setEnabled(false); targetLanguageComboBox.addItemListener(new java.awt.event.ItemListener() { @@ -161,88 +199,99 @@ public void itemStateChanged(java.awt.event.ItemEvent evt) { targetLanguageComboBoxSelected(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 5, 0, 0); + add(targetLanguageComboBox, gridBagConstraints); testUntranslatedTextField.setText(DEFUALT_TEST_STRING); + testUntranslatedTextField.setMinimumSize(new java.awt.Dimension(160, 22)); + testUntranslatedTextField.setPreferredSize(new java.awt.Dimension(160, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 5, 0, 0); + add(testUntranslatedTextField, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(untranslatedLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.untranslatedLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 5, 0, 0); + add(untranslatedLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(resultLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.resultLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 6; + gridBagConstraints.gridy = 3; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 0); + add(resultLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(testResultValueLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.testResultValueLabel.text")); // NOI18N + testResultValueLabel.setMaximumSize(new java.awt.Dimension(600, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 7; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(4, 7, 0, 12); + add(testResultValueLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(authenticationKeyLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.authenticationKeyLabel.text")); // NOI18N + authenticationKeyLabel.setMaximumSize(new java.awt.Dimension(200, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(16, 12, 0, 0); + add(authenticationKeyLabel, gridBagConstraints); instructionsScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); instructionsScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + instructionsScrollPane.setPreferredSize(new java.awt.Dimension(168, 80)); instructionsTextArea.setEditable(false); instructionsTextArea.setBackground(new java.awt.Color(240, 240, 240)); instructionsTextArea.setColumns(20); instructionsTextArea.setLineWrap(true); - instructionsTextArea.setRows(2); + instructionsTextArea.setRows(4); instructionsTextArea.setText(org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.instructionsTextArea.text")); // NOI18N instructionsTextArea.setWrapStyleWord(true); + instructionsTextArea.setCaretPosition(0); + instructionsTextArea.setMaximumSize(new java.awt.Dimension(1000, 200)); + instructionsTextArea.setPreferredSize(new java.awt.Dimension(164, 78)); instructionsScrollPane.setViewportView(instructionsTextArea); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(instructionsScrollPane) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addGroup(layout.createSequentialGroup() - .addComponent(authenticationKeyLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(authenticationKeyField, javax.swing.GroupLayout.PREFERRED_SIZE, 486, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 551, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(targetLanguageLabel) - .addComponent(testButton, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(untranslatedLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testUntranslatedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(resultLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testResultValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addComponent(targetLanguageComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGap(276, 276, 276))))) - .addGap(0, 0, Short.MAX_VALUE))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap() - .addComponent(instructionsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(authenticationKeyField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(authenticationKeyLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(targetLanguageLabel) - .addComponent(targetLanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(testButton) - .addComponent(testUntranslatedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(untranslatedLabel) - .addComponent(resultLabel) - .addComponent(testResultValueLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 10; + gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.weighty = 1.0; + gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 0); + add(instructionsScrollPane, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 10; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.6; + add(filler1, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents @Messages({"BingTranslatorSettingsPanel.warning.invalidKey=Invalid translation authentication key"}) diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form index 33fca620d1dd52512e409b0594342e050a9cb606..67bf16ebf95e19082dd4217bb360fb4e6483c214 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form @@ -11,116 +11,63 @@ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-44,0,0,2,-52"/> </AuxValues> - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="instructionsScrollPane" max="32767" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - </Group> - <Group type="102" attributes="0"> - <Component id="warningLabel" min="-2" pref="551" max="-2" attributes="0"/> - <EmptySpace min="77" max="32767" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="1" max="-2" attributes="0"> - <Component id="testButton" max="32767" attributes="0"/> - <Component id="credentialsLabel" alignment="0" max="32767" attributes="0"/> - <Component id="targetLanguageLabel" alignment="0" max="32767" attributes="0"/> - </Group> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="credentialsPathField" max="32767" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="browseButton" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="14" max="-2" attributes="0"/> - </Group> - <Group type="102" attributes="0"> - <Component id="targetLanguageComboBox" min="-2" pref="317" max="-2" attributes="0"/> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> - </Group> - </Group> - <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> - <Component id="untranslatedLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="testUntranslatedTextField" min="-2" pref="140" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="resultLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="testResultValueLabel" max="32767" attributes="0"/> - </Group> - </Group> - </Group> - </Group> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> - <Component id="instructionsScrollPane" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="credentialsLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="credentialsPathField" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="targetLanguageLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="targetLanguageComboBox" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="testButton" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="testUntranslatedTextField" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="untranslatedLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="resultLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="testResultValueLabel" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="warningLabel" min="-2" pref="18" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JLabel" name="credentialsLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="GoogleTranslatorSettingsPanel.credentialsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 16]"/> + </Property> </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="1" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="17" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JTextField" name="credentialsPathField"> <Properties> <Property name="editable" type="boolean" value="false"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[700, 22]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[100, 22]"/> + </Property> </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="credentialsPathFieldActionPerformed"/> - </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="1" gridWidth="6" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="14" insetsLeft="7" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="browseButton"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="GoogleTranslatorSettingsPanel.browseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[100, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="9" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="13" insetsLeft="7" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JComboBox" name="targetLanguageComboBox"> <Properties> @@ -132,6 +79,11 @@ <AuxValues> <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<org.sleuthkit.autopsy.texttranslation.translators.LanguageWrapper>"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="2" gridWidth="4" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="13" insetsLeft="7" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="targetLanguageLabel"> <Properties> @@ -139,6 +91,15 @@ <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="GoogleTranslatorSettingsPanel.targetLanguageLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="2" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="16" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="warningLabel"> <Properties> @@ -149,13 +110,26 @@ <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="GoogleTranslatorSettingsPanel.warningLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="4" gridWidth="10" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="13" insetsLeft="12" insetsBottom="6" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="testResultValueLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="GoogleTranslatorSettingsPanel.testResultValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[600, 22]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="7" gridY="3" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="7" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="resultLabel"> <Properties> @@ -164,6 +138,11 @@ </Property> <Property name="enabled" type="boolean" value="false"/> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="6" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="10" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JLabel" name="untranslatedLabel"> <Properties> @@ -172,6 +151,11 @@ </Property> <Property name="enabled" type="boolean" value="false"/> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="3" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="10" insetsLeft="7" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JTextField" name="testUntranslatedTextField"> <Properties> @@ -179,7 +163,18 @@ <Connection code="DEFUALT_TEST_STRING" type="code"/> </Property> <Property name="enabled" type="boolean" value="false"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[160, 22]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[160, 22]"/> + </Property> </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="4" gridY="3" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="5" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Component class="javax.swing.JButton" name="testButton"> <Properties> @@ -191,6 +186,11 @@ <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="testButtonActionPerformed"/> </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="6" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> </Component> <Container class="javax.swing.JScrollPane" name="instructionsScrollPane"> <Properties> @@ -204,6 +204,11 @@ <AuxValues> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="0" gridWidth="10" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="13" insetsLeft="12" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="1.0"/> + </Constraint> + </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <SubComponents> @@ -215,14 +220,38 @@ </Property> <Property name="columns" type="int" value="20"/> <Property name="lineWrap" type="boolean" value="true"/> - <Property name="rows" type="int" value="2"/> + <Property name="rows" type="int" value="4"/> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/texttranslation/translators/Bundle.properties" key="GoogleTranslatorSettingsPanel.instructionsTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="wrapStyleWord" type="boolean" value="true"/> + <Property name="caretPosition" type="int" value="0"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1000, 200]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[164, 78]"/> + </Property> </Properties> </Component> </SubComponents> </Container> + <Component class="javax.swing.Box$Filler" name="filler1"> + <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[32767, 0]"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/> + <AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalGlue"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="10" gridY="0" gridWidth="1" gridHeight="5" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.6" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> </SubComponents> </Form> diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java index 9244ba3b869e149305d26c5994fca9469afe1a38..b9c6b852b1b6d4155f84c3fa85ddab27d0ad58ec 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java @@ -1,7 +1,7 @@ /* * Autopsy * - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -184,12 +184,13 @@ private void selectLanguageByCode(String code) { @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; - credentialsLabel = new javax.swing.JLabel(); + javax.swing.JLabel credentialsLabel = new javax.swing.JLabel(); credentialsPathField = new javax.swing.JTextField(); browseButton = new javax.swing.JButton(); targetLanguageComboBox = new javax.swing.JComboBox<>(); - targetLanguageLabel = new javax.swing.JLabel(); + javax.swing.JLabel targetLanguageLabel = new javax.swing.JLabel(); warningLabel = new javax.swing.JLabel(); testResultValueLabel = new javax.swing.JLabel(); resultLabel = new javax.swing.JLabel(); @@ -198,40 +199,121 @@ private void initComponents() { testButton = new javax.swing.JButton(); instructionsScrollPane = new javax.swing.JScrollPane(); instructionsTextArea = new javax.swing.JTextArea(); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + + setLayout(new java.awt.GridBagLayout()); org.openide.awt.Mnemonics.setLocalizedText(credentialsLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.credentialsLabel.text")); // NOI18N + credentialsLabel.setMaximumSize(new java.awt.Dimension(200, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(17, 12, 0, 0); + add(credentialsLabel, gridBagConstraints); credentialsPathField.setEditable(false); - credentialsPathField.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - credentialsPathFieldActionPerformed(evt); - } - }); + credentialsPathField.setMaximumSize(new java.awt.Dimension(700, 22)); + credentialsPathField.setPreferredSize(new java.awt.Dimension(100, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 6; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(14, 7, 0, 0); + add(credentialsPathField, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.browseButton.text")); // NOI18N + browseButton.setMaximumSize(new java.awt.Dimension(100, 25)); browseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 9; + gridBagConstraints.gridy = 1; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 7, 0, 0); + add(browseButton, gridBagConstraints); targetLanguageComboBox.setEnabled(false); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 7, 0, 0); + add(targetLanguageComboBox, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(targetLanguageLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.targetLanguageLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(16, 12, 0, 0); + add(targetLanguageLabel, gridBagConstraints); warningLabel.setForeground(new java.awt.Color(255, 0, 0)); org.openide.awt.Mnemonics.setLocalizedText(warningLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.warningLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 4; + gridBagConstraints.gridwidth = 10; + gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(13, 12, 6, 0); + add(warningLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(testResultValueLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.testResultValueLabel.text")); // NOI18N + testResultValueLabel.setMaximumSize(new java.awt.Dimension(600, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 7; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 7, 0, 0); + add(testResultValueLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(resultLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.resultLabel.text")); // NOI18N resultLabel.setEnabled(false); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 6; + gridBagConstraints.gridy = 3; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 5, 0, 0); + add(resultLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(untranslatedLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.untranslatedLabel.text")); // NOI18N untranslatedLabel.setEnabled(false); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 7, 0, 0); + add(untranslatedLabel, gridBagConstraints); testUntranslatedTextField.setText(DEFUALT_TEST_STRING); testUntranslatedTextField.setEnabled(false); + testUntranslatedTextField.setMinimumSize(new java.awt.Dimension(160, 22)); + testUntranslatedTextField.setPreferredSize(new java.awt.Dimension(160, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 5, 0, 0); + add(testUntranslatedTextField, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(testButton, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.testButton.text")); // NOI18N testButton.setEnabled(false); @@ -240,6 +322,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { testButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 12, 0, 0); + add(testButton, gridBagConstraints); instructionsScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); instructionsScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); @@ -248,76 +337,31 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { instructionsTextArea.setBackground(new java.awt.Color(240, 240, 240)); instructionsTextArea.setColumns(20); instructionsTextArea.setLineWrap(true); - instructionsTextArea.setRows(2); + instructionsTextArea.setRows(4); instructionsTextArea.setText(org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.instructionsTextArea.text")); // NOI18N instructionsTextArea.setWrapStyleWord(true); + instructionsTextArea.setCaretPosition(0); + instructionsTextArea.setMaximumSize(new java.awt.Dimension(1000, 200)); + instructionsTextArea.setPreferredSize(new java.awt.Dimension(164, 78)); instructionsScrollPane.setViewportView(instructionsTextArea); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(instructionsScrollPane) - .addContainerGap()) - .addGroup(layout.createSequentialGroup() - .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 551, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(testButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(credentialsLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(targetLanguageLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(credentialsPathField) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseButton) - .addGap(14, 14, 14)) - .addGroup(layout.createSequentialGroup() - .addComponent(targetLanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)))) - .addGroup(layout.createSequentialGroup() - .addGap(7, 7, 7) - .addComponent(untranslatedLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testUntranslatedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(resultLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testResultValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(instructionsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(credentialsLabel) - .addComponent(credentialsPathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(browseButton)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(targetLanguageLabel) - .addComponent(targetLanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(testButton) - .addComponent(testUntranslatedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(untranslatedLabel) - .addComponent(resultLabel) - .addComponent(testResultValueLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 10; + gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.weighty = 1.0; + gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 0); + add(instructionsScrollPane, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 10; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.6; + add(filler1, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents @Messages({"GoogleTranslatorSettingsPanel.json.description=JSON Files", @@ -357,19 +401,13 @@ private void testButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI } }//GEN-LAST:event_testButtonActionPerformed - private void credentialsPathFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_credentialsPathFieldActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_credentialsPathFieldActionPerformed - // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton browseButton; - private javax.swing.JLabel credentialsLabel; private javax.swing.JTextField credentialsPathField; private javax.swing.JScrollPane instructionsScrollPane; private javax.swing.JTextArea instructionsTextArea; private javax.swing.JLabel resultLabel; private javax.swing.JComboBox<org.sleuthkit.autopsy.texttranslation.translators.LanguageWrapper> targetLanguageComboBox; - private javax.swing.JLabel targetLanguageLabel; private javax.swing.JButton testButton; private javax.swing.JLabel testResultValueLabel; private javax.swing.JTextField testUntranslatedTextField; @@ -378,26 +416,28 @@ private void credentialsPathFieldActionPerformed(java.awt.event.ActionEvent evt) // End of variables declaration//GEN-END:variables /** - * Get the currently selected target language code + * Get the currently selected target language code. * - * @return the target language code of the language selected in the combobox + * @return The target language code of the language selected in the combo + * box. */ String getTargetLanguageCode() { return targetLanguageCode; } /** - * Get the currently set path to the JSON credentials file + * Get the currently set path to the JSON credentials file. * - * @return the path to the credentials file specified in the textarea + * @return The path to the credentials file specified in the credentials + * field. */ String getCredentialsPath() { return credentialsPathField.getText(); } /** - * Listener to identfy when a combo box item has been selected and update - * the combo box to reflect that + * Listener to identify when a combo box item has been selected and update + * the combo box to reflect that selection. */ private class ComboBoxSelectionListener implements ItemListener { diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form index 760f82354353e9e91285a0a3fb469a0a994e66b1..7aa013e0471a6c45228767068bab3d599ab7a6a1 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form @@ -25,7 +25,7 @@ </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="nodeScrollPane" alignment="0" pref="656" max="32767" attributes="0"/> + <Component id="nodeScrollPane" alignment="0" max="32767" attributes="0"/> </Group> </DimensionLayout> </Layout> @@ -42,15 +42,15 @@ <Container class="javax.swing.JPanel" name="nodePanel"> <Properties> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[100, 100]"/> + <Dimension value="[0, 0]"/> </Property> </Properties> <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <Component id="jLabelSelectInputFolder" min="-2" max="-2" attributes="0"/> @@ -59,70 +59,68 @@ </Group> <Group type="102" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="pbTaskInProgress" alignment="0" max="32767" attributes="0"/> - <Group type="102" alignment="0" attributes="0"> - <Component id="jLabelCurrentTask" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="jLabelTaskDescription" max="32767" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <Component id="sharedConfigCheckbox" max="32767" attributes="0"/> + <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/> + <Component id="sharedSettingsErrorTextField" min="-2" pref="445" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> </Group> <Group type="102" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="outputPathTextField" min="-2" pref="630" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="browseOutputFolderButton" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabelCurrentTask" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jLabelTaskDescription" min="-2" pref="626" max="-2" attributes="0"/> </Group> <Group type="102" attributes="0"> - <Component id="inputPathTextField" min="-2" pref="630" max="-2" attributes="0"/> + <Component id="inputPathTextField" linkSize="2" min="-2" pref="630" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="browseInputFolderButton" min="-2" max="-2" attributes="0"/> + <Component id="browseInputFolderButton" linkSize="3" min="-2" max="-2" attributes="0"/> </Group> - <Component id="uploadButton" alignment="0" min="-2" pref="143" max="-2" attributes="0"/> - <Component id="masterNodeCheckBox" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="uploadButton" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/> <Group type="102" alignment="0" attributes="0"> - <Component id="bnEditIngestSettings" min="-2" pref="155" max="-2" attributes="0"/> + <Component id="bnEditIngestSettings" linkSize="1" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="bnAdvancedSettings" min="-2" pref="155" max="-2" attributes="0"/> + <Component id="bnAdvancedSettings" linkSize="1" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="bnFileExport" min="-2" pref="155" max="-2" attributes="0"/> + <Component id="bnFileExport" linkSize="1" min="-2" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> <Component id="jLabelSelectOutputFolder" min="-2" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/> <Component id="jLabelInvalidResultsFolder" min="-2" pref="544" max="-2" attributes="0"/> </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="sharedConfigCheckbox" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="sharedSettingsErrorTextField" min="-2" max="-2" attributes="0"/> - </Group> <Group type="102" alignment="0" attributes="0"> <Component id="sharedSettingsTextField" min="-2" pref="400" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="browseSharedSettingsButton" min="-2" pref="143" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="downloadButton" min="-2" pref="143" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="configButtonErrorTextField" min="-2" pref="396" max="-2" attributes="0"/> + <Component id="browseSharedSettingsButton" linkSize="1" min="-2" max="-2" attributes="0"/> </Group> <Group type="102" alignment="0" attributes="0"> <Component id="examinerModeRadioButton" min="-2" pref="145" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="tbOops" min="-2" pref="561" max="-2" attributes="0"/> </Group> + <Component id="downloadButton" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="autoIngestModeRadioButton" alignment="0" min="-2" pref="145" max="-2" attributes="0"/> </Group> <EmptySpace min="0" pref="0" max="32767" attributes="0"/> </Group> </Group> <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> </Group> - <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="autoIngestModeRadioButton" min="-2" pref="145" max="-2" attributes="0"/> - <Component id="pnTestMultiUser" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="pnTestMultiUser" alignment="0" max="32767" attributes="0"/> + <Component id="configButtonErrorTextField" alignment="1" min="-2" pref="531" max="-2" attributes="0"/> + <Component id="masterNodeCheckBox" alignment="0" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="outputPathTextField" linkSize="2" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="browseOutputFolderButton" linkSize="3" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="pbTaskInProgress" alignment="0" max="32767" attributes="0"/> </Group> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> </Group> </Group> </Group> @@ -177,7 +175,7 @@ <EmptySpace type="unrelated" max="-2" attributes="0"/> <Group type="103" groupAlignment="3" attributes="0"> <Component id="downloadButton" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="configButtonErrorTextField" alignment="3" min="-2" pref="21" max="-2" attributes="0"/> + <Component id="configButtonErrorTextField" alignment="3" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace type="separate" max="-2" attributes="0"/> <Component id="masterNodeCheckBox" min="-2" pref="23" max="-2" attributes="0"/> @@ -192,7 +190,7 @@ <Component id="pbTaskInProgress" min="-2" pref="22" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/> <Component id="pnTestMultiUser" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="82" max="32767" attributes="0"/> + <EmptySpace pref="20" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -225,6 +223,15 @@ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/experimental/configuration/Bundle.properties" key="AutoIngestSettingsPanel.bnEditIngestSettings.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 25]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnEditIngestSettingsActionPerformed"/> @@ -235,6 +242,15 @@ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/experimental/configuration/Bundle.properties" key="AutoIngestSettingsPanel.bnAdvancedSettings.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 25]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnAdvancedSettingsActionPerformed"/> @@ -245,6 +261,15 @@ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/experimental/configuration/Bundle.properties" key="AutoIngestSettingsPanel.bnFileExport.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 25]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnFileExportActionPerformed"/> @@ -332,13 +357,13 @@ <ResourceString bundle="org/sleuthkit/autopsy/experimental/configuration/Bundle.properties" key="AutoIngestSettingsPanel.sharedConfigCheckbox.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[191, 14]"/> + <Dimension value="[191, 21]"/> </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[191, 14]"/> + <Dimension value="[191, 21]"/> </Property> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[191, 14]"/> + <Dimension value="[191, 21]"/> </Property> </Properties> <Events> @@ -373,6 +398,15 @@ <ResourceString bundle="org/sleuthkit/autopsy/experimental/configuration/Bundle.properties" key="AutoIngestSettingsPanel.browseSharedSettingsButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> <Property name="enabled" type="boolean" value="false"/> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 25]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseSharedSettingsButtonActionPerformed"/> @@ -383,6 +417,15 @@ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/experimental/configuration/Bundle.properties" key="AutoIngestSettingsPanel.downloadButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 25]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="downloadButtonActionPerformed"/> @@ -423,6 +466,15 @@ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="org/sleuthkit/autopsy/experimental/configuration/Bundle.properties" key="AutoIngestSettingsPanel.uploadButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[200, 25]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[170, 25]"/> + </Property> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="uploadButtonActionPerformed"/> @@ -478,19 +530,19 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Component id="lbTestResultText" alignment="0" max="32767" attributes="0"/> <Group type="102" alignment="0" attributes="0"> - <Component id="lbTestMultiUserText" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="236" max="32767" attributes="0"/> + <Component id="lbTestMultiUserText" pref="324" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="236" max="-2" attributes="0"/> <Component id="bnTestMultiUser" min="-2" pref="83" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> + <EmptySpace type="separate" min="-2" max="-2" attributes="0"/> <Component id="lbMultiUserResult" min="-2" pref="16" max="-2" attributes="0"/> <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> </Group> </Group> </DimensionLayout> diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java index fcd21dd8f2da654731a34892ac18ea0bc6eec56c..696c33ccb4da64f7b6878b383ef2abeb514e9cf2 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2015-2018 Basis Technology Corp. + * Copyright 2015-2020 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -40,7 +40,6 @@ import org.openide.util.ImageUtilities; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; -import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.coreutils.FileUtil; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.coreutils.Logger; @@ -644,7 +643,7 @@ private void initComponents() { nodeScrollPane.setMinimumSize(new java.awt.Dimension(0, 0)); - nodePanel.setMinimumSize(new java.awt.Dimension(100, 100)); + nodePanel.setMinimumSize(new java.awt.Dimension(0, 0)); tbOops.setEditable(false); tbOops.setFont(tbOops.getFont().deriveFont(tbOops.getFont().getStyle() | java.awt.Font.BOLD, tbOops.getFont().getSize()+1)); @@ -654,6 +653,9 @@ private void initComponents() { org.openide.awt.Mnemonics.setLocalizedText(bnEditIngestSettings, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.bnEditIngestSettings.text")); // NOI18N bnEditIngestSettings.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.bnEditIngestSettings.toolTipText")); // NOI18N + bnEditIngestSettings.setMaximumSize(new java.awt.Dimension(200, 25)); + bnEditIngestSettings.setMinimumSize(new java.awt.Dimension(170, 25)); + bnEditIngestSettings.setPreferredSize(new java.awt.Dimension(170, 25)); bnEditIngestSettings.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnEditIngestSettingsActionPerformed(evt); @@ -661,6 +663,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); org.openide.awt.Mnemonics.setLocalizedText(bnAdvancedSettings, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.bnAdvancedSettings.text")); // NOI18N + bnAdvancedSettings.setMaximumSize(new java.awt.Dimension(200, 25)); + bnAdvancedSettings.setMinimumSize(new java.awt.Dimension(170, 25)); + bnAdvancedSettings.setPreferredSize(new java.awt.Dimension(170, 25)); bnAdvancedSettings.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnAdvancedSettingsActionPerformed(evt); @@ -668,6 +673,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); org.openide.awt.Mnemonics.setLocalizedText(bnFileExport, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.bnFileExport.text")); // NOI18N + bnFileExport.setMaximumSize(new java.awt.Dimension(200, 25)); + bnFileExport.setMinimumSize(new java.awt.Dimension(170, 25)); + bnFileExport.setPreferredSize(new java.awt.Dimension(170, 25)); bnFileExport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnFileExportActionPerformed(evt); @@ -707,9 +715,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jLabelSelectOutputFolder.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); org.openide.awt.Mnemonics.setLocalizedText(sharedConfigCheckbox, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.sharedConfigCheckbox.text")); // NOI18N - sharedConfigCheckbox.setMaximumSize(new java.awt.Dimension(191, 14)); - sharedConfigCheckbox.setMinimumSize(new java.awt.Dimension(191, 14)); - sharedConfigCheckbox.setPreferredSize(new java.awt.Dimension(191, 14)); + sharedConfigCheckbox.setMaximumSize(new java.awt.Dimension(191, 21)); + sharedConfigCheckbox.setMinimumSize(new java.awt.Dimension(191, 21)); + sharedConfigCheckbox.setPreferredSize(new java.awt.Dimension(191, 21)); sharedConfigCheckbox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { sharedConfigCheckboxItemStateChanged(evt); @@ -726,6 +734,9 @@ public void itemStateChanged(java.awt.event.ItemEvent evt) { org.openide.awt.Mnemonics.setLocalizedText(browseSharedSettingsButton, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.browseSharedSettingsButton.text")); // NOI18N browseSharedSettingsButton.setEnabled(false); + browseSharedSettingsButton.setMaximumSize(new java.awt.Dimension(200, 25)); + browseSharedSettingsButton.setMinimumSize(new java.awt.Dimension(170, 25)); + browseSharedSettingsButton.setPreferredSize(new java.awt.Dimension(170, 25)); browseSharedSettingsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseSharedSettingsButtonActionPerformed(evt); @@ -733,6 +744,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { }); org.openide.awt.Mnemonics.setLocalizedText(downloadButton, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.downloadButton.text")); // NOI18N + downloadButton.setMaximumSize(new java.awt.Dimension(200, 25)); + downloadButton.setMinimumSize(new java.awt.Dimension(170, 25)); + downloadButton.setPreferredSize(new java.awt.Dimension(170, 25)); downloadButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { downloadButtonActionPerformed(evt); @@ -749,6 +763,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { org.openide.awt.Mnemonics.setLocalizedText(jLabelCurrentTask, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.jLabelCurrentTask.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(uploadButton, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.uploadButton.text")); // NOI18N + uploadButton.setMaximumSize(new java.awt.Dimension(200, 25)); + uploadButton.setMinimumSize(new java.awt.Dimension(170, 25)); + uploadButton.setPreferredSize(new java.awt.Dimension(170, 25)); uploadButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { uploadButtonActionPerformed(evt); @@ -805,8 +822,8 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(pnTestMultiUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbTestResultText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(pnTestMultiUserLayout.createSequentialGroup() - .addComponent(lbTestMultiUserText) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 236, Short.MAX_VALUE) + .addComponent(lbTestMultiUserText, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE) + .addGap(236, 236, 236) .addComponent(bnTestMultiUser, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lbMultiUserResult, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -840,57 +857,63 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(jLabelInvalidImageFolder, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(nodePanelLayout.createSequentialGroup() .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pbTaskInProgress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(jLabelCurrentTask) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, nodePanelLayout.createSequentialGroup() + .addComponent(sharedConfigCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jLabelTaskDescription, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(sharedSettingsErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 445, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(30, 30, 30)) .addGroup(nodePanelLayout.createSequentialGroup() .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(outputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 630, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseOutputFolderButton)) + .addComponent(jLabelCurrentTask) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jLabelTaskDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 626, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(nodePanelLayout.createSequentialGroup() .addComponent(inputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 630, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(browseInputFolderButton)) - .addComponent(uploadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(masterNodeCheckBox) + .addComponent(uploadButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(bnEditIngestSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnEditIngestSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bnAdvancedSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnAdvancedSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bnFileExport, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(bnFileExport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(nodePanelLayout.createSequentialGroup() .addComponent(jLabelSelectOutputFolder) .addGap(18, 18, 18) .addComponent(jLabelInvalidResultsFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 544, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(sharedConfigCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(sharedSettingsErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(nodePanelLayout.createSequentialGroup() .addComponent(sharedSettingsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseSharedSettingsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(downloadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 396, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(browseSharedSettingsButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(nodePanelLayout.createSequentialGroup() .addComponent(examinerModeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(downloadButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(autoIngestModeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE))) .addGap(10, 10, 10)) .addGroup(nodePanelLayout.createSequentialGroup() - .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(autoIngestModeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pnTestMultiUser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, Short.MAX_VALUE)))) + .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(pnTestMultiUser, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 531, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(masterNodeCheckBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, nodePanelLayout.createSequentialGroup() + .addComponent(outputPathTextField) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(browseOutputFolderButton)) + .addComponent(pbTaskInProgress, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); + + nodePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {bnAdvancedSettings, bnEditIngestSettings, bnFileExport, browseSharedSettingsButton, downloadButton, uploadButton}); + + nodePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {inputPathTextField, outputPathTextField}); + + nodePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {browseInputFolderButton, browseOutputFolderButton}); + nodePanelLayout.setVerticalGroup( nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(nodePanelLayout.createSequentialGroup() @@ -918,9 +941,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(outputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(25, 25, 25) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bnEditIngestSettings) - .addComponent(bnFileExport) - .addComponent(bnAdvancedSettings)) + .addComponent(bnEditIngestSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnFileExport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnAdvancedSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sharedConfigCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -928,15 +951,15 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sharedSettingsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(browseSharedSettingsButton)) + .addComponent(browseSharedSettingsButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(downloadButton) - .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(downloadButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(masterNodeCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(uploadButton) + .addComponent(uploadButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabelCurrentTask) @@ -945,7 +968,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(pbTaskInProgress, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(pnTestMultiUser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(82, Short.MAX_VALUE)) + .addContainerGap(20, Short.MAX_VALUE)) ); nodeScrollPane.setViewportView(nodePanel); @@ -958,38 +981,65 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(nodeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 656, Short.MAX_VALUE) + .addComponent(nodeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); }// </editor-fold>//GEN-END:initComponents - boolean permissionsAppropriate(String path) { - return FileUtil.hasReadWriteAccess(Paths.get(path)); - } + private void bnTestMultiUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnTestMultiUserActionPerformed - private void setSharedConfigEnable() { + lbTestResultText.setForeground(Color.BLACK); + lbTestResultText.setText(NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.TestRunning")); + lbTestResultText.paintImmediately(lbTestResultText.getVisibleRect()); + lbMultiUserResult.setIcon(null); + lbMultiUserResult.paintImmediately(lbMultiUserResult.getVisibleRect()); + + if (!validateResultsPath()) { + lbMultiUserResult.setIcon(badIcon); + lbTestResultText.setForeground(Color.RED); + lbTestResultText.setText(NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.PathInvalid")); + return; + } + + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + String resultsFolderPath = getNormalizedFolderPath(outputPathTextField.getText().trim()); + String testResult = MultiUserTestTool.runTest(resultsFolderPath); + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + if (testResult.equals(MultiUserTestTool.MULTI_USER_TEST_SUCCESSFUL)) { + // test successful + lbMultiUserResult.setIcon(goodIcon); + lbTestResultText.setText(""); + } else { + // test failed + lbMultiUserResult.setIcon(badIcon); + lbTestResultText.setText(testResult); + lbTestResultText.setForeground(Color.RED); + } + }//GEN-LAST:event_bnTestMultiUserActionPerformed + + private void autoIngestModeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoIngestModeRadioButtonActionPerformed + enableOptionsBasedOnMode(getModeFromRadioButtons()); + controller.changed(); + }//GEN-LAST:event_autoIngestModeRadioButtonActionPerformed + + private void examinerModeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_examinerModeRadioButtonActionPerformed + enableOptionsBasedOnMode(getModeFromRadioButtons()); + controller.changed(); + }//GEN-LAST:event_examinerModeRadioButtonActionPerformed + + private void masterNodeCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_masterNodeCheckBoxItemStateChanged + // Enable the global settings text box and browse button iff the checkbox is checked and enabled setEnabledStateForSharedConfiguration(); - if (sharedConfigCheckbox.isEnabled() && sharedConfigCheckbox.isSelected()) { - sharedSettingsTextField.setEnabled(true); - browseSharedSettingsButton.setEnabled(true); - masterNodeCheckBox.setEnabled(true); - downloadButton.setEnabled(true); - validateSettings(); + if (masterNodeCheckBox.isEnabled() && masterNodeCheckBox.isSelected()) { + uploadButton.setEnabled(true); + validateSettings(); // This will disable the upload/save button if the settings aren't currently valid controller.changed(); } else { - sharedSettingsTextField.setEnabled(false); - browseSharedSettingsButton.setEnabled(false); - masterNodeCheckBox.setEnabled(false); - downloadButton.setEnabled(false); - sharedSettingsErrorTextField.setText(""); - validateSettings(); - controller.changed(); + uploadButton.setEnabled(false); } - } + }//GEN-LAST:event_masterNodeCheckBoxItemStateChanged - private void downloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downloadButtonActionPerformed - // First save the shared config folder and solr settings to the properties - String globalSettingsPath = getNormalizedFolderPath(sharedSettingsTextField.getText().trim()); - AutoIngestUserPreferences.setSharedConfigFolder(globalSettingsPath); + private void uploadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_uploadButtonActionPerformed + store(); enableUI(false); jLabelCurrentTask.setEnabled(true); @@ -997,16 +1047,18 @@ private void downloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GE pbTaskInProgress.setEnabled(true); pbTaskInProgress.setIndeterminate(true); - UpdateConfigSwingWorker worker = new UpdateConfigSwingWorker(ConfigTaskType.DOWNLOAD); + UpdateConfigSwingWorker worker = new UpdateConfigSwingWorker(ConfigTaskType.UPLOAD); try { worker.execute(); } catch (Exception ex) { jLabelTaskDescription.setText(ex.getLocalizedMessage()); } - }//GEN-LAST:event_downloadButtonActionPerformed + }//GEN-LAST:event_uploadButtonActionPerformed - private void uploadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_uploadButtonActionPerformed - store(); + private void downloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downloadButtonActionPerformed + // First save the shared config folder and solr settings to the properties + String globalSettingsPath = getNormalizedFolderPath(sharedSettingsTextField.getText().trim()); + AutoIngestUserPreferences.setSharedConfigFolder(globalSettingsPath); enableUI(false); jLabelCurrentTask.setEnabled(true); @@ -1014,25 +1066,13 @@ private void uploadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN- pbTaskInProgress.setEnabled(true); pbTaskInProgress.setIndeterminate(true); - UpdateConfigSwingWorker worker = new UpdateConfigSwingWorker(ConfigTaskType.UPLOAD); + UpdateConfigSwingWorker worker = new UpdateConfigSwingWorker(ConfigTaskType.DOWNLOAD); try { worker.execute(); } catch (Exception ex) { jLabelTaskDescription.setText(ex.getLocalizedMessage()); } - }//GEN-LAST:event_uploadButtonActionPerformed - - private void masterNodeCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_masterNodeCheckBoxItemStateChanged - // Enable the global settings text box and browse button iff the checkbox is checked and enabled - setEnabledStateForSharedConfiguration(); - if (masterNodeCheckBox.isEnabled() && masterNodeCheckBox.isSelected()) { - uploadButton.setEnabled(true); - validateSettings(); // This will disable the upload/save button if the settings aren't currently valid - controller.changed(); - } else { - uploadButton.setEnabled(false); - } - }//GEN-LAST:event_masterNodeCheckBoxItemStateChanged + }//GEN-LAST:event_downloadButtonActionPerformed private void browseSharedSettingsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseSharedSettingsButtonActionPerformed @@ -1060,45 +1100,45 @@ private void sharedConfigCheckboxItemStateChanged(java.awt.event.ItemEvent evt) setSharedConfigEnable(); }//GEN-LAST:event_sharedConfigCheckboxItemStateChanged - private void browseOutputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseOutputFolderButtonActionPerformed - String oldText = outputPathTextField.getText().trim(); + private void browseInputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseInputFolderButtonActionPerformed + String oldText = inputPathTextField.getText().trim(); // set the current directory of the FileChooser if the oldText is valid File currentDir = new File(oldText); if (currentDir.exists()) { fc.setCurrentDirectory(currentDir); } - fc.setDialogTitle("Select case output folder:"); + fc.setDialogTitle("Select case input folder:"); fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int retval = fc.showOpenDialog(this); if (retval == JFileChooser.APPROVE_OPTION) { String path = fc.getSelectedFile().getPath(); - outputPathTextField.setText(path); + inputPathTextField.setText(path); validateSettings(); controller.changed(); } - }//GEN-LAST:event_browseOutputFolderButtonActionPerformed + }//GEN-LAST:event_browseInputFolderButtonActionPerformed - private void browseInputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseInputFolderButtonActionPerformed - String oldText = inputPathTextField.getText().trim(); + private void browseOutputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseOutputFolderButtonActionPerformed + String oldText = outputPathTextField.getText().trim(); // set the current directory of the FileChooser if the oldText is valid File currentDir = new File(oldText); if (currentDir.exists()) { fc.setCurrentDirectory(currentDir); } - fc.setDialogTitle("Select case input folder:"); + fc.setDialogTitle("Select case output folder:"); fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int retval = fc.showOpenDialog(this); if (retval == JFileChooser.APPROVE_OPTION) { String path = fc.getSelectedFile().getPath(); - inputPathTextField.setText(path); + outputPathTextField.setText(path); validateSettings(); controller.changed(); } - }//GEN-LAST:event_browseInputFolderButtonActionPerformed + }//GEN-LAST:event_browseOutputFolderButtonActionPerformed private void bnFileExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnFileExportActionPerformed JDialog jDialog = new JDialog(); @@ -1125,9 +1165,9 @@ public void windowClosing(java.awt.event.WindowEvent windowEvent) { private void bnAdvancedSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnAdvancedSettingsActionPerformed AdvancedAutoIngestSettingsPanel advancedAutoIngestSettingsPanel = new AdvancedAutoIngestSettingsPanel(getModeFromRadioButtons()); if (JOptionPane.showConfirmDialog(this, advancedAutoIngestSettingsPanel, - NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.AdvancedAutoIngestSettingsPanel.Title"), - JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) { - advancedAutoIngestSettingsPanel.store(); + NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.AdvancedAutoIngestSettingsPanel.Title"), + JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) { + advancedAutoIngestSettingsPanel.store(); } }//GEN-LAST:event_bnAdvancedSettingsActionPerformed @@ -1135,46 +1175,29 @@ private void bnEditIngestSettingsActionPerformed(java.awt.event.ActionEvent evt) displayIngestJobSettingsPanel(); }//GEN-LAST:event_bnEditIngestSettingsActionPerformed - private void autoIngestModeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoIngestModeRadioButtonActionPerformed - enableOptionsBasedOnMode(getModeFromRadioButtons()); - controller.changed(); - }//GEN-LAST:event_autoIngestModeRadioButtonActionPerformed - - private void examinerModeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_examinerModeRadioButtonActionPerformed - enableOptionsBasedOnMode(getModeFromRadioButtons()); - controller.changed(); - }//GEN-LAST:event_examinerModeRadioButtonActionPerformed - - private void bnTestMultiUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnTestMultiUserActionPerformed - - lbTestResultText.setForeground(Color.BLACK); - lbTestResultText.setText(NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.TestRunning")); - lbTestResultText.paintImmediately(lbTestResultText.getVisibleRect()); - lbMultiUserResult.setIcon(null); - lbMultiUserResult.paintImmediately(lbMultiUserResult.getVisibleRect()); - - if (!validateResultsPath()) { - lbMultiUserResult.setIcon(badIcon); - lbTestResultText.setForeground(Color.RED); - lbTestResultText.setText(NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.PathInvalid")); - return; - } + boolean permissionsAppropriate(String path) { + return FileUtil.hasReadWriteAccess(Paths.get(path)); + } - setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - String resultsFolderPath = getNormalizedFolderPath(outputPathTextField.getText().trim()); - String testResult = MultiUserTestTool.runTest(resultsFolderPath); - setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - if (testResult.equals(MultiUserTestTool.MULTI_USER_TEST_SUCCESSFUL)) { - // test successful - lbMultiUserResult.setIcon(goodIcon); - lbTestResultText.setText(""); + private void setSharedConfigEnable() { + setEnabledStateForSharedConfiguration(); + if (sharedConfigCheckbox.isEnabled() && sharedConfigCheckbox.isSelected()) { + sharedSettingsTextField.setEnabled(true); + browseSharedSettingsButton.setEnabled(true); + masterNodeCheckBox.setEnabled(true); + downloadButton.setEnabled(true); + validateSettings(); + controller.changed(); } else { - // test failed - lbMultiUserResult.setIcon(badIcon); - lbTestResultText.setText(testResult); - lbTestResultText.setForeground(Color.RED); + sharedSettingsTextField.setEnabled(false); + browseSharedSettingsButton.setEnabled(false); + masterNodeCheckBox.setEnabled(false); + downloadButton.setEnabled(false); + sharedSettingsErrorTextField.setText(""); + validateSettings(); + controller.changed(); } - }//GEN-LAST:event_bnTestMultiUserActionPerformed + } private void enableUI(boolean state) { enableOptionsBasedOnMode(OptionsUiMode.DOWNLOADING_CONFIGURATION);