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>
|
<Layout>
|
||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="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>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<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>
|
</Group>
|
||||||
</DimensionLayout>
|
</DimensionLayout>
|
||||||
</Layout>
|
</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>
|
</Form>
|
||||||
|
@ -30,6 +30,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Top component which displays result (top-right editor mode by default).
|
* 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 {
|
public class DataResultTopComponent extends TopComponent implements DataResult {
|
||||||
|
|
||||||
@ -37,7 +38,6 @@ public class DataResultTopComponent extends TopComponent implements DataResult {
|
|||||||
private DataResultPanel dataResultPanel; //embedded component with all the logic
|
private DataResultPanel dataResultPanel; //embedded component with all the logic
|
||||||
private boolean isMain;
|
private boolean isMain;
|
||||||
private String customModeName;
|
private String customModeName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new data result top component
|
* Create a new data result top component
|
||||||
@ -49,10 +49,9 @@ public class DataResultTopComponent extends TopComponent implements DataResult {
|
|||||||
public DataResultTopComponent(boolean isMain, String title) {
|
public DataResultTopComponent(boolean isMain, String title) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
initComponents();
|
|
||||||
|
|
||||||
this.dataResultPanel = new DataResultPanel(isMain, title);
|
this.dataResultPanel = new DataResultPanel(isMain, title);
|
||||||
|
|
||||||
|
initComponents();
|
||||||
customizeComponent(isMain, title);
|
customizeComponent(isMain, title);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -66,15 +65,16 @@ public class DataResultTopComponent extends TopComponent implements DataResult {
|
|||||||
* @param customContentViewer custom content viewer to send selection events
|
* @param customContentViewer custom content viewer to send selection events
|
||||||
* to
|
* to
|
||||||
*/
|
*/
|
||||||
DataResultTopComponent(String name, String mode, DataContentTopComponent customContentViewer) {
|
DataResultTopComponent(String name, String mode, DataContentTopComponent customContentViewer) {
|
||||||
super();
|
super();
|
||||||
this.customModeName = mode;
|
this.customModeName = mode;
|
||||||
|
|
||||||
customizeComponent(isMain, name);;
|
|
||||||
|
|
||||||
//custom content viewer tc to setup for every result viewer
|
//custom content viewer tc to setup for every result viewer
|
||||||
dataResultPanel = new DataResultPanel(name, customContentViewer);
|
dataResultPanel = new DataResultPanel(name, customContentViewer);
|
||||||
|
|
||||||
|
initComponents();
|
||||||
|
customizeComponent(isMain, name);;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void customizeComponent(boolean isMain, String title) {
|
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
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
|
org.sleuthkit.autopsy.corecomponents.DataResultPanel dataResultPanelLocal = dataResultPanel;
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||||
this.setLayout(layout);
|
this.setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
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.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
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
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// 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
|
@Override
|
||||||
public String getPreferredID() {
|
public String getPreferredID() {
|
||||||
return this.preferredID();
|
return this.preferredID();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user