mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Inbox message: details view in the same position, using layers, replacing message view
This commit is contained in:
parent
80fee3e815
commit
ae28fd06a3
@ -22,7 +22,7 @@ IngestTopComponent.refreshFreqLabel.text=Refresh frequency
|
||||
IngestDialogPanel.freqSliderLabel.text=Refresh interval (minutes)
|
||||
IngestDialogPanel.freqSliderLabel.toolTipText=null
|
||||
IngestDialogPanel.freqSlider.toolTipText=<html>Maximum time in minutes for ingest modules to refresh and report data to user. <br />Lower value presents data more frequently but may impact performance and lenghten the overall ingest run.<br />Higher value is improves performance, but data will be refreshed less frequently (recommended for an unattended run).<br />The value can be adjusted only when no ingest module is currently running</html>
|
||||
IngestMessagePanel.viewArtifactButton.toolTipText=Open in a viewer
|
||||
IngestMessagePanel.viewArtifactButton.text=View Artifact
|
||||
IngestMessagePanel.detailsViewerPane.contentType=text/html
|
||||
IngestMessagePanel.viewContentButton.text=View Content
|
||||
IngestMessageDetailsPanel.backButton.text=B
|
||||
IngestMessageDetailsPanel.viewArtifactButton.text=View Artifact
|
||||
IngestMessageDetailsPanel.viewContentButton.text=View Content
|
||||
IngestMessageDetailsPanel.messageDetailsPane.contentType=text/html
|
||||
|
@ -0,0 +1,96 @@
|
||||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="backButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="viewArtifactButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="viewContentButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="28" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" alignment="0" pref="285" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="backButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="viewArtifactButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="viewContentButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="149" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="backButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessageDetailsPanel.backButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="viewArtifactButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessageDetailsPanel.viewArtifactButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="viewArtifactButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="viewContentButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessageDetailsPanel.viewContentButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="viewContentButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JEditorPane" name="messageDetailsPane">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="eb" green="dd" red="dd" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="contentType" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessageDetailsPanel.messageDetailsPane.contentType" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -0,0 +1,180 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 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.ingest;
|
||||
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.BlackboardResultViewer;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
|
||||
/**
|
||||
* Details panel within IngestMessagePanel
|
||||
*/
|
||||
class IngestMessageDetailsPanel extends javax.swing.JPanel {
|
||||
|
||||
private IngestMessageMainPanel mainPanel;
|
||||
|
||||
/** Creates new form IngestMessageDetailsPanel */
|
||||
IngestMessageDetailsPanel(IngestMessageMainPanel mainPanel) {
|
||||
this.mainPanel = mainPanel;
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
messageDetailsPane.setContentType("text/html");
|
||||
viewArtifactButton.setEnabled(false);
|
||||
viewContentButton.setEnabled(false);
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
backButton = new javax.swing.JButton();
|
||||
viewArtifactButton = new javax.swing.JButton();
|
||||
viewContentButton = new javax.swing.JButton();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
messageDetailsPane = new javax.swing.JEditorPane();
|
||||
|
||||
backButton.setText(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.backButton.text")); // NOI18N
|
||||
backButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
backButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
viewArtifactButton.setText(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.viewArtifactButton.text")); // NOI18N
|
||||
viewArtifactButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
viewArtifactButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
viewContentButton.setText(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.viewContentButton.text")); // NOI18N
|
||||
viewContentButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
viewContentButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
messageDetailsPane.setBackground(new java.awt.Color(221, 221, 235));
|
||||
messageDetailsPane.setContentType(org.openide.util.NbBundle.getMessage(IngestMessageDetailsPanel.class, "IngestMessageDetailsPanel.messageDetailsPane.contentType")); // NOI18N
|
||||
messageDetailsPane.setEditable(false);
|
||||
jScrollPane1.setViewportView(messageDetailsPane);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(backButton)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(viewArtifactButton)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(viewContentButton)
|
||||
.addContainerGap(28, Short.MAX_VALUE))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 285, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(backButton)
|
||||
.addComponent(viewArtifactButton)
|
||||
.addComponent(viewContentButton))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void viewContentButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewContentButtonActionPerformed
|
||||
viewContent(evt);
|
||||
}//GEN-LAST:event_viewContentButtonActionPerformed
|
||||
|
||||
private void viewArtifactButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewArtifactButtonActionPerformed
|
||||
viewArtifact(evt);
|
||||
}//GEN-LAST:event_viewArtifactButtonActionPerformed
|
||||
|
||||
private void backButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backButtonActionPerformed
|
||||
mainPanel.showMessages();
|
||||
}//GEN-LAST:event_backButtonActionPerformed
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton backButton;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JEditorPane messageDetailsPane;
|
||||
private javax.swing.JButton viewArtifactButton;
|
||||
private javax.swing.JButton viewContentButton;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
private void viewArtifact(java.awt.event.ActionEvent evt) {
|
||||
|
||||
final IngestMessage message = mainPanel.getMessagePanel().getSelectedMessage();
|
||||
if (message != null) {
|
||||
BlackboardArtifact art = message.getData();
|
||||
if (art != null) {
|
||||
BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
|
||||
v.viewArtifact(art);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void viewContent(java.awt.event.ActionEvent evt) {
|
||||
|
||||
final IngestMessage message = mainPanel.getMessagePanel().getSelectedMessage();
|
||||
if (message != null) {
|
||||
BlackboardArtifact art = message.getData();
|
||||
if (art != null) {
|
||||
BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
|
||||
v.viewArtifactContent(art);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void showDetails(int rowNumber) {
|
||||
final IngestMessage message = mainPanel.getMessagePanel().getMessage(rowNumber);
|
||||
if (message != null) {
|
||||
String details = message.getDetails();
|
||||
if (details != null) {
|
||||
this.messageDetailsPane.setText(details);
|
||||
} else {
|
||||
this.messageDetailsPane.setText("");
|
||||
}
|
||||
if (message.getData() != null) {
|
||||
viewArtifactButton.setEnabled(true);
|
||||
viewContentButton.setEnabled(true);
|
||||
} else {
|
||||
viewArtifactButton.setEnabled(false);
|
||||
viewContentButton.setEnabled(false);
|
||||
}
|
||||
} else {
|
||||
viewArtifactButton.setEnabled(false);
|
||||
viewContentButton.setEnabled(false);
|
||||
messageDetailsPane.setText("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="layeredPane" alignment="0" pref="454" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="layeredPane" alignment="0" pref="309" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JLayeredPane" name="layeredPane">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JLayeredPaneSupportLayout"/>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -0,0 +1,156 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 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.ingest;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ComponentEvent;
|
||||
import java.awt.event.ComponentListener;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JLayeredPane;
|
||||
|
||||
/**
|
||||
* the main layered pane container for messages table (IngestMessagePanel)
|
||||
* and details view (IngestMessageDetailsPanel)
|
||||
*/
|
||||
public class IngestMessageMainPanel extends javax.swing.JPanel {
|
||||
|
||||
private IngestMessagePanel messagePanel;
|
||||
private IngestMessageDetailsPanel detailsPanel;
|
||||
private Logger logger = Logger.getLogger(IngestMessageMainPanel.class.getName());
|
||||
|
||||
/** Creates new form IngestMessageMainPanel */
|
||||
public IngestMessageMainPanel() {
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
private void customizeComponents() {
|
||||
messagePanel = new IngestMessagePanel(this);
|
||||
detailsPanel = new IngestMessageDetailsPanel(this);
|
||||
|
||||
//we need to handle resizing ourselves due to absence of layout manager
|
||||
//in layered layout
|
||||
this.addComponentListener(new ComponentListener() {
|
||||
|
||||
@Override
|
||||
public void componentHidden(ComponentEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void componentMoved(ComponentEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void componentShown(ComponentEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void componentResized(ComponentEvent e) {
|
||||
setSize();
|
||||
}
|
||||
});
|
||||
|
||||
layeredPane.add(messagePanel, JLayeredPane.PALETTE_LAYER);
|
||||
layeredPane.add(detailsPanel, JLayeredPane.DEFAULT_LAYER);
|
||||
|
||||
//TODO handle the initial size better so it resizes to current tc size
|
||||
//(somehow the initial tc size is not set correctly)
|
||||
//setBackground(Color.red);
|
||||
//layeredPane.setBackground(Color.GREEN);
|
||||
//messagePanel.setBackground(Color.blue);
|
||||
Dimension dim = getPreferredSize();
|
||||
messagePanel.setSize(dim);
|
||||
detailsPanel.setSize(dim);
|
||||
|
||||
//messagePanel.setBounds(0, 0, dim.width, dim.height);
|
||||
// detailsPanel.setBounds(0, 0, dim.width, dim.height);
|
||||
|
||||
this.setOpaque(true);
|
||||
}
|
||||
|
||||
private void setSize() {
|
||||
//we need to handle resizing ourselves due to absence of layout manager
|
||||
//in layered layout
|
||||
Dimension dim = getSize();
|
||||
messagePanel.setPreferredSize(dim);
|
||||
detailsPanel.setPreferredSize(dim);
|
||||
|
||||
messagePanel.setBounds(0, 0, dim.width, dim.height);
|
||||
detailsPanel.setBounds(0, 0, dim.width, dim.height);
|
||||
|
||||
}
|
||||
|
||||
IngestMessagePanel getMessagePanel() {
|
||||
return messagePanel;
|
||||
}
|
||||
|
||||
IngestMessageDetailsPanel getDetailsPanel() {
|
||||
return detailsPanel;
|
||||
}
|
||||
|
||||
void showMessages() {
|
||||
layeredPane.setLayer(detailsPanel, JLayeredPane.DEFAULT_LAYER);
|
||||
layeredPane.setLayer(messagePanel, JLayeredPane.PALETTE_LAYER);
|
||||
}
|
||||
|
||||
void showDetails(int rowNumber) {
|
||||
detailsPanel.showDetails(rowNumber);
|
||||
|
||||
layeredPane.setLayer(detailsPanel, JLayeredPane.PALETTE_LAYER);
|
||||
layeredPane.setLayer(messagePanel, JLayeredPane.DEFAULT_LAYER);
|
||||
|
||||
}
|
||||
|
||||
public void addMessage(IngestMessage ingestMessage) {
|
||||
messagePanel.addMessage(ingestMessage);
|
||||
}
|
||||
|
||||
public void clearMessages() {
|
||||
messagePanel.clearMessages();
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
layeredPane = new javax.swing.JLayeredPane();
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(layeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(layeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLayeredPane layeredPane;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
@ -19,28 +19,12 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace pref="106" max="32767" attributes="0"/>
|
||||
<Component id="viewArtifactButton" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="viewContentButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane2" alignment="1" pref="314" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" alignment="0" pref="314" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="viewContentButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="viewArtifactButton" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="144" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane2" min="-2" pref="85" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane1" pref="144" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
@ -90,48 +74,5 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JEditorPane" name="detailsViewerPane">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="eb" green="dd" red="dd" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="contentType" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessagePanel.detailsViewerPane.contentType" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="viewArtifactButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessagePanel.viewArtifactButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessagePanel.viewArtifactButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="viewArtifactButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="viewContentButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestMessagePanel.viewContentButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="viewContentButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.ingest;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -32,29 +33,43 @@ import javax.swing.event.ListSelectionListener;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import javax.swing.table.TableColumn;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.BlackboardResultViewer;
|
||||
import org.sleuthkit.autopsy.ingest.IngestMessage.*;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
|
||||
/**
|
||||
* Notification window showing messages from services to user
|
||||
*
|
||||
*/
|
||||
public class IngestMessagePanel extends javax.swing.JPanel {
|
||||
class IngestMessagePanel extends javax.swing.JPanel {
|
||||
|
||||
private MessageTableModel tableModel;
|
||||
private IngestMessageMainPanel mainPanel;
|
||||
private static Font visitedFont = new Font("Arial", Font.PLAIN, 11);
|
||||
private static Font notVisitedFont = new Font("Arial", Font.BOLD, 11);
|
||||
private int lastRowSelected = -1;
|
||||
|
||||
/** Creates new form IngestMessagePanel */
|
||||
public IngestMessagePanel() {
|
||||
public IngestMessagePanel(IngestMessageMainPanel mainPanel) {
|
||||
this.mainPanel = mainPanel;
|
||||
tableModel = new MessageTableModel();
|
||||
initComponents();
|
||||
customizeComponents();
|
||||
}
|
||||
|
||||
int getLastRowSelected() {
|
||||
return this.lastRowSelected;
|
||||
}
|
||||
|
||||
IngestMessage getSelectedMessage() {
|
||||
if (lastRowSelected < 0)
|
||||
return null;
|
||||
|
||||
return tableModel.getMessage(lastRowSelected);
|
||||
}
|
||||
|
||||
IngestMessage getMessage(int rowNumber) {
|
||||
return tableModel.getMessage(rowNumber);
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
@ -66,10 +81,6 @@ public class IngestMessagePanel extends javax.swing.JPanel {
|
||||
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
messageTable = new javax.swing.JTable();
|
||||
jScrollPane2 = new javax.swing.JScrollPane();
|
||||
detailsViewerPane = new javax.swing.JEditorPane();
|
||||
viewArtifactButton = new javax.swing.JButton();
|
||||
viewContentButton = new javax.swing.JButton();
|
||||
|
||||
setOpaque(false);
|
||||
|
||||
@ -90,89 +101,28 @@ public class IngestMessagePanel extends javax.swing.JPanel {
|
||||
messageTable.getTableHeader().setReorderingAllowed(false);
|
||||
jScrollPane1.setViewportView(messageTable);
|
||||
|
||||
detailsViewerPane.setBackground(new java.awt.Color(221, 221, 235));
|
||||
detailsViewerPane.setContentType(org.openide.util.NbBundle.getMessage(IngestMessagePanel.class, "IngestMessagePanel.detailsViewerPane.contentType")); // NOI18N
|
||||
detailsViewerPane.setEditable(false);
|
||||
jScrollPane2.setViewportView(detailsViewerPane);
|
||||
|
||||
viewArtifactButton.setText(org.openide.util.NbBundle.getMessage(IngestMessagePanel.class, "IngestMessagePanel.viewArtifactButton.text")); // NOI18N
|
||||
viewArtifactButton.setToolTipText(org.openide.util.NbBundle.getMessage(IngestMessagePanel.class, "IngestMessagePanel.viewArtifactButton.toolTipText")); // NOI18N
|
||||
viewArtifactButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
viewArtifactButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
viewContentButton.setText(org.openide.util.NbBundle.getMessage(IngestMessagePanel.class, "IngestMessagePanel.viewContentButton.text")); // NOI18N
|
||||
viewContentButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
viewContentButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap(106, Short.MAX_VALUE)
|
||||
.addComponent(viewArtifactButton)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(viewContentButton))
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(viewContentButton)
|
||||
.addComponent(viewArtifactButton))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void viewArtifactButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewArtifactButtonActionPerformed
|
||||
if (lastRowSelected < 0) {
|
||||
return;
|
||||
}
|
||||
final IngestMessage message = tableModel.getMessage(lastRowSelected);
|
||||
if (message != null) {
|
||||
BlackboardArtifact art = message.getData();
|
||||
if (art != null) {
|
||||
BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
|
||||
v.viewArtifact(art);
|
||||
}
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_viewArtifactButtonActionPerformed
|
||||
|
||||
private void viewContentButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewContentButtonActionPerformed
|
||||
if (lastRowSelected < 0) {
|
||||
return;
|
||||
}
|
||||
final IngestMessage message = tableModel.getMessage(lastRowSelected);
|
||||
if (message != null) {
|
||||
BlackboardArtifact art = message.getData();
|
||||
if (art != null) {
|
||||
BlackboardResultViewer v = Lookup.getDefault().lookup(BlackboardResultViewer.class);
|
||||
v.viewArtifactContent(art);
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_viewContentButtonActionPerformed
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JEditorPane detailsViewerPane;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JTable messageTable;
|
||||
private javax.swing.JButton viewArtifactButton;
|
||||
private javax.swing.JButton viewContentButton;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
private void customizeComponents() {
|
||||
mainPanel.setOpaque(true);
|
||||
jScrollPane1.setOpaque(true);
|
||||
messageTable.setOpaque(false);
|
||||
|
||||
jScrollPane1.setWheelScrollingEnabled(true);
|
||||
|
||||
messageTable.setAutoscrolls(true);
|
||||
@ -184,7 +134,7 @@ public class IngestMessagePanel extends javax.swing.JPanel {
|
||||
|
||||
//customize column witdhs
|
||||
//messageTable.setSize(260, 260);
|
||||
messageTable.setSize(messageTable.getParent().getPreferredSize());
|
||||
//messageTable.setSize(messageTable.getParent().getPreferredSize());
|
||||
final int width = messageTable.getSize().width;
|
||||
TableColumn column = null;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
@ -201,13 +151,15 @@ public class IngestMessagePanel extends javax.swing.JPanel {
|
||||
messageTable.setColumnSelectionAllowed(false);
|
||||
messageTable.setRowSelectionAllowed(true);
|
||||
messageTable.getSelectionModel().addListSelectionListener(new MessageVisitedSelection());
|
||||
|
||||
detailsViewerPane.setContentType("text/html");
|
||||
viewArtifactButton.setEnabled(false);
|
||||
viewContentButton.setEnabled(false);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSize(Dimension d) {
|
||||
super.setSize(d);
|
||||
messageTable.setSize(d);
|
||||
}
|
||||
|
||||
|
||||
public void addMessage(IngestMessage m) {
|
||||
tableModel.addMessage(m);
|
||||
//autoscroll
|
||||
@ -223,28 +175,6 @@ public class IngestMessagePanel extends javax.swing.JPanel {
|
||||
lastRowSelected = rowNumber;
|
||||
}
|
||||
|
||||
private void updateDetails(int rowNumber) {
|
||||
final IngestMessage message = tableModel.getMessage(rowNumber);
|
||||
if (message != null) {
|
||||
String details = message.getDetails();
|
||||
if (details != null) {
|
||||
this.detailsViewerPane.setText(details);
|
||||
} else {
|
||||
this.detailsViewerPane.setText("");
|
||||
}
|
||||
if (message.getData() != null) {
|
||||
viewArtifactButton.setEnabled(true);
|
||||
viewContentButton.setEnabled(true);
|
||||
} else {
|
||||
viewArtifactButton.setEnabled(false);
|
||||
viewContentButton.setEnabled(false);
|
||||
}
|
||||
} else {
|
||||
viewArtifactButton.setEnabled(false);
|
||||
viewContentButton.setEnabled(false);
|
||||
detailsViewerPane.setText("");
|
||||
}
|
||||
}
|
||||
|
||||
private class MessageTableModel extends AbstractTableModel {
|
||||
//data
|
||||
@ -453,11 +383,12 @@ public class IngestMessagePanel extends javax.swing.JPanel {
|
||||
}
|
||||
if (selected != -1) {
|
||||
setVisited(selected);
|
||||
updateDetails(selected);
|
||||
mainPanel.showDetails(selected);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -16,12 +16,12 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="385" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="332" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="362" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="210" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
|
@ -19,6 +19,7 @@
|
||||
package org.sleuthkit.autopsy.ingest;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.ArrayList;
|
||||
@ -41,7 +42,7 @@ public final class IngestMessageTopComponent extends TopComponent implements Ing
|
||||
|
||||
private static IngestMessageTopComponent instance;
|
||||
private static final Logger logger = Logger.getLogger(IngestMessageTopComponent.class.getName());
|
||||
private IngestMessagePanel messagePanel;
|
||||
private IngestMessageMainPanel messagePanel;
|
||||
private IngestManager manager;
|
||||
private static String PREFERRED_ID = "IngestMessageTopComponent";
|
||||
|
||||
@ -86,11 +87,11 @@ public final class IngestMessageTopComponent extends TopComponent implements Ing
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 385, Short.MAX_VALUE)
|
||||
.addGap(0, 332, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 362, Short.MAX_VALUE)
|
||||
.addGap(0, 210, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
@ -103,6 +104,8 @@ public final class IngestMessageTopComponent extends TopComponent implements Ing
|
||||
if (manager == null) {
|
||||
manager = IngestManager.getDefault();
|
||||
}
|
||||
|
||||
//messagePanel.setSize(this.getSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -131,6 +134,8 @@ public final class IngestMessageTopComponent extends TopComponent implements Ing
|
||||
mode.dockInto(this);
|
||||
this.open();
|
||||
}
|
||||
|
||||
//messagePanel.setSize(this.getSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -216,11 +221,12 @@ public final class IngestMessageTopComponent extends TopComponent implements Ing
|
||||
|
||||
private void customizeComponents() {
|
||||
//custom GUI setup not done by builder
|
||||
|
||||
messagePanel = new IngestMessagePanel();
|
||||
messagePanel.setOpaque(false);
|
||||
messagePanel = new IngestMessageMainPanel();
|
||||
messagePanel.setOpaque(true);
|
||||
setLayout(new BorderLayout());
|
||||
add(messagePanel, BorderLayout.CENTER);
|
||||
|
||||
//this.setBackground(Color.yellow);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,182 +0,0 @@
|
||||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="mainScrollPane" alignment="0" pref="340" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="mainScrollPane" alignment="0" pref="771" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="mainScrollPane">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[322, 749]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="mainPanel">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[322, 749]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="10" pref="10" max="10" attributes="0"/>
|
||||
<Component id="controlPanel" max="32767" attributes="1"/>
|
||||
<EmptySpace pref="48" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="messageFrame" min="-2" max="-2" attributes="1"/>
|
||||
<EmptySpace pref="58" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="controlPanel" min="-2" pref="56" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
|
||||
<Component id="messageFrame" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="415" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JInternalFrame" name="messageFrame">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo">
|
||||
<LineBorder roundedCorners="true" thickness="3">
|
||||
<Color PropertyName="color" blue="db" green="cd" id="InternalFrame.inactiveTitleBackground" palette="3" red="bf" type="palette"/>
|
||||
</LineBorder>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="maximizable" type="boolean" value="true"/>
|
||||
<Property name="resizable" type="boolean" value="true"/>
|
||||
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestTopComponent.messageFrame.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Hand Cursor"/>
|
||||
</Property>
|
||||
<Property name="frameIcon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="0" name="null"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[280, 260]"/>
|
||||
</Property>
|
||||
<Property name="visible" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="274" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="231" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="controlPanel">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="mainProgressBar" min="-2" pref="248" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="90" max="-2" attributes="0"/>
|
||||
<Component id="ingestProgressLabel" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="22" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="74" max="-2" attributes="0"/>
|
||||
<Component id="refreshFreqLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="116" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="mainProgressBar" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="ingestProgressLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="524" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="555" max="-2" attributes="0"/>
|
||||
<Component id="refreshFreqLabel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="refreshFreqLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestTopComponent.refreshFreqLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JProgressBar" name="mainProgressBar">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="ingestProgressLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/ingest/Bundle.properties" key="IngestTopComponent.ingestProgressLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -1,255 +0,0 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 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.ingest;
|
||||
|
||||
import java.awt.event.ComponentAdapter;
|
||||
import java.awt.event.ComponentEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.SwingUtilities;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.TopComponent;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.corecomponentinterfaces.DataExplorer;
|
||||
import org.sleuthkit.datamodel.Image;
|
||||
|
||||
/**
|
||||
* Top component explorer for the Ingest module.
|
||||
*/
|
||||
public final class IngestTopComponent extends TopComponent implements DataExplorer {
|
||||
|
||||
private static IngestTopComponent instance;
|
||||
private static final Logger logger = Logger.getLogger(IngestTopComponent.class.getName());
|
||||
private IngestMessagePanel messagePanel;
|
||||
|
||||
private IngestTopComponent() {
|
||||
initComponents();
|
||||
// customizeComponents();
|
||||
//registerListeners();
|
||||
setName(NbBundle.getMessage(IngestTopComponent.class, "CTL_IngestTopComponent"));
|
||||
setToolTipText(NbBundle.getMessage(IngestTopComponent.class, "HINT_IngestTopComponent"));
|
||||
//putClientProperty(TopComponent.PROP_UNDOCKING_DISABLED, Boolean.TRUE);
|
||||
putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.TRUE);
|
||||
|
||||
}
|
||||
|
||||
public static synchronized IngestTopComponent getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new IngestTopComponent();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TopComponent getTopComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
logger.log(Level.INFO, "Unhandled property change: " + evt.getPropertyName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPersistenceType() {
|
||||
return TopComponent.PERSISTENCE_NEVER;
|
||||
}
|
||||
|
||||
|
||||
private void customizeComponents() {
|
||||
//custom GUI setup not done by builder
|
||||
|
||||
messagePanel = new IngestMessagePanel();
|
||||
|
||||
messagePanel.setOpaque(false);
|
||||
messageFrame.setOpaque(false);
|
||||
messageFrame.addComponentListener(new ComponentAdapter() {
|
||||
|
||||
@Override
|
||||
public void componentResized(ComponentEvent e) {
|
||||
|
||||
super.componentResized(e);
|
||||
messageFrame.setPreferredSize(messageFrame.getSize());
|
||||
}
|
||||
});
|
||||
|
||||
//make messageframe on top
|
||||
this.setComponentZOrder(controlPanel, 1);
|
||||
messageFrame.setContentPane(messagePanel);
|
||||
messageFrame.pack();
|
||||
messageFrame.setVisible(true);
|
||||
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
*/
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
mainScrollPane = new javax.swing.JScrollPane();
|
||||
mainPanel = new javax.swing.JPanel();
|
||||
messageFrame = new javax.swing.JInternalFrame();
|
||||
controlPanel = new javax.swing.JPanel();
|
||||
refreshFreqLabel = new javax.swing.JLabel();
|
||||
mainProgressBar = new javax.swing.JProgressBar();
|
||||
ingestProgressLabel = new javax.swing.JLabel();
|
||||
|
||||
mainScrollPane.setPreferredSize(new java.awt.Dimension(322, 749));
|
||||
|
||||
mainPanel.setPreferredSize(new java.awt.Dimension(322, 749));
|
||||
|
||||
messageFrame.setBorder(new javax.swing.border.LineBorder(javax.swing.UIManager.getDefaults().getColor("InternalFrame.inactiveTitleBackground"), 3, true));
|
||||
messageFrame.setMaximizable(true);
|
||||
messageFrame.setResizable(true);
|
||||
messageFrame.setTitle(org.openide.util.NbBundle.getMessage(IngestTopComponent.class, "IngestTopComponent.messageFrame.title")); // NOI18N
|
||||
messageFrame.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
|
||||
messageFrame.setFrameIcon(null);
|
||||
messageFrame.setOpaque(true);
|
||||
messageFrame.setPreferredSize(new java.awt.Dimension(280, 260));
|
||||
messageFrame.setVisible(true);
|
||||
|
||||
javax.swing.GroupLayout messageFrameLayout = new javax.swing.GroupLayout(messageFrame.getContentPane());
|
||||
messageFrame.getContentPane().setLayout(messageFrameLayout);
|
||||
messageFrameLayout.setHorizontalGroup(
|
||||
messageFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 274, Short.MAX_VALUE)
|
||||
);
|
||||
messageFrameLayout.setVerticalGroup(
|
||||
messageFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 231, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(refreshFreqLabel, org.openide.util.NbBundle.getMessage(IngestTopComponent.class, "IngestTopComponent.refreshFreqLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(ingestProgressLabel, org.openide.util.NbBundle.getMessage(IngestTopComponent.class, "IngestTopComponent.ingestProgressLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout controlPanelLayout = new javax.swing.GroupLayout(controlPanel);
|
||||
controlPanel.setLayout(controlPanelLayout);
|
||||
controlPanelLayout.setHorizontalGroup(
|
||||
controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(controlPanelLayout.createSequentialGroup()
|
||||
.addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(controlPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(mainProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(controlPanelLayout.createSequentialGroup()
|
||||
.addGap(90, 90, 90)
|
||||
.addComponent(ingestProgressLabel)))
|
||||
.addContainerGap(22, Short.MAX_VALUE))
|
||||
.addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(controlPanelLayout.createSequentialGroup()
|
||||
.addGap(74, 74, 74)
|
||||
.addComponent(refreshFreqLabel)
|
||||
.addContainerGap(116, Short.MAX_VALUE)))
|
||||
);
|
||||
controlPanelLayout.setVerticalGroup(
|
||||
controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(controlPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(mainProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(ingestProgressLabel)
|
||||
.addContainerGap(524, Short.MAX_VALUE))
|
||||
.addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(controlPanelLayout.createSequentialGroup()
|
||||
.addGap(555, 555, 555)
|
||||
.addComponent(refreshFreqLabel)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
|
||||
mainPanel.setLayout(mainPanelLayout);
|
||||
mainPanelLayout.setHorizontalGroup(
|
||||
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(mainPanelLayout.createSequentialGroup()
|
||||
.addGap(10, 10, 10)
|
||||
.addComponent(controlPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap(48, Short.MAX_VALUE))
|
||||
.addGroup(mainPanelLayout.createSequentialGroup()
|
||||
.addComponent(messageFrame, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(58, Short.MAX_VALUE))
|
||||
);
|
||||
mainPanelLayout.setVerticalGroup(
|
||||
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(mainPanelLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(controlPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(27, 27, 27)
|
||||
.addComponent(messageFrame, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(415, 415, 415))
|
||||
);
|
||||
|
||||
mainScrollPane.setViewportView(mainPanel);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(mainScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(mainScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 771, Short.MAX_VALUE)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel controlPanel;
|
||||
private javax.swing.JLabel ingestProgressLabel;
|
||||
private javax.swing.JPanel mainPanel;
|
||||
private javax.swing.JProgressBar mainProgressBar;
|
||||
private javax.swing.JScrollPane mainScrollPane;
|
||||
private javax.swing.JInternalFrame messageFrame;
|
||||
private javax.swing.JLabel refreshFreqLabel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
@Override
|
||||
public void componentOpened() {
|
||||
logger.log(Level.INFO, "IngestTopComponent opened()");
|
||||
// IngestManager.getDefault(); //create initial instance
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void componentClosed() {
|
||||
logger.log(Level.INFO, "IngestTopComponent closed()");
|
||||
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
}
|
||||
|
||||
void readProperties(java.util.Properties p) {
|
||||
String version = p.getProperty("version");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -9,10 +9,10 @@
|
||||
<kind type="view" /> <!-- modal -->
|
||||
<!-- <kind type="editor" /> --> <!-- non-modal -->
|
||||
<state type="separated" />
|
||||
<constraints>
|
||||
<constraints>
|
||||
<path orientation="horizontal" number="100" weight="0.5"/>
|
||||
</constraints>
|
||||
<bounds x="8" y="710" width="369" height="421" />
|
||||
<bounds x="7" y="909" width="300" height="200" />
|
||||
<frame state="0"/>
|
||||
<!-- <active-tc id="IngestMessageTopComponent" /> -->
|
||||
<empty-behavior permanent="true"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user