Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
AddImageWizardSelectHostPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2021 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.casemodule;
20 
21 import java.awt.Component;
22 import java.beans.PropertyChangeEvent;
23 import java.beans.PropertyChangeListener;
24 import javax.swing.event.ChangeListener;
25 import org.openide.WizardDescriptor;
26 import org.openide.util.ChangeSupport;
27 import org.openide.util.HelpCtx;
28 import org.openide.util.NbBundle.Messages;
29 import org.sleuthkit.datamodel.Host;
31 
36 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
37 @Messages("AddImageWizardSelectHostPanel_title=Select Host To Add The Data Source To")
38 final class AddImageWizardSelectHostPanel extends ShortcutWizardDescriptorPanel implements PropertyChangeListener {
39 
40  private final AddImageWizardSelectHostVisual component = new AddImageWizardSelectHostVisual();
41  private final ChangeSupport changeSupport = new ChangeSupport(this);
42 
43  AddImageWizardSelectHostPanel() {
44  component.addListener(this);
45  }
46 
47  @Override
48  public Component getComponent() {
49  return component;
50  }
51 
52  @Override
53  public HelpCtx getHelp() {
54  return HelpCtx.DEFAULT_HELP;
55  }
56 
57  @Override
58  public void readSettings(WizardDescriptor data) {
59  }
60 
67  Host getSelectedHost() {
68  return component.getSelectedHost();
69  }
70 
71  @Override
72  public void storeSettings(WizardDescriptor data) {
73  }
74 
75  @Override
76  public boolean isValid() {
77  return component.hasValidData();
78  }
79 
80  @Override
81  public void addChangeListener(ChangeListener cl) {
82  changeSupport.addChangeListener(cl);
83  }
84 
85  @Override
86  public void removeChangeListener(ChangeListener cl) {
87  changeSupport.removeChangeListener(cl);
88  }
89 
90  @Override
91  public void propertyChange(PropertyChangeEvent evt) {
92  changeSupport.fireChange();
93  }
94 
95 
96 }

Copyright © 2012-2022 Basis Technology. Generated on: Tue Jun 27 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.