Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
TagAction.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2013 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.actions;
20 
21 import java.awt.event.ActionEvent;
22 import javax.swing.AbstractAction;
26 
30  abstract class TagAction extends AbstractAction {
31  public TagAction(String menuText) {
32  super(menuText);
33  }
34 
35  @Override
36  public void actionPerformed(ActionEvent event) {
37  doAction(event);
38  refreshDirectoryTree();
39  }
40 
45  abstract protected void doAction(ActionEvent event);
46 
51  @SuppressWarnings("deprecation")
52  protected void refreshDirectoryTree() {
53 
54  /* Note: this is a hack. In an ideal world, TagsManager would fire events so
55  * that the directory tree would refresh. But, we haven't had a chance to add
56  * that so, we fire these events and the tree refreshes based on them.
57  */
58  IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent("TagAction", BlackboardArtifact.ARTIFACT_TYPE.TSK_TAG_FILE)); //NON-NLS
59  }
60 }

Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.