package de.larmic.butterfaces.model.tree;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by larmic on 24.10.14.
 */
public class DefaultNodeImpl<T> implements Node<T> {

    private final List<Node> subNodes = new ArrayList<>();
    private final String title;
    private final T data;
    private String imageIcon;
    private String glyphiconIcon;
    private boolean isCollapsed;

    public DefaultNodeImpl(final String title) {
        this(title, null, null);
    }

    public DefaultNodeImpl(final String title, final T data) {
        this(title, data, null);
    }

    public DefaultNodeImpl(final String title, final T data, final String iconPath) {
        this.title = title;
        this.data = data;
        this.imageIcon = iconPath;
    }

    @Override
    public String getTitle() {
        return this.title;
    }

    @Override
    public T getData() {
        return data;
    }

    @Override
    public String getImageIcon() {
        return imageIcon;
    }

    @Override
    public String getGlyphiconIcon() {
        return glyphiconIcon;
    }

    public void setImageIcon(String imageIcon) {
        this.imageIcon = imageIcon;
    }


    public void setGlyphiconIcon(String glyphiconIcon) {
        this.glyphiconIcon = glyphiconIcon;
    }

    @Override
    public boolean isLeaf() {
        return this.subNodes.isEmpty();
    }

    @Override
    public List<Node> getSubNodes() {
        return subNodes;
    }

    @Override
    public boolean isCollapsed() {
        return isCollapsed;
    }

    @Override
    public void setCollapsed(boolean isCollapsed) {
        this.isCollapsed = isCollapsed;
    }
}

@@ -261,28 +261,22 @@
 e final 
-String title
+T data
 ;%0A    pr
@@ -277,36 +277,36 @@
     private 
-final T data
+String title
 ;%0A    privat
@@ -838,32 +838,108 @@
 s.title;%0A    %7D%0A%0A
+    public void setTitle(String title) %7B%0A        this.title = title;%0A    %7D%0A%0A
     @Override%0A  

Make DefaultNodeImpl's title changeable