コード例 #1
0
  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);
  }
コード例 #2
0
 public AXIComponent copy(AXIComponent parent) {
   AXIComponentFactory f = parent.getModel().getComponentFactory();
   return f.copy(this);
 }