コード例 #1
0
 public MAGComponentInterface[] getNamedChildren() {
   if (_childrenhash == null) {
     scanNamedChildren();
   }
   MAGComponentInterface[] siblings = new MAGComponentInterface[_childrenhash.size()];
   int sibling_idx = 0;
   for (int i = 0; i < _children.size(); i++) {
     MAGComponentInterface tmp = getChild(i);
     if (tmp.id() != null && tmp.id().length() > 0) {
       if (tmp == _childrenhash.get(tmp.id())) {
         siblings[sibling_idx] = tmp;
         sibling_idx++;
       }
     }
   }
   return siblings;
 }
コード例 #2
0
 public void removeChild(MAGComponentInterface child) {
   if (child.id() != null && child.id().length() > 0 && _childrenhash != null) {
     _childrenhash.remove(child.id());
   }
   _children.removeElement(child);
 }