/*
 * Autopsy Forensic Browser
 *
 * Copyright 2011 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.FilterNode;
import org.openide.nodes.Node;
import org.openide.util.NbBundle;

/**
 * This class is used to filter the nodes that we want to show on the
 * "TreeTableView". So basically we just want to show one layer of nodes from
 * it's parent.
 *
 * @author jantonius
 */
public class TableFilterNode extends FilterNode {

    private boolean createChild;
    private String itemType;

    /**
     * the constructor
     */
    public TableFilterNode(Node arg, boolean crChild) {
        super(arg, TableFilterChildren.createInstance(arg, crChild));
        this.createChild = crChild;
        this.itemType = "";
    }
    
    public TableFilterNode(Node arg, boolean crChild, String itemType) {
        super(arg, TableFilterChildren.createInstance(arg, crChild));
        this.createChild = crChild;
        this.itemType = itemType;
    }

    /**
     * Override the display name / header for the first (tree) column on the
     * "TreeTableView".
     *
     * @return disName the display name for the first column
     */
    @Override
    public String getDisplayName() {
        if (createChild) {
            return NbBundle.getMessage(this.getClass(), "TableFilterNode.displayName.text");
        } else {
            return super.getDisplayName();
        }
    }
    
    public String getItemType() {
        return itemType;
    }
}

@@ -44,16 +44,21 @@
 ght 2011
+-2016
  Basis T
@@ -841,37 +841,17 @@
 %0A * 
-This class is used to
+A
  filter 
 the 
@@ -850,163 +850,151 @@
 ter 
-the 
 node
-s
  that 
-we want to show on the%0A * %22TreeTableView%22. So basically we just want to show one layer of nodes from%0A * it's parent.%0A *%0A * @author jantonius
+creates at most one layer of children for the node it%0A * wraps. It is designed to be used for nodes displayed in Autopsy table views.
 %0A */
@@ -1057,24 +1057,30 @@
 private 
+final 
 boolean 
 createCh
@@ -1075,48 +1075,14 @@
 ean 
-createChild;%0A    private String itemType
+isLeaf
 ;%0A%0A 
@@ -1099,21 +1099,17 @@
   * 
-the c
+C
 onstruct
 or%0A 
@@ -1108,219 +1108,318 @@
 ruct
-or%0A     */%0A    public TableF
+s a f
 ilter
-Node(Node arg, boolean crChild) %7B%0A        super(arg, TableFilterChildren.createInstance(arg, crChild));%0A        this.createChild = crChild;%0A        this.itemType = %22%22;%0A    %7D
+ node that creates at most one layer of children for%0A     * the node it wraps. It is designed to be used for nodes displayed in%0A     * Autopsy table views.%0A     *%0A     * @param wrappedNode The node to wrap in the filter node.%0A     * @param isLeaf      True if the wrapped node is a leaf node.
 %0A    
+ */
 %0A   
@@ -1451,45 +1451,35 @@
 ode 
-arg, boolean crChild, String itemType
+wrappedNode, boolean isLeaf
 ) %7B%0A
@@ -1492,19 +1492,27 @@
   super(
-arg
+wrappedNode
 , TableF
@@ -1544,92 +1544,59 @@
 nce(
-arg, crChild));%0A        this.createChild = crChild;%0A        this.itemType = itemType
+wrappedNode, isLeaf));%0A        this.isLeaf = isLeaf
 ;%0A  
@@ -1619,20 +1619,17 @@
   * 
-Override the
+Returns a
  dis
@@ -1642,21 +1642,41 @@
 ame 
-/ header
+for the wrapped node,
  for 
+use in 
 the 
@@ -1685,51 +1685,46 @@
 rst 
-(tree) column on the%0A     * %22TreeT
+column%0A     * of an Autopsy t
 able
-V
+ v
 iew
-%22
 .%0A  
@@ -1747,17 +1747,9 @@
 urn 
-disName t
+T
 he d
@@ -1763,29 +1763,9 @@
 name
- for the first column
+.
 %0A   
@@ -1836,19 +1836,14 @@
 if (
-createChild
+isLeaf
 ) %7B%0A
@@ -2015,76 +2015,7 @@
   %7D%0A
-    %0A    public String getItemType() %7B%0A        return itemType;%0A    %7D
 %0A%7D%0A

Remove vestiges of incomplete feature from corecomponents/TableFilterNode