mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
added a loading node for use when child nodes are still being loaded
This commit is contained in:
parent
e9c8e47147
commit
a1d3db93f5
@ -112,5 +112,6 @@ public class CommonFileChildNode extends FileNode {
|
||||
public String toString() {
|
||||
return displayString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
*
|
||||
* 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.datamodel;
|
||||
|
||||
import org.openide.nodes.Children;
|
||||
|
||||
/**
|
||||
* A dummy node used by the child factory to display while children are being
|
||||
* generated
|
||||
*/
|
||||
public class CommonFileChildNodeLoading extends DisplayableItemNode {
|
||||
|
||||
public CommonFileChildNodeLoading(Children children) {
|
||||
super(children);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
|
||||
return visitor.visit(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeafTypeNode() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemType() {
|
||||
return getClass().getName();
|
||||
}
|
||||
}
|
@ -140,6 +140,11 @@ public class CommonFileParentNode extends DisplayableItemNode {
|
||||
list.addAll(this.descendants);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Node createWaitNode(){
|
||||
return new CommonFileChildNodeLoading(Children.LEAF);
|
||||
}
|
||||
}
|
||||
|
||||
@NbBundle.Messages({
|
||||
|
@ -115,6 +115,8 @@ public interface DisplayableItemNodeVisitor<T> {
|
||||
T visit (CommonFilesSearchNode cfsn);
|
||||
|
||||
T visit (CommonFileChildNode cfcn);
|
||||
|
||||
T visit (CommonFileChildNodeLoading cfcnl);
|
||||
|
||||
/*
|
||||
* Tags
|
||||
@ -199,6 +201,11 @@ public interface DisplayableItemNodeVisitor<T> {
|
||||
return defaultVisit(cfsn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public T visit(CommonFileChildNodeLoading cfcnl){
|
||||
return defaultVisit(cfcnl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public T visit(DirectoryNode dn) {
|
||||
return defaultVisit(dn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user