mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Miscellaneous trival cleanup
This commit is contained in:
parent
c903011f7a
commit
53142025da
@ -60,7 +60,6 @@ class AddImageWizardIterator implements WizardDescriptor.Iterator<WizardDescript
|
||||
if (c instanceof JComponent) { // assume Swing components
|
||||
JComponent jc = (JComponent) c;
|
||||
// Sets step number of a component
|
||||
// TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:
|
||||
jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i));
|
||||
// Sets steps names for a panel
|
||||
jc.putClientProperty("WizardPanel_contentData", steps);
|
||||
|
@ -54,7 +54,7 @@ import org.sleuthkit.datamodel.SleuthkitJNI.CaseDbHandle.AddImageProcess;
|
||||
*/
|
||||
public class Case {
|
||||
// change the CTL_MainWindow_Title in Bundle.properties as well if you change this value
|
||||
private static final String autopsyVer = "3.0.0b2"; // current version of autopsy. Changed it when the version is changed
|
||||
private static final String autopsyVer = "3.0.0b2"; // current version of autopsy. Change it when the version is changed
|
||||
private static final String appName = "Autopsy " + autopsyVer;
|
||||
|
||||
/**
|
||||
@ -150,8 +150,7 @@ public class Case {
|
||||
currentCase = newCase;
|
||||
|
||||
pcs.firePropertyChange(CASE_CURRENT_CASE, null, currentCase);
|
||||
//TODO: This will fire off a bunch of stuff in CaseListener.propertyChange()
|
||||
// that should probably be migrated into here
|
||||
// TODO: This will fire off a bunch of stuff in CaseListener.propertyChange() that should probably be migrated into here
|
||||
|
||||
pcs.firePropertyChange(CASE_NAME, "", currentCase.name);
|
||||
RecentCases.getInstance().addRecentCase(currentCase.name, currentCase.configFilePath); // update the recent cases
|
||||
|
@ -37,6 +37,7 @@ import org.sleuthkit.autopsy.logging.Log;
|
||||
*/
|
||||
@ServiceProvider(service = CaseOpenAction.class)
|
||||
public final class CaseOpenAction implements ActionListener {
|
||||
private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName());
|
||||
|
||||
JFileChooser fc = new JFileChooser();
|
||||
GeneralFilter autFilter = new GeneralFilter(new String[]{".aut"}, "AUTOPSY File (*.aut)", false);
|
||||
@ -73,7 +74,7 @@ public final class CaseOpenAction implements ActionListener {
|
||||
StartupWindow.getInstance().close();
|
||||
} catch (Exception ex) {
|
||||
// no need to show the error message to the user.
|
||||
// TODO: But maybe put the error message in the log in the future.
|
||||
logger.log(Level.INFO, "Error closing startup window.", ex);
|
||||
}
|
||||
try {
|
||||
Case.open(path); // open the case
|
||||
|
@ -119,7 +119,6 @@ public final class NewCaseWizardAction extends CallableSystemAction {
|
||||
if (c instanceof JComponent) { // assume Swing components
|
||||
JComponent jc = (JComponent) c;
|
||||
// Sets step number of a component
|
||||
// TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:
|
||||
jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i));
|
||||
// Sets steps names for a panel
|
||||
jc.putClientProperty("WizardPanel_contentData", steps);
|
||||
|
@ -191,7 +191,6 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_cancelButtonActionPerformed
|
||||
|
||||
|
||||
|
@ -43,8 +43,7 @@ public interface DataContentViewer {
|
||||
* instance returned by the Lookup as a factory for the instances that
|
||||
* are actually used.)
|
||||
*/
|
||||
// TODO: extract the factory method out into a seperate interface that
|
||||
// is used for the Lookup.
|
||||
// TODO: extract the factory method out into a seperate interface that is used for the Lookup.
|
||||
public DataContentViewer getInstance();
|
||||
|
||||
/**
|
||||
|
@ -274,7 +274,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
|
||||
@Override
|
||||
public void setNode(Node selectedNode) {
|
||||
if (selectedNode != null) {
|
||||
Content content = ((Node) selectedNode).getLookup().lookup(Content.class);
|
||||
Content content = (selectedNode).getLookup().lookup(Content.class);
|
||||
if (content != null) {
|
||||
this.setDataView(content, 0, false);
|
||||
return;
|
||||
|
@ -131,9 +131,7 @@ public class DataContentViewerPicture extends javax.swing.JPanel implements Data
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupported(Node cNode) {
|
||||
Node node = (Node) cNode;
|
||||
|
||||
public boolean isSupported(Node node) {
|
||||
if (node != null) {
|
||||
// Note: only supports JPG, GIF, and PNG for now
|
||||
return node.getDisplayName().toLowerCase().endsWith(".jpg")
|
||||
|
@ -268,7 +268,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
|
||||
@Override
|
||||
public void setNode(Node selectedNode) {
|
||||
if (selectedNode != null) {
|
||||
Content content = ((Node) selectedNode).getLookup().lookup(Content.class);
|
||||
Content content = selectedNode.getLookup().lookup(Content.class);
|
||||
if (content != null) {
|
||||
this.setDataView(content, 0, false);
|
||||
return;
|
||||
|
@ -38,7 +38,6 @@ import org.openide.nodes.Node.PropertySet;
|
||||
import org.openide.nodes.Sheet;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer;
|
||||
// TODO We should not have anything specific to Image in here...
|
||||
|
||||
/**
|
||||
* DataResult sortable table viewer
|
||||
@ -145,13 +144,13 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
|
||||
|
||||
if (selectedNode != null) {
|
||||
hasChildren = ((Node) selectedNode).getChildren().getNodesCount() > 0;
|
||||
hasChildren = selectedNode.getChildren().getNodesCount() > 0;
|
||||
}
|
||||
|
||||
|
||||
// if there's no selection node, do nothing
|
||||
if (hasChildren) {
|
||||
Node root = (Node) selectedNode;
|
||||
Node root = selectedNode;
|
||||
|
||||
if (!(root instanceof TableFilterNode)) {
|
||||
root = new TableFilterNode(root, true);
|
||||
@ -161,7 +160,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
|
||||
|
||||
OutlineView ov = ((OutlineView) this.tableScrollPanel);
|
||||
|
||||
List<Node.Property> tempProps = new ArrayList<Node.Property>(Arrays.asList(getChildPropertyHeaders((Node) selectedNode)));
|
||||
List<Node.Property> tempProps = new ArrayList<Node.Property>(Arrays.asList(getChildPropertyHeaders(selectedNode)));
|
||||
|
||||
tempProps.remove(0);
|
||||
|
||||
|
@ -170,7 +170,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
|
||||
} catch (MalformedURLException ex) {
|
||||
//ignore
|
||||
}
|
||||
url = null; // TODO add your handling code here:
|
||||
url = null;
|
||||
}//GEN-LAST:event_jLabel1MouseClicked
|
||||
|
||||
private void activateVerboseLogging(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activateVerboseLogging
|
||||
|
@ -35,7 +35,7 @@ class ThumbnailViewChildren extends FilterNode.Children {
|
||||
|
||||
/** the constructor */
|
||||
ThumbnailViewChildren(Node arg) {
|
||||
super((Node) arg);
|
||||
super(arg);
|
||||
this.totalChildren = 1;
|
||||
}
|
||||
|
||||
|
@ -34,12 +34,14 @@ import org.sleuthkit.autopsy.logging.Log;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskException;
|
||||
|
||||
// TODO: clean up external viewer action
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jantonius
|
||||
*/
|
||||
public class ExternalViewerAction extends AbstractAction {
|
||||
|
||||
private byte[] content;
|
||||
private Content contentObject;
|
||||
private String fileName;
|
||||
|
@ -47,7 +47,7 @@ class NewWindowViewAction extends AbstractAction{
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Log.noteAction(this.getClass());
|
||||
|
||||
String[] filePaths = ContentUtils.getDisplayPath(((Node) contentNode).getLookup().lookup(Content.class));
|
||||
String[] filePaths = ContentUtils.getDisplayPath((contentNode).getLookup().lookup(Content.class));
|
||||
String filePath = DataConversion.getformattedPath(filePaths, 0);
|
||||
|
||||
DataContentTopComponent dctc = DataContentTopComponent.createUndocked(filePath, this.contentNode);
|
||||
|
@ -84,8 +84,7 @@ class ShowDetailActionVisitor extends ContentVisitor.Default<List<? extends Acti
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
// TODO: fix log action
|
||||
Log.noteAction(this.getClass());
|
||||
Log.noteAction(ShowDetailActionVisitor.class);
|
||||
|
||||
final JFrame frame = new JFrame(title);
|
||||
final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal
|
||||
@ -146,9 +145,8 @@ class ShowDetailActionVisitor extends ContentVisitor.Default<List<? extends Acti
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
|
||||
// TODO: fix log action
|
||||
Log.noteAction(this.getClass());
|
||||
|
||||
Log.noteAction(ShowDetailActionVisitor.class);
|
||||
|
||||
final JFrame frame = new JFrame(title);
|
||||
final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal
|
||||
@ -237,9 +235,7 @@ class ShowDetailActionVisitor extends ContentVisitor.Default<List<? extends Acti
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
// TODO: fix log action
|
||||
Log.noteAction(this.getClass());
|
||||
Log.noteAction(ShowDetailActionVisitor.class);
|
||||
|
||||
final JFrame frame = new JFrame(title);
|
||||
final JDialog popUpWindow = new JDialog(frame, title, true); // to make the popUp Window to be modal
|
||||
|
@ -82,7 +82,6 @@ class DateSearchPanel extends javax.swing.JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: calendar button stuff
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
|
@ -71,8 +71,10 @@ class FilterArea extends JPanel {
|
||||
|
||||
private void init() {
|
||||
|
||||
// TODO: this icon (and its twin) should be used in the toggle button
|
||||
// this.dateFiltersButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/filesearch/arrow_down.gif"))); // NOI18N
|
||||
|
||||
|
||||
// Commmented-out code is for collapable filter areas
|
||||
// this.dateFiltersButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/filesearch/arrow_down.gif"))); // NOI18N
|
||||
|
||||
// toggleButton = new JButton();
|
||||
// toggleButton.setAlignmentX(Component.CENTER_ALIGNMENT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user