1 17 18 package helloworld.listeners; 19 20 import Jmc.baseGui.*; 21 import Jmc.commonGui.*; 22 import Jmc.baseTools.*; 23 24 33 public class HelloWorldAdd_li implements base_guiListener 34 { 35 36 45 public void pcmf_execListener(base_guiObj xParam) throws Exception 46 { 47 base_inputField_if l_inp = (base_inputField_if)base_registredObject.pcmf_getObjByName("myNodeInput"); 49 base_treeView_if l_tree = (base_treeView_if) base_registredObject.pcmf_getObjByName("atree"); 50 base_image_if l_icon = (base_image_if) base_registredObject.pcmf_getObjByName("entry_icon"); 51 52 base_treeNode l_selected = (base_treeNode)l_tree.pcmf_getValue(); 54 55 if (l_selected == null) 57 return; 58 59 simpleNode l_new = new simpleNode(l_inp.pcmf_getValue().toString()); 61 l_new.pcmf_setIcon(l_icon); 63 64 l_selected.pcmf_addNode(l_inp.pcmf_getValue().toString(), l_new); 66 67 l_tree.pcmf_repaint(); 69 70 return; 71 } 72 73 } 74 | Popular Tags |