Esempio n. 1
0
      private void init() {
        super.setName(filter.getName());

        String tooltip = filter.getDisplayName();
        this.setShortDescription(tooltip);
        this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png"); // NON-NLS

        updateDisplayName();
      }
Esempio n. 2
0
 /**
  * @param skCase
  * @param filter
  * @param o Observable that provides updates when events are fired
  */
 FileSizeNode(SleuthkitCase skCase, FileSizeFilter filter, Observable o) {
   super(
       Children.create(new FileSizeChildren(filter, skCase, o), true),
       Lookups.singleton(filter.getDisplayName()));
   this.filter = filter;
   init();
   o.addObserver(new FileSizeNodeObserver());
 }
Esempio n. 3
0
 // use version with observer instead so that it updates
 @Deprecated
 FileSizeNode(SleuthkitCase skCase, FileSizeFilter filter) {
   super(
       Children.create(new FileSizeChildren(filter, skCase, null), true),
       Lookups.singleton(filter.getDisplayName()));
   this.filter = filter;
   init();
 }
Esempio n. 4
0
      @Override
      protected Sheet createSheet() {
        Sheet s = super.createSheet();
        Sheet.Set ss = s.get(Sheet.PROPERTIES);
        if (ss == null) {
          ss = Sheet.createPropertiesSet();
          s.put(ss);
        }

        ss.put(
            new NodeProperty<>(
                NbBundle.getMessage(this.getClass(), "FileSize.createSheet.filterType.name"),
                NbBundle.getMessage(this.getClass(), "FileSize.createSheet.filterType.displayName"),
                NbBundle.getMessage(this.getClass(), "FileSize.createSheet.filterType.desc"),
                filter.getDisplayName()));

        return s;
      }
Esempio n. 5
0
 private void updateDisplayName() {
   final long count = FileSizeChildren.calculateItems(skCase, filter);
   super.setDisplayName(filter.getDisplayName() + " (" + count + ")");
 }
Esempio n. 6
0
 @Override
 protected boolean createKeys(List<FileSizeFilter> list) {
   list.addAll(Arrays.asList(FileSizeFilter.values()));
   return true;
 }