mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-09 14:49:32 +00:00
fix initialization order and cleanup
This commit is contained in:
parent
738c704750
commit
6c1f0d77ed
@ -16,13 +16,22 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="967" max="32767" attributes="0"/>
|
||||
<Component id="dataResultPanelLocal" alignment="0" pref="967" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="579" max="32767" attributes="0"/>
|
||||
<Component id="dataResultPanelLocal" alignment="0" pref="579" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="org.sleuthkit.autopsy.corecomponents.DataResultPanel" name="dataResultPanelLocal">
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="dataResultPanel;"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -30,6 +30,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* Top component which displays result (top-right editor mode by default).
|
||||
* Encapsulates the internal DataResultPanel and delegates to it.
|
||||
*/
|
||||
public class DataResultTopComponent extends TopComponent implements DataResult {
|
||||
|
||||
@ -38,7 +39,6 @@ public class DataResultTopComponent extends TopComponent implements DataResult {
|
||||
private boolean isMain;
|
||||
private String customModeName;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new data result top component
|
||||
*
|
||||
@ -49,10 +49,9 @@ public class DataResultTopComponent extends TopComponent implements DataResult {
|
||||
public DataResultTopComponent(boolean isMain, String title) {
|
||||
super();
|
||||
|
||||
initComponents();
|
||||
|
||||
this.dataResultPanel = new DataResultPanel(isMain, title);
|
||||
|
||||
initComponents();
|
||||
customizeComponent(isMain, title);
|
||||
|
||||
}
|
||||
@ -70,11 +69,12 @@ public class DataResultTopComponent extends TopComponent implements DataResult {
|
||||
super();
|
||||
this.customModeName = mode;
|
||||
|
||||
customizeComponent(isMain, name);;
|
||||
|
||||
//custom content viewer tc to setup for every result viewer
|
||||
dataResultPanel = new DataResultPanel(name, customContentViewer);
|
||||
|
||||
initComponents();
|
||||
customizeComponent(isMain, name);;
|
||||
|
||||
}
|
||||
|
||||
private void customizeComponent(boolean isMain, String title) {
|
||||
@ -144,15 +144,17 @@ public class DataResultTopComponent extends TopComponent implements DataResult {
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
org.sleuthkit.autopsy.corecomponents.DataResultPanel dataResultPanelLocal = dataResultPanel;
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 967, Short.MAX_VALUE)
|
||||
.addComponent(dataResultPanelLocal, javax.swing.GroupLayout.DEFAULT_SIZE, 967, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 579, Short.MAX_VALUE)
|
||||
.addComponent(dataResultPanelLocal, javax.swing.GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
@ -209,16 +211,6 @@ public class DataResultTopComponent extends TopComponent implements DataResult {
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
|
||||
// dataResultPanel.addPropertyChangeListener(listener);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
|
||||
// dataResultPanel.removePropertyChangeListener(listener);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public String getPreferredID() {
|
||||
return this.preferredID();
|
||||
|
Loading…
x
Reference in New Issue
Block a user