Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
RecentFilesNode.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 */
19package org.sleuthkit.autopsy.datamodel;
20
21import org.openide.nodes.Children;
22import org.openide.nodes.Sheet;
23import org.openide.util.NbBundle;
24import org.openide.util.lookup.Lookups;
25import org.sleuthkit.datamodel.SleuthkitCase;
26
30public class RecentFilesNode extends DisplayableItemNode {
31
32 private static final String NAME = NbBundle.getMessage(RecentFilesNode.class, "RecentFilesNode.name.text");
33
34 RecentFilesNode(SleuthkitCase skCase) {
35 super(Children.create(new RecentFilesChildren(skCase), true), Lookups.singleton(NAME));
36 super.setName(NAME);
37 super.setDisplayName(NAME);
38 this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/recent_files.png"); //NON-NLS
39 }
40
41 @Override
42 public boolean isLeafTypeNode() {
43 return false;
44 }
45
46 @Override
47 public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
48 return visitor.visit(this);
49 }
50
51 @Override
52 protected Sheet createSheet() {
53 Sheet sheet = super.createSheet();
54 Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
55 if (sheetSet == null) {
56 sheetSet = Sheet.createPropertiesSet();
57 sheet.put(sheetSet);
58 }
59
60 sheetSet.put(new NodeProperty<>(NbBundle.getMessage(this.getClass(), "RecentFilesNode.createSheet.name.name"),
61 NbBundle.getMessage(this.getClass(), "RecentFilesNode.createSheet.name.displayName"),
62 NbBundle.getMessage(this.getClass(), "RecentFilesNode.createSheet.name.desc"),
63 NAME));
64 return sheet;
65 }
66
67 @Override
68 public String getItemType() {
69 return getClass().getName();
70 }
71}

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