Autopsy  4.5.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  setSize(DIMENSIONS);
47  welcomeWindow = new CueBannerPanel();
48  welcomeWindow.setCloseButtonActionListener(new ActionListener() {
49  @Override
50  public void actionPerformed(ActionEvent e) {
51  close();
52  }
53  });
54  add(welcomeWindow);
55  pack();
56  setResizable(false);
57  }
58 
59  @Override
60  public void open() {
61  welcomeWindow.refresh();
62  setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
63  setVisible(true);
64  }
65 
66  @Override
67  public void close() {
68  this.setVisible(false);
69  }
70 }

Copyright © 2012-2016 Basis Technology. Generated on: Tue Feb 20 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.