Basically I have added a couple of useful methods to query if an object or a class is contained by the LayerSet or some other contained Layer.
@Override
public boolean contains(Object o) {
if (super.contains(o)) {
return true;
}
for (Iteratorit = this.iterator(); it.hasNext();) {
Layer layer = it.next();
if (layer instanceof LayerList) {
if (((LayerList) layer).contains(o)) {
return true;
}
}
}
return false;
}
Finally, I have added the mothod 'indexOf' that given a class returns the first instance ocurrence in the list (the search is not recursively).
1 comment:
Hello !
Can you tell me a little more haw it works ? How is it displayed by the layerManager ?
Thanks !
Post a Comment