19 package org.sleuthkit.autopsy.casemodule;
21 import java.awt.Dialog;
22 import java.awt.Dimension;
23 import java.awt.event.ActionEvent;
24 import java.awt.event.ActionListener;
25 import java.awt.event.KeyEvent;
26 import javax.swing.ImageIcon;
27 import javax.swing.JComponent;
28 import javax.swing.JDialog;
29 import javax.swing.KeyStroke;
30 import org.openide.util.Lookup;
31 import org.openide.util.NbBundle;
32 import org.openide.windows.WindowManager;
47 if (null != recentCasesWindow) {
48 recentCasesWindow.setVisible(
false);
60 ClassLoader cl = Lookup.getDefault().lookup(ClassLoader.class);
62 ImageIcon icon =
new ImageIcon(cl.getResource(welcomeLogo));
82 recentCasesWindow =
new JDialog(
83 WindowManager.getDefault().getMainWindow(),
84 NbBundle.getMessage(
CueBannerPanel.class,
"CueBannerPanel.title.text"),
85 Dialog.ModalityType.APPLICATION_MODAL);
86 recentCasesWindow.setSize(
new Dimension(750, 400));
87 recentCasesWindow.getRootPane().registerKeyboardAction(
89 recentCasesWindow.setVisible(
false);
91 KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
92 OpenRecentCasePanel recentCasesPanel = OpenRecentCasePanel.getInstance();
93 recentCasesPanel.setCloseButtonActionListener(
new ActionListener() {
95 public void actionPerformed(ActionEvent e) {
96 recentCasesWindow.setVisible(
false);
99 recentCasesWindow.add(recentCasesPanel);
100 recentCasesWindow.pack();
101 recentCasesWindow.setResizable(
false);
105 if (RecentCases.getInstance().getTotalRecentCases() == 0) {
119 @SuppressWarnings(
"unchecked")
134 autopsyLogo.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/casemodule/welcome_logo.png")));
137 newCaseButton.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/casemodule/btn_icon_create_new_case.png")));
142 newCaseButton.setPreferredSize(
new java.awt.Dimension(64, 64));
143 newCaseButton.addActionListener(
new java.awt.event.ActionListener() {
144 public void actionPerformed(java.awt.event.ActionEvent evt) {
149 openRecentButton.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/casemodule/btn_icon_open_recent.png")));
156 public void actionPerformed(java.awt.event.ActionEvent evt) {
167 openCaseButton.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png")));
174 openCaseButton.addActionListener(
new java.awt.event.ActionListener() {
175 public void actionPerformed(java.awt.event.ActionEvent evt) {
186 jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
188 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
189 this.setLayout(layout);
190 layout.setHorizontalGroup(
191 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
192 .addGroup(layout.createSequentialGroup()
195 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
196 .addComponent(
jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE)
197 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
198 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
199 .addComponent(
newCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
200 .addComponent(
openRecentButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
201 .addComponent(
openCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
202 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
203 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
204 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
208 .addComponent(
closeButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
211 layout.setVerticalGroup(
212 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
213 .addGroup(layout.createSequentialGroup()
215 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
216 .addGroup(layout.createSequentialGroup()
217 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
218 .addComponent(
newCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
220 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
221 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
222 .addComponent(
openRecentButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
224 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
225 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
226 .addComponent(
openCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
228 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
231 .addComponent(
autopsyLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE))
241 Lookup.getDefault().lookup(
CaseOpenAction.class).actionPerformed(evt);
245 recentCasesWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
246 OpenRecentCasePanel.getInstance();
247 recentCasesWindow.setVisible(
true);
javax.swing.JButton closeButton
void setCloseButtonActionListener(ActionListener e)
javax.swing.JLabel autopsyLogo
javax.swing.JLabel openLabel
javax.swing.JButton newCaseButton
static void closeOpenRecentCasesWindow()
void openRecentButtonActionPerformed(java.awt.event.ActionEvent evt)
void customizeComponents()
void newCaseButtonActionPerformed(java.awt.event.ActionEvent evt)
void setCloseButtonText(String text)
static JDialog recentCasesWindow
javax.swing.JLabel openRecentLabel
javax.swing.JLabel createNewLabel
CueBannerPanel(String welcomeLogo)
void openCaseButtonActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JSeparator jSeparator1
static final long serialVersionUID
javax.swing.JButton openRecentButton
javax.swing.JButton openCaseButton