1 19 package org.netbeans.modules.subversion.ui.history; 20 21 import org.openide.nodes.Children; 22 import org.openide.nodes.Node; 23 24 import java.util.*; 25 26 31 class RevisionNodeChildren extends Children.Keys<RepositoryRevision.Event> { 32 33 private RepositoryRevision container; 34 private SearchHistoryPanel master; 35 36 public RevisionNodeChildren(RepositoryRevision container, SearchHistoryPanel master) { 37 this.container = container; 38 this.master = master; 39 } 40 41 protected void addNotify() { 42 refreshKeys(); 43 } 44 45 protected void removeNotify() { 46 setKeys (Collections.<RepositoryRevision.Event>emptySet()); 47 } 48 49 private void refreshKeys() { 50 setKeys(container.getEvents()); 51 } 52 53 protected Node[] createNodes(RepositoryRevision.Event fn) { 54 RevisionNode node = new RevisionNode(fn, master); 55 return new Node[] { node }; 56 } 57 58 public void refreshChildren() { 59 refreshKeys(); 60 } 61 } 62 63 | Popular Tags |