I am currently working on Outline View, where I creating children by using ChildFactory.Detachable
, which is working properly.
I implemented the PropertyChangeListener
on this ChildFactory
where I dynamically adding and removing the nodes given below
public void propertyChange(PropertyChangeEvent evt) {
if ("ADD".equals(evt.getPropertyName())) {
this.refresh(false);
} else if ("REMOVE".equals(evt.getPropertyName())) {
this.refresh(false);
}
}
Here the structure is RootNode
and its child nodes and child node also can contain its own child nodes.
The problem is, whenever I try to remove the node from any root node the expansion sign(+) is not removed.
I gone through the "No Expansion Icon When No Children (Part 1) - Blog | /Oracle" from Geertjan's Blog but its for adding new node and not removing.
If anybody has any idea about it please let me know.
Thanks is advance.