Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
ViewOsAccountAction.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 */
19package org.sleuthkit.autopsy.actions;
20
21import java.awt.Cursor;
22import java.awt.event.ActionEvent;
23import java.util.concurrent.ExecutionException;
24import java.util.logging.Level;
25import javax.swing.AbstractAction;
26import javax.swing.SwingWorker;
27import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent;
28import org.sleuthkit.datamodel.OsAccount;
29import org.openide.windows.WindowManager;
30import org.sleuthkit.autopsy.coreutils.Logger;
31
35public class ViewOsAccountAction extends AbstractAction {
36
37 private static final Logger logger = Logger.getLogger(ViewOsAccountAction.class.getName());
38
39 private final OsAccount osAccount;
40
47 public ViewOsAccountAction(OsAccount osAccount, String displayName) {
48 super(displayName);
49 this.osAccount = osAccount;
50 }
51
52 @Override
53 public void actionPerformed(ActionEvent e) {
54 WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
55 new SwingWorker<Void, Void>() {
56
57 @Override
58 protected Void doInBackground() throws Exception {
60 return null;
61 }
62
63 @Override
64 protected void done() {
65 try {
66 get();
67 } catch (InterruptedException ex) {
68 logger.log(Level.SEVERE, "Unexpected interrupt while navigating to OS Account.", ex);
69 } catch (ExecutionException ex) {
70 logger.log(Level.SEVERE, "Error navigating to OS Account.", ex);
71 }
72 WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
73 }
74 }.execute();
75 }
76
77}
ViewOsAccountAction(OsAccount osAccount, String displayName)
synchronized static Logger getLogger(String name)
Definition Logger.java:124

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.