OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 74 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 74 Rev 181
Line 17... Line 17...
17
        super(null, false);
17
        super(null, false);
18
 
18
 
19
    }
19
    }
20
 
20
 
21
    public void setShowAll(boolean b) {
21
    public void setShowAll(boolean b) {
22
        if (b != showAll) {
22
        if (b != this.showAll) {
23
            this.showAll = b;
23
            this.showAll = b;
24
            System.err.println("GroupTreeModel.setShowAll()" + b);
24
            System.err.println("GroupTreeModel.setShowAll()" + b);
25
            reload();
25
            reload();
26
        }
26
        }
27
    }
27
    }
Line 66... Line 66...
66
        }
66
        }
67
        depth++;
67
        depth++;
68
        final ActivableMutableTreeNode newChild = new ActivableMutableTreeNode(item);
68
        final ActivableMutableTreeNode newChild = new ActivableMutableTreeNode(item);
69
 
69
 
70
        newChild.setActive(n.containsGroupId(item.getId()));
70
        newChild.setActive(n.containsGroupId(item.getId()));
71
        if (showAll || newChild.isActive()) {
71
        if (this.showAll || newChild.isActive()) {
72
            node.add(newChild);
72
            node.add(newChild);
73
        }
73
        }
74
        if (item instanceof Group) {
74
        if (item instanceof Group) {
75
            final Group gr = (Group) item;
75
            final Group gr = (Group) item;
76
            final int childCount = gr.getSize();
76
            final int childCount = gr.getSize();
Line 100... Line 100...
100
            this.componentDescriptor.updateGroupFrom(this);
100
            this.componentDescriptor.updateGroupFrom(this);
101
        } else {
101
        } else {
102
            this.componentDescriptor.removeGroup(item);
102
            this.componentDescriptor.removeGroup(item);
103
        }
103
        }
104
        reload(n);
104
        reload(n);
105
        componentDescriptor.fireGroupChanged();
105
        this.componentDescriptor.fireGroupChanged();
106
    }
106
    }
107
 
107
 
108
    @Override
108
    @Override
109
    protected void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children) {
109
    protected void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children) {
110
        // To update preview while reordering
110
        // To update preview while reordering
111
        super.fireTreeNodesInserted(source, path, childIndices, children);
111
        super.fireTreeNodesInserted(source, path, childIndices, children);
112
        componentDescriptor.fireGroupChanged();
112
        this.componentDescriptor.fireGroupChanged();
113
    }
113
    }
114
 
114
 
115
    @Override
115
    @Override
116
    public boolean isLeaf(Object node) {
116
    public boolean isLeaf(Object node) {
117
        final ActivableMutableTreeNode n = (ActivableMutableTreeNode) node;
117
        final ActivableMutableTreeNode n = (ActivableMutableTreeNode) node;