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 HelloWorldRemoveTreeNode_li implements base_guiListener 38 { 39 48 public void pcmf_execListener(base_guiObj xParam) throws Exception 49 { 50 base_treeViewLoader l_load = (base_treeViewLoader)base_registredObject.pcmf_getObjByName("treeLoader"); 52 base_treeView_if l_tree = (base_treeView_if)base_registredObject.pcmf_getObjByName("atree2"); 53 54 Object l_rawSelected = l_tree.pcmf_getValue(); 56 57 if (l_rawSelected instanceof base_treeNode) 59 { 60 base_treeNode l_selected = (base_treeNode)l_rawSelected; 62 63 DefaultMutableTreeNode l_node = (DefaultMutableTreeNode)l_load.pcmf_toModelValue(l_selected); 65 if (l_node == null) 66 return; 67 68 ((DefaultTreeModel)l_load.pcmf_getModel()).removeNodeFromParent(l_node); 70 } 71 72 return; 73 } 74 } | Popular Tags |