Autopsy  4.16.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
StartupWindow.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2017 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.Dimension;
22 import java.awt.event.ActionEvent;
23 import java.awt.event.ActionListener;
24 import javax.swing.JDialog;
25 import org.openide.util.NbBundle;
26 import org.openide.util.lookup.ServiceProvider;
27 import org.openide.windows.WindowManager;
28 
32 @ServiceProvider(service = StartupWindowInterface.class)
33 public final class StartupWindow extends JDialog implements StartupWindowInterface {
34 
35  private static final long serialVersionUID = 1L;
36  private static final String TITLE = NbBundle.getMessage(StartupWindow.class, "StartupWindow.title.text");
37  private static final Dimension DIMENSIONS = new Dimension(750, 400);
38  private static CueBannerPanel welcomeWindow;
39 
40  public StartupWindow() {
41  super(WindowManager.getDefault().getMainWindow(), TITLE, true);
42  init();
43  }
44 
45  private void init() {
46 
47  setSize(DIMENSIONS);
48  welcomeWindow = new CueBannerPanel();
49  welcomeWindow.setCloseButtonActionListener(new ActionListener() {
50  @Override
51  public void actionPerformed(ActionEvent e) {
52  close();
53  }
54  });
55  add(welcomeWindow);
56  pack();
57  setResizable(false);
58  }
59 
60  @Override
61  public void open() {
62  if (welcomeWindow != null) {
63  welcomeWindow.refresh();
64  }
65  setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
66  setVisible(true);
67  }
68 
69  @Override
70  public void close() {
71  this.setVisible(false);
72  }
73 }

Copyright © 2012-2020 Basis Technology. Generated on: Tue Sep 22 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.