1 17 18 package helloworld.listeners; 19 20 import Jmc.baseGui.*; 21 import Jmc.commonGui.*; 22 import Jmc.baseTools.*; 23 24 33 public class HelloWorldRemove_li implements base_guiListener 34 { 35 44 public void pcmf_execListener(base_guiObj xParam) throws Exception 45 { 46 base_treeView_if l_tree = (base_treeView_if) base_registredObject.pcmf_getObjByName("atree"); 48 49 base_treeNode l_selected = (base_treeNode)l_tree.pcmf_getValue(); 51 52 if (l_selected == null) 54 return; 55 56 base_treeNode l_parent = l_selected.pcmf_getParentNode(); 58 59 if (l_selected != l_tree.pcmf_getRoot()) 61 l_parent.pcmf_removeNode(l_selected); 62 else 63 return; 64 65 l_selected.pcmf_delete(); 67 68 l_tree.pcmf_repaint(); 70 71 return; 72 } 73 } 74 | Popular Tags |