1 17 18 package helloworld.listeners; 19 20 import Jmc.baseGui.*; 21 import Jmc.commonGui.*; 22 import Jmc.commonGui.loader.*; 23 import Jmc.baseTools.*; 24 25 import javax.swing.tree.*; 26 27 37 public class HelloWorldAddTreeNode_li implements base_guiListener 38 { 39 48 public void pcmf_execListener(base_guiObj xParam) throws Exception 49 { 50 base_inputField_if l_inp = (base_inputField_if)base_registredObject.pcmf_getObjByName("myTreeViewInput"); 52 base_treeViewLoader l_load = (base_treeViewLoader)base_registredObject.pcmf_getObjByName("treeLoader"); 53 base_treeView_if l_tree = (base_treeView_if)base_registredObject.pcmf_getObjByName("atree2"); 54 55 DefaultMutableTreeNode l_node = (DefaultMutableTreeNode)l_load.pcmf_toModelValue(l_tree.pcmf_getValue()); 57 if (l_node == null) 58 return; 59 60 ((DefaultTreeModel)l_load.pcmf_getModel()).insertNodeInto(new DefaultMutableTreeNode(l_inp.pcmf_getGuiObj().pcmf_getValue().toString()), l_node, 0); 61 62 return; 63 } 64 } 65 | Popular Tags |