KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Raptor > listeners > callEventMonitor_li


1 /*******************************************************************************
2  * Copyright (c) 2004, Dirk von der Weiden.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * Dirk von der Weiden - initial API and implementation
10  *
11  * Created on 18.07.2004
12  *
13  * date: 18.07.2004
14  * project: WiSer Builder
15  *
16  * *******************************************************************************/

17 package Raptor.listeners;
18
19 import Jmc.commonGui.*;
20 import Jmc.baseGui.*;
21 import Jmc.baseTools.*;
22
23 import java.util.*;
24
25 /**
26  * @author Dirk
27  *
28  * date: 18.07.2004
29  *
30  * <p>
31  * Purpose: Standard listener for gui builder, informs the event monitor
32  * </p>
33  */

34 public class callEventMonitor_li implements base_guiListener
35 {
36     public void pcmf_execListener(base_guiObj xParam) throws Exception JavaDoc
37     {
38     // is used by all applications, therefore synced
39
synchronized (this)
40     {
41       base_guiObj l_appl = (base_guiObj)base_registredObject.pcmf_getObjByName(base_appl_if.MY_APPL);
42       base_table_if l_table = (base_table_if)l_appl.pcmf_getByPath("Event monitor/EventForm/EventTable");
43     
44       Vector l_row = new Vector (3);
45     
46       if (xParam instanceof base_eventChannel_if)
47         l_row.add( base_eventChannel_if.EVENTs[((base_eventChannel_if)xParam).pcmf_getType()]);
48       else
49         l_row.add("ACTION");
50
51       l_row.add(xParam.getClass().toString().replaceFirst("class ", ""));
52       l_row.add(xParam.pcmf_getName());
53       l_row.add(xParam.pcmf_getValue().toString());
54       l_table.pcmf_addRow(l_row);
55       l_table.pcmf_commitTable();
56     }
57     }
58
59 }
60
Popular Tags