1 16 17 package Raptor.listeners; 18 19 import Jmc.baseGui.*; 20 import Jmc.commonGui.*; 21 import Jmc.connector.*; 22 import Jmc.baseTools.*; 23 import java.util.*; 24 25 35 public class openCBrowser2_li implements base_guiListener 36 { 37 private remote_treeNode pem_listEntries = new remote_treeNode("le"); 38 private base_guiObj pem_input = null; 39 40 43 public openCBrowser2_li() throws Exception 44 { 45 super(); 46 } 47 48 58 public void pcmf_execListener(base_guiObj xParam) throws Exception 59 { 60 classBrowser l_cBrowser = new classBrowser(); 61 Vector l_classes = null; 62 63 ((base_guiObj)base_registredObject.pcmf_getObjByName("CBrowserIf")).pcmf_setValue("plugins"); 64 base_dialog_if l_br = (base_dialog_if)base_registredObject.pcmf_getObjByName("CBrowser_dlg"); 65 base_listBox_if l_list = (base_listBox_if)base_registredObject.pcmf_getObjByName("CBrowserList"); 66 l_list.pcmf_clearListBox(); 67 68 this.pem_listEntries.pcmf_clearAndRelease(); 70 71 this.pem_input = (base_guiObj)xParam.pcmf_getParentNode().pcmf_getSubNode("Input"); 73 74 Class l_cl = Class.forName("Jmc.commonGui.base_guiWidget_if"); 76 77 String l_addCp = (String )base_environment.pcmf_getParameter("environment.xml", "SERVLET", "CLASSPATH"); 79 l_addCp = base_tools.pcmf_stringSubst(l_addCp, "{$ROOT}", base_environment.pcmf_getRootDir()); 80 l_classes = l_cBrowser.pcmf_getClasses(l_addCp, l_cl); 81 82 Iterator l_it = l_classes.iterator(); 83 remote_treeNode l_node = null; 84 Class l_cl2 = null; 85 while (l_it.hasNext()) 86 { 87 l_cl2=(Class )l_it.next(); 88 l_node = new remote_treeNode(l_cl2.toString()); 89 l_node.pcmf_setValue(l_cl2.toString()); 90 l_node.pcmf_setIcon((base_image_if)base_registredObject.pcmf_getObjByName("class_icon")); 91 pem_listEntries.pcmf_addNode(l_cl2.toString(), l_node); 92 l_list.pcmf_addValueObj(l_cl2.toString(), l_node); 93 } 94 l_br.pcmf_displayDialog(); 95 l_list.pcmf_setSelectedRow(0); 96 } 97 98 public void pcmf_setSelection() 99 { 100 String l_res = (String )((base_listBox_if)base_registredObject.pcmf_getObjByName("CBrowserList")).pcmf_getValue(); 101 102 if (l_res != null && l_res.equals("") == false) 103 this.pem_input.pcmf_setValue(l_res.substring(6)); 104 } 105 } | Popular Tags |