class TreeItem extends Composite {

    @SuppressWarnings("unchecked")
    public void remove() {
        if (parentItem != null) {
            // If this item has a parent, remove self from it.
            parentItem.removeItem(this);
        } else if (tree != null) {
            // If the item has no parent, but is in the Tree, it must be a top-level
            // element.
            tree.removeItem((I) this);
        }
    }

    public  TreeItem(final Type type,
                    final String value,
                    final String label,
                    final IsWidget icon);
      TreeItem(final Type type,
             final String value,
             final String label,
             final IsWidget icon,
             final Supplier<FlowPanel> contentProvider
    );

}