KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > helloworld > listeners > HelloWorldReshape_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 15.07.2005
12  *
13  * date: 15.07.2005
14  * project: WiSer-HelloWorld
15  *
16  * *******************************************************************************/

17
18 package helloworld.listeners;
19
20 import Jmc.baseGui.base_guiListener;
21 import Jmc.baseGui.base_guiObj;
22 import Jmc.baseTools.base_registredObject;
23 import Jmc.commonGui.base_guiPage_if;
24
25 public class HelloWorldReshape_li implements base_guiListener
26 {
27     public void pcmf_execListener(base_guiObj xParam) throws Exception JavaDoc
28     {
29         // get the widgets
30
base_guiObj l_pos = (base_guiObj)base_registredObject.pcmf_getObjByName("wpos");
31     base_guiObj l_size = (base_guiObj)base_registredObject.pcmf_getObjByName("wsize");
32
33     // set the new values
34
if (xParam.pcmf_getValue().toString().startsWith(base_guiPage_if.PAGE_MOVED))
35         l_pos.pcmf_setValue(xParam.pcmf_getValue());
36     else
37     if (xParam.pcmf_getValue().toString().startsWith(base_guiPage_if.PAGE_RESIZED))
38         l_size.pcmf_setValue(xParam.pcmf_getValue());
39         
40     return;
41     }
42
43 }
44
Popular Tags