1 package org.netbeans.modules.xml.xam; 2 3 import org.netbeans.modules.xml.xam.ComponentUpdater; 4 5 9 public class TestComponentUpdater implements ComponentUpdater<TestComponent> { 10 public void update(TestComponent target, TestComponent child, ComponentUpdater.Operation operation) { 11 update(target, child, -1, operation); 12 } 13 14 public void update(TestComponent target, TestComponent child, int index, ComponentUpdater.Operation operation) { 15 if (operation.equals(ComponentUpdater.Operation.ADD)) { 16 target.insertAtIndex("ChildComponentAdded", child, index, TestComponent.class); 17 } else { 18 target.removeChild("ChildComponentRemoved", child); 19 } 20 } 21 } 22 | Popular Tags |