de.intarsys.tools.tree.DeclaredPropertiesNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
package de.intarsys.tools.tree;
import java.util.ArrayList;
import java.util.List;
/**
* A generic {@link PropertiesNode} to collect predefined property children.
* These are for example created by the parent node directly.
*
*/
public class DeclaredPropertiesNode extends PropertiesNode {
private List properties = new ArrayList();
public DeclaredPropertiesNode(CommonNode parent, Object object) {
super(parent, object);
};
public void addPropertyNode(CommonNode node) {
properties.add(node);
updateChildren();
}
public void clearPropertyNodes() {
properties.clear();
unlinkChildren();
}
@Override
protected void createPropertyNodes(List pProperties) {
pProperties.addAll(properties);
}
public boolean isEmpty() {
return properties.size() == 0;
}
public void removePropertyNode(CommonNode node) {
properties.remove(node);
node.unlink();
updateChildren();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy