KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Raptor > listeners > separatePreview_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 19.11.2004
12  *
13  * date: 19.11.2004
14  * project:
15  *
16  * *******************************************************************************/

17 package Raptor.listeners;
18
19 import Jmc.baseGui.*;
20 import Jmc.baseTools.*;
21 import Jmc.commonGui.*;
22
23 /**
24  * @author Dirk
25  *
26  * date: 19.11.2004
27  *
28  * <p>
29  * Purpose:
30  * </p>
31  */

32 public class separatePreview_li implements base_guiListener
33 {
34     public void pcmf_execListener(base_guiObj xParam) throws Exception JavaDoc
35     {
36     base_dialog_if l_sep = (base_dialog_if)base_registredObject.pcmf_getObjByName("Aps_dlg");
37     base_guiObj l_std = (base_guiObj)base_registredObject.pcmf_getObjByName("AutoPreview_1");
38     
39     if (xParam.pcmf_getValue().equals(base_checkBox_if.CHECKED))
40     {
41       base_guiObj l_view = (base_guiObj)l_std.pcmf_removeNode("Preview");
42       l_sep.pcmf_getGuiObj().pcmf_addNode("Preview", l_view);
43       l_sep.pcmf_setGuiObjPosition("Preview", 0, 0, 1, 1, "WEST");
44       l_sep.pcmf_displayDialog();
45       l_std.pcmf_repaint();
46     }
47     else
48     {
49       base_guiObj l_view = (base_guiObj)l_sep.pcmf_getGuiObj().pcmf_removeNode("Preview");
50       if (l_view == null)
51         return;
52           
53       l_std.pcmf_addNode("Preview", l_view);
54       ((base_guiContainer_if)l_std).pcmf_setGuiObjPosition("Preview", 0, 0, 1, 1, "WEST");
55       l_std.pcmf_repaint();
56       l_sep.pcmf_hideDialog();
57     }
58   }
59
60 }
61
Popular Tags