private void onChildAdded(PropertyChangeEvent evt) { if (!isChildrenInitialized()) return; AXIComponent parent = (AXIComponent) evt.getSource(); AXIComponent child = (AXIComponent) evt.getNewValue(); int index = -1; for (int i = 0; i < parent.getChildren().size(); i++) { if (parent.getChildren().get(i) == child) { index = i; break; } } if (index == -1) return; AXIComponentFactory factory = getModel().getComponentFactory(); AXIComponent proxy = factory.createProxy(child); insertAtIndex(Util.getProperty(child), proxy, index); }
public AXIComponent copy(AXIComponent parent) { AXIComponentFactory f = parent.getModel().getComponentFactory(); return f.copy(this); }