mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
common files search results supports child row
This commit is contained in:
parent
78c7e9cef1
commit
e2633606f8
@ -88,7 +88,7 @@ public final class CommonFilesPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
DataResultFilterNode dataResultFilterNode = new DataResultFilterNode(contentFilesNode, DirectoryTreeTopComponent.findInstance().getExplorerManager());
|
DataResultFilterNode dataResultFilterNode = new DataResultFilterNode(contentFilesNode, DirectoryTreeTopComponent.findInstance().getExplorerManager());
|
||||||
|
|
||||||
TableFilterNode tableFilterNode = new TableFilterNode(dataResultFilterNode, true);
|
TableFilterNode tableFilterNode = new TableFilterNode(dataResultFilterNode);
|
||||||
|
|
||||||
TopComponent component = DataResultTopComponent.createInstance(
|
TopComponent component = DataResultTopComponent.createInstance(
|
||||||
title,
|
title,
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Autopsy Forensic Browser
|
||||||
|
*
|
||||||
|
* Copyright 2018 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.sleuthkit.autopsy.corecomponents;
|
||||||
|
|
||||||
|
import org.openide.nodes.Children;
|
||||||
|
import org.openide.nodes.Node;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides TableFilterChildren functionality, and adds support for children
|
||||||
|
* of rows (plus/minus buttons for each row with children).
|
||||||
|
*/
|
||||||
|
class TableFilterChildrenWithDescendants extends TableFilterChildren {
|
||||||
|
|
||||||
|
private TableFilterChildrenWithDescendants(Node wrappedNode) {
|
||||||
|
super(wrappedNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Children createInstance(Node wrappedNode, boolean createChildren){
|
||||||
|
if(createChildren){
|
||||||
|
return new TableFilterChildrenWithDescendants(wrappedNode);
|
||||||
|
} else {
|
||||||
|
return Children.LEAF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Node copyNode(Node nodeToCopy){
|
||||||
|
return new TableFilterNode(nodeToCopy, true);
|
||||||
|
}
|
||||||
|
}
|
@ -49,6 +49,16 @@ public class TableFilterNode extends FilterNode {
|
|||||||
super(node, TableFilterChildren.createInstance(node, createChildren), Lookups.proxy(node));
|
super(node, TableFilterChildren.createInstance(node, createChildren), Lookups.proxy(node));
|
||||||
this.createChildren = createChildren;
|
this.createChildren = createChildren;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a filter node that generates children using TableFilterChildrenWithDescendants.
|
||||||
|
* This enables row to have descendants.
|
||||||
|
* @param node The node to wrap
|
||||||
|
*/
|
||||||
|
public TableFilterNode(Node node){
|
||||||
|
super(node, TableFilterChildrenWithDescendants.createInstance(node, true), Lookups.proxy(node));
|
||||||
|
this.createChildren = true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a filter node that creates at most one layer of child nodes
|
* Constructs a filter node that creates at most one layer of child nodes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user