7050 attempt to fix layout

This commit is contained in:
William Schaefer
2020-12-07 12:38:25 -05:00
parent aae5458f01
commit 9eef7a2bf7
5 changed files with 17 additions and 9 deletions
@@ -3,7 +3,7 @@
<Form version="1.4" 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="[0, 0]"/>
<Dimension value="[400, 50]"/>
</Property>
</Properties>
<AuxValues>
@@ -21,12 +21,12 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="400" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
@@ -208,17 +208,17 @@ public class GeneralPurposeArtifactViewer extends AbstractArtifactDetailsPanel i
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
setPreferredSize(new java.awt.Dimension(0, 0));
setPreferredSize(new java.awt.Dimension(400, 50));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
.addGap(0, 0, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
.addGap(0, 0, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
@@ -18,7 +18,9 @@
*/
package org.sleuthkit.autopsy.discovery.ui;
import java.awt.Component;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
import org.sleuthkit.datamodel.BlackboardArtifact;
@@ -28,6 +30,12 @@ import org.sleuthkit.datamodel.BlackboardArtifact;
*/
public abstract class AbstractArtifactDetailsPanel extends JPanel {
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
public Component getComponent() {
// Slap a vertical scrollbar on the panel.
return new JScrollPane(this, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
}
private static final long serialVersionUID = 1L;
/**
@@ -91,7 +91,7 @@ final class DomainArtifactsTabPanel extends JPanel {
break;
}
if (rightPanel != null) {
jSplitPane1.setRightComponent(new JScrollPane(rightPanel));
jSplitPane1.setRightComponent(rightPanel.getComponent());
}
}
@@ -64,7 +64,7 @@ class MiniTimelinePanel extends javax.swing.JPanel {
rightPanel = new GeneralPurposeArtifactViewer();
}
rightPanel.setArtifact(artifact);
mainSplitPane.setRightComponent(new JScrollPane(rightPanel));
mainSplitPane.setRightComponent(rightPanel.getComponent());
validate();
repaint();
}
@@ -88,7 +88,7 @@ class MiniTimelinePanel extends javax.swing.JPanel {
artifactListPanel.addSelectionListener(artifactListener);
leftSplitPane.setLeftComponent(dateListPanel);
leftSplitPane.setRightComponent(artifactListPanel);
mainSplitPane.setRightComponent(rightPanel);
mainSplitPane.setRightComponent(rightPanel.getComponent());
}
/**