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

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