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 import Raptor.model.*; 26 27 37 public class openCBrowser_li implements base_guiListener 38 { 39 private remote_treeNode pem_listEntries = new remote_treeNode("le"); 40 private base_guiObj pem_input = null; 41 42 45 public openCBrowser_li() throws Exception 46 { 47 super(); 48 } 49 50 60 public void pcmf_execListener(base_guiObj xParam) throws Exception 61 { 62 classBrowser l_cBrowser = new classBrowser(); 63 Vector l_classes = null; 64 65 base_dialog_if l_br = (base_dialog_if)base_registredObject.pcmf_getObjByName("CBrowser_dlg"); 66 base_listBox_if l_list = (base_listBox_if)base_registredObject.pcmf_getObjByName("CBrowserList"); 67 l_list.pcmf_clearListBox(); 68 69 this.pem_listEntries.pcmf_clearAndRelease(); 71 72 this.pem_input = (base_guiObj)xParam.pcmf_getParentNode().pcmf_getSubNode("Input"); 74 75 String l_if = ((base_guiObj)base_registredObject.pcmf_getObjByName("fact_interfaces")).pcmf_getValue().toString(); 77 if (l_if.equals("N.A.")) 78 { 79 raptor_mainModel l_model = (raptor_mainModel)xParam.pcmf_getAppl().pcmf_getGuiObj().pcmf_getModel(); 80 l_model.pcmf_addMessage("- no factory-settings of this widget", raptor_mainModel.RAPTOR_INFO); 81 return; 82 }; 83 84 if (xParam.pcmf_getObjName().equals("viewSelect")) 85 l_if = "Jmc.baseTools.base_view"; 86 87 l_if = l_if.substring(0, l_if.indexOf(",") == -1?l_if.length():l_if.indexOf(",")); 88 ((base_guiObj)base_registredObject.pcmf_getObjByName("CBrowserIf")).pcmf_setValue(l_if); 89 90 Class l_cl = Class.forName(l_if); 91 92 String l_addCp = (String )base_environment.pcmf_getParameter("environment.xml", "SERVLET", "CLASSPATH"); 94 l_addCp = base_tools.pcmf_stringSubst(l_addCp, "{$ROOT}", base_environment.pcmf_getRootDir()); 95 l_classes = l_cBrowser.pcmf_getClasses(l_addCp, l_cl); 96 97 Iterator l_it = l_classes.iterator(); 98 remote_treeNode l_node = null; 99 Class l_cl2 = null; 100 while (l_it.hasNext()) 101 { 102 l_cl2=(Class )l_it.next(); 103 l_node = new remote_treeNode(l_cl2.toString()); 104 l_node.pcmf_setValue(l_cl2.toString()); 105 l_node.pcmf_setIcon((base_image_if)base_registredObject.pcmf_getObjByName("class_icon")); 106 pem_listEntries.pcmf_addNode(l_cl2.toString(), l_node); 107 l_list.pcmf_addValueObj(l_cl2.toString(), l_node); 108 } 109 l_br.pcmf_displayDialog(); 110 l_list.pcmf_setSelectedRow(0); 111 } 112 113 public void pcmf_setSelection() 114 { 115 String l_res = (String )((base_listBox_if)base_registredObject.pcmf_getObjByName("CBrowserList")).pcmf_getValue(); 116 117 if (l_res != null && l_res.equals("") == false) 118 this.pem_input.pcmf_setValue(l_res.substring(6)); 119 } 120 } | Popular Tags |