Autopsy  4.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ViewsNode.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2014 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.datamodel;
20 
21 import java.util.Arrays;
22 import org.openide.nodes.Sheet;
23 import org.openide.util.NbBundle;
24 import org.openide.util.lookup.Lookups;
25 import org.sleuthkit.datamodel.SleuthkitCase;
26 
32 public class ViewsNode extends DisplayableItemNode {
33 
34  public static final String NAME = NbBundle.getMessage(ViewsNode.class, "ViewsNode.name.text");
35 
36  public ViewsNode(SleuthkitCase sleuthkitCase) {
37  super(new RootContentChildren(Arrays.asList(
38  new FileTypeExtensionFilters(sleuthkitCase),
39  // June '15: Recent Files was removed because it was not useful w/out filtering
40  // add it back in if we can filter the results to a more managable size.
41  // new RecentFiles(sleuthkitCase),
42  new DeletedContent(sleuthkitCase),
43  new FileSize(sleuthkitCase))),
44  Lookups.singleton(NAME));
45  setName(NAME);
46  setDisplayName(NAME);
47  this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/views.png"); //NON-NLS
48  }
49 
50  @Override
51  public boolean isLeafTypeNode() {
52  return false;
53  }
54 
55  @Override
56  public <T> T accept(DisplayableItemNodeVisitor<T> v) {
57  return v.visit(this);
58  }
59 
60  @Override
61  protected Sheet createSheet() {
62  Sheet s = super.createSheet();
63  Sheet.Set ss = s.get(Sheet.PROPERTIES);
64  if (ss == null) {
65  ss = Sheet.createPropertiesSet();
66  s.put(ss);
67  }
68 
69  ss.put(new NodeProperty<>(NbBundle.getMessage(this.getClass(), "ViewsNode.createSheet.name.name"),
70  NbBundle.getMessage(this.getClass(), "ViewsNode.createSheet.name.displayName"),
71  NbBundle.getMessage(this.getClass(), "ViewsNode.createSheet.name.desc"),
72  NAME));
73  return s;
74  }
75 
76  /*
77  * TODO (AUT-1849): Correct or remove peristent column reordering code
78  *
79  * Added to support this feature.
80  */
81 // @Override
82 // public String getItemType() {
83 // return "Views"; //NON-NLS
84 // }
85 }
ViewsNode(SleuthkitCase sleuthkitCase)
Definition: ViewsNode.java:36

Copyright © 2012-2015 Basis Technology. Generated on: Wed Apr 6 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.