mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
6837 change disabling of details area to re-enable size adjustment
This commit is contained in:
parent
d39ae93440
commit
04be4fe897
@ -38,6 +38,7 @@ import org.openide.windows.TopComponent;
|
|||||||
import org.openide.windows.WindowManager;
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
|
||||||
import org.sleuthkit.autopsy.discovery.search.DiscoveryEventUtils;
|
import org.sleuthkit.autopsy.discovery.search.DiscoveryEventUtils;
|
||||||
|
import static org.sleuthkit.autopsy.discovery.search.SearchData.Type.DOMAIN;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a dialog for displaying the Discovery results.
|
* Create a dialog for displaying the Discovery results.
|
||||||
@ -108,7 +109,7 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
BasicSplitPaneDividerImpl(BasicSplitPaneUI ui) {
|
BasicSplitPaneDividerImpl(BasicSplitPaneUI ui) {
|
||||||
super(ui);
|
super(ui);
|
||||||
this.setLayout(new BorderLayout());
|
this.setLayout(new BorderLayout());
|
||||||
this.add(new ResultsSplitPaneDivider(resultsPanel));
|
this.add(new ResultsSplitPaneDivider());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -258,17 +259,19 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
*/
|
*/
|
||||||
@Subscribe
|
@Subscribe
|
||||||
void handleDetailsVisibleEvent(DiscoveryEventUtils.DetailsVisibleEvent detailsVisibleEvent) {
|
void handleDetailsVisibleEvent(DiscoveryEventUtils.DetailsVisibleEvent detailsVisibleEvent) {
|
||||||
if (animator != null && animator.isRunning()) {
|
if (resultsPanel.getActiveType() != DOMAIN) {
|
||||||
animator.stop();
|
if (animator != null && animator.isRunning()) {
|
||||||
animator = null;
|
animator.stop();
|
||||||
|
animator = null;
|
||||||
|
}
|
||||||
|
dividerLocation = rightSplitPane.getDividerLocation();
|
||||||
|
if (detailsVisibleEvent.isShowDetailsArea()) {
|
||||||
|
animator = new SwingAnimator(new ShowDetailsAreaCallback());
|
||||||
|
} else {
|
||||||
|
animator = new SwingAnimator(new HideDetailsAreaCallback());
|
||||||
|
}
|
||||||
|
animator.start();
|
||||||
}
|
}
|
||||||
dividerLocation = rightSplitPane.getDividerLocation();
|
|
||||||
if (detailsVisibleEvent.isShowDetailsArea()) {
|
|
||||||
animator = new SwingAnimator(new ShowDetailsAreaCallback());
|
|
||||||
} else {
|
|
||||||
animator = new SwingAnimator(new HideDetailsAreaCallback());
|
|
||||||
}
|
|
||||||
animator.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -286,6 +289,8 @@ public final class DiscoveryTopComponent extends TopComponent {
|
|||||||
newSearchButton.setText(Bundle.DiscoveryTopComponent_cancelButton_text());
|
newSearchButton.setText(Bundle.DiscoveryTopComponent_cancelButton_text());
|
||||||
progressMessageTextArea.setForeground(Color.red);
|
progressMessageTextArea.setForeground(Color.red);
|
||||||
progressMessageTextArea.setText(Bundle.DiscoveryTopComponent_searchInProgress_text(searchStartedEvent.getType().name()));
|
progressMessageTextArea.setText(Bundle.DiscoveryTopComponent_searchInProgress_text(searchStartedEvent.getType().name()));
|
||||||
|
rightSplitPane.getComponent(1).setVisible(searchStartedEvent.getType() != DOMAIN);
|
||||||
|
rightSplitPane.getComponent(2).setVisible(searchStartedEvent.getType() != DOMAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,10 +19,8 @@
|
|||||||
package org.sleuthkit.autopsy.discovery.ui;
|
package org.sleuthkit.autopsy.discovery.ui;
|
||||||
|
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.event.MouseEvent;
|
|
||||||
import java.awt.event.MouseMotionListener;
|
|
||||||
import org.sleuthkit.autopsy.discovery.search.DiscoveryEventUtils;
|
import org.sleuthkit.autopsy.discovery.search.DiscoveryEventUtils;
|
||||||
import org.sleuthkit.autopsy.discovery.search.SearchData;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Panel for separating the results list from the details area.
|
* Panel for separating the results list from the details area.
|
||||||
@ -30,29 +28,12 @@ import org.sleuthkit.autopsy.discovery.search.SearchData;
|
|||||||
final class ResultsSplitPaneDivider extends javax.swing.JPanel {
|
final class ResultsSplitPaneDivider extends javax.swing.JPanel {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private final ResultsPanel resultsPanel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form LabeledSplitPaneDivider.
|
* Creates new form LabeledSplitPaneDivider.
|
||||||
*/
|
*/
|
||||||
ResultsSplitPaneDivider(ResultsPanel resultsPanel) {
|
ResultsSplitPaneDivider() {
|
||||||
initComponents();
|
initComponents();
|
||||||
this.resultsPanel = resultsPanel;
|
|
||||||
this.addMouseMotionListener(new MouseMotionListener() {
|
|
||||||
@Override
|
|
||||||
public void mouseDragged(MouseEvent e) {
|
|
||||||
if (resultsPanel.getActiveType() == SearchData.Type.DOMAIN) {
|
|
||||||
e.consume();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void mouseMoved(MouseEvent e) {
|
|
||||||
if (resultsPanel.getActiveType() == SearchData.Type.DOMAIN) {
|
|
||||||
e.consume();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -129,16 +110,10 @@ final class ResultsSplitPaneDivider extends javax.swing.JPanel {
|
|||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void showButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showButtonActionPerformed
|
private void showButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showButtonActionPerformed
|
||||||
if (resultsPanel.getActiveType() == SearchData.Type.DOMAIN) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(true));
|
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(true));
|
||||||
}//GEN-LAST:event_showButtonActionPerformed
|
}//GEN-LAST:event_showButtonActionPerformed
|
||||||
|
|
||||||
private void hideButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideButtonActionPerformed
|
private void hideButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideButtonActionPerformed
|
||||||
if (resultsPanel.getActiveType() == SearchData.Type.DOMAIN) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(false));
|
DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.DetailsVisibleEvent(false));
|
||||||
}//GEN-LAST:event_hideButtonActionPerformed
|
}//GEN-LAST:event_hideButtonActionPerformed
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user