mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
6354 Cleanup
This commit is contained in:
parent
3c242485fe
commit
fe23a400f4
@ -1,47 +1,43 @@
|
|||||||
/*
|
/*
|
||||||
* To change this license header, choose License Headers in Project Properties.
|
* Autopsy Forensic Browser
|
||||||
* To change this template file, choose Tools | Templates
|
*
|
||||||
* and open the template in the editor.
|
* Copyright 2020 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.persona;
|
package org.sleuthkit.autopsy.persona;
|
||||||
|
|
||||||
import org.netbeans.api.settings.ConvertAsProperties;
|
|
||||||
import org.openide.awt.ActionID;
|
|
||||||
import org.openide.awt.ActionReference;
|
|
||||||
import org.openide.windows.TopComponent;
|
import org.openide.windows.TopComponent;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.openide.windows.RetainLocation;
|
||||||
|
import org.openide.windows.WindowManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Top component which displays something.
|
* Top component for persona details
|
||||||
*/
|
*/
|
||||||
@ConvertAsProperties(
|
@TopComponent.Description(preferredID = "PersonasTopComponent", persistenceType = TopComponent.PERSISTENCE_NEVER)
|
||||||
dtd = "-//org.sleuthkit.autopsy.persona//PersonaDetails//EN",
|
@TopComponent.Registration(mode = "personadetails", openAtStartup = false)
|
||||||
autostore = false
|
@RetainLocation("personadetails")
|
||||||
)
|
@SuppressWarnings("PMD.SingularField")
|
||||||
@TopComponent.Description(
|
|
||||||
preferredID = "PersonaDetailsTopComponent",
|
|
||||||
//iconBase="SET/PATH/TO/ICON/HERE",
|
|
||||||
persistenceType = TopComponent.PERSISTENCE_ALWAYS
|
|
||||||
)
|
|
||||||
@TopComponent.Registration(mode = "geolocation", openAtStartup = false)
|
|
||||||
@ActionID(category = "Window", id = "org.sleuthkit.autopsy.persona.PersonaDetailsTopComponent")
|
|
||||||
@ActionReference(path = "Menu/Window" /*, position = 333 */)
|
|
||||||
@TopComponent.OpenActionRegistration(
|
|
||||||
displayName = "#CTL_PersonaDetailsAction",
|
|
||||||
preferredID = "PersonaDetailsTopComponent"
|
|
||||||
)
|
|
||||||
@Messages({
|
|
||||||
"CTL_PersonaDetailsAction=PersonaDetails",
|
|
||||||
"CTL_PersonaDetailsTopComponent=PersonaDetails Window",
|
|
||||||
"HINT_PersonaDetailsTopComponent=This is a PersonaDetails window"
|
|
||||||
})
|
|
||||||
public final class PersonaDetailsTopComponent extends TopComponent {
|
public final class PersonaDetailsTopComponent extends TopComponent {
|
||||||
|
|
||||||
|
@Messages({
|
||||||
|
"PTopComponent_Name=Persona Details"
|
||||||
|
})
|
||||||
public PersonaDetailsTopComponent() {
|
public PersonaDetailsTopComponent() {
|
||||||
initComponents();
|
initComponents();
|
||||||
setName(Bundle.CTL_PersonaDetailsTopComponent());
|
setName(Bundle.PTopComponent_Name());
|
||||||
setToolTipText(Bundle.HINT_PersonaDetailsTopComponent());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -187,7 +183,7 @@ public final class PersonaDetailsTopComponent extends TopComponent {
|
|||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void resultNameFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resultNameFieldActionPerformed
|
private void resultNameFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resultNameFieldActionPerformed
|
||||||
// TODO add your handling code here:
|
|
||||||
}//GEN-LAST:event_resultNameFieldActionPerformed
|
}//GEN-LAST:event_resultNameFieldActionPerformed
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
@ -204,25 +200,10 @@ public final class PersonaDetailsTopComponent extends TopComponent {
|
|||||||
private javax.swing.JTextField resultNameField;
|
private javax.swing.JTextField resultNameField;
|
||||||
private javax.swing.JLabel resultNameLbl;
|
private javax.swing.JLabel resultNameLbl;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void componentOpened() {
|
public void componentOpened() {
|
||||||
// TODO add custom code on component opening
|
super.componentOpened();
|
||||||
}
|
WindowManager.getDefault().setTopComponentFloating(this, true);
|
||||||
|
|
||||||
@Override
|
|
||||||
public void componentClosed() {
|
|
||||||
// TODO add custom code on component closing
|
|
||||||
}
|
|
||||||
|
|
||||||
void writeProperties(java.util.Properties p) {
|
|
||||||
// better to version settings since initial version as advocated at
|
|
||||||
// http://wiki.apidesign.org/wiki/PropertyFiles
|
|
||||||
p.setProperty("version", "1.0");
|
|
||||||
// TODO store your settings
|
|
||||||
}
|
|
||||||
|
|
||||||
void readProperties(java.util.Properties p) {
|
|
||||||
String version = p.getProperty("version");
|
|
||||||
// TODO read your settings according to their version
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,11 @@ import java.awt.event.ActionEvent;
|
|||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
import javax.swing.ListSelectionModel;
|
import javax.swing.ListSelectionModel;
|
||||||
import javax.swing.table.DefaultTableModel;
|
import javax.swing.table.DefaultTableModel;
|
||||||
import org.openide.util.Exceptions;
|
import org.openide.util.Exceptions;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.openide.windows.Mode;
|
|
||||||
import org.openide.windows.RetainLocation;
|
import org.openide.windows.RetainLocation;
|
||||||
import org.openide.windows.TopComponent;
|
import org.openide.windows.TopComponent;
|
||||||
import org.openide.windows.WindowManager;
|
import org.openide.windows.WindowManager;
|
||||||
@ -213,14 +210,4 @@ public final class PersonaSearchTopComponent extends TopComponent {
|
|||||||
private javax.swing.JPanel searchPanel;
|
private javax.swing.JPanel searchPanel;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Mode> availableModes(List<Mode> modes) {
|
|
||||||
/*
|
|
||||||
* This looks like the right thing to do, but online discussions seems
|
|
||||||
* to indicate this method is effectively deprecated. A break point
|
|
||||||
* placed here was never hit.
|
|
||||||
*/
|
|
||||||
return modes.stream().filter(mode -> mode.getName().equals("personasearch"))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user