01: // @@
02: // @@
03: /*
04: * Wi.Ser Framework
05: *
06: * Version: 1.8.1, 20-September-2007
07: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
08: *
09: * This library is free software; you can redistribute it and/or
10: * modify it under the terms of the GNU Lesser General Public
11: * License as published by the Free Software Foundation; either
12: * version 2 of the License, or (at your option) any later version.
13: *
14: * This library is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17: * Lesser General Public License for more details.
18: *
19: * You should have received a copy of the GNU Lesser General Public
20: * License along with this library located in LGPL.txt in the
21: * license directory; if not, write to the
22: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23: * Boston, MA 02111-1307, USA.
24: *
25: * If this agreement does not cover your requirements, please contact us
26: * via email to get detailed information about the commercial license
27: * or our service offerings!
28: *
29: */
30: // @@
31: package de.ug2t.unifiedGui.listener;
32:
33: import de.ug2t.kernel.*;
34: import de.ug2t.unifiedGui.*;
35: import de.ug2t.unifiedGui.interfaces.*;
36:
37: /**
38: * Title: simpleWebTools Description: Copyright: Copyright (c) 2002 Company:
39: * Devast
40: *
41: * @author Dirk von der Weiden
42: * @version 1.0
43: */
44:
45: public class UnResetToDefaultListener implements IUnGuiEventListener {
46: private String pem_root = null;
47: private boolean pem_recursive = true;
48:
49: public UnResetToDefaultListener(String xRoot, boolean xRec) {
50: this .pem_recursive = xRec;
51: pem_root = xRoot;
52:
53: return;
54: };
55:
56: public UnResetToDefaultListener(String xRoot) {
57: pem_root = xRoot;
58:
59: return;
60: };
61:
62: public void pcmf_execListener(UnComponent xParam) throws Exception {
63: UnComponent l_el = (UnComponent) xParam.pcmf_getAppl()
64: .pcmf_getUnComponent().pcmf_getByPath(this .pem_root);
65:
66: if (this .pem_recursive) {
67: l_el.pcmf_resetRecursive();
68: KeLog.pcmf_log(xParam.pcmf_getAppl().pcmf_getUnComponent()
69: .pcmf_getName(), "reset recursive objects: "
70: + pem_root, this , KeLog.MESSAGE);
71: } else {
72: l_el.pcmf_reset();
73: KeLog.pcmf_log(xParam.pcmf_getAppl().pcmf_getUnComponent()
74: .pcmf_getName(),
75: "reset single object: " + pem_root, this,
76: KeLog.MESSAGE);
77: }
78: ;
79:
80: xParam.pcmf_getAppl().pcmf_getUnComponent().pcmf_repaint();
81: return;
82: };
83: }
|