01: /*
02: * Copyright (C) 2005 Jeff Tassin
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18:
19: package com.jeta.swingbuilder.support;
20:
21: import java.awt.Container;
22:
23: import com.jeta.open.support.DefaultComponentFinder;
24: import com.jeta.swingbuilder.gui.editor.FormEditor;
25:
26: /**
27: * A component finder used for design time. In this case we don't want component
28: * listeners added to anything owned by the FormEditor. The reason is because
29: * the XMLEncoder/XMLDecoder will store the container listeners added by the
30: * design components that are not needed when in runtime.
31: *
32: * @author Jeff Tassin
33: */
34: public class DesignTimeComponentFinder extends DefaultComponentFinder {
35:
36: /**
37: * ctor
38: */
39: public DesignTimeComponentFinder(Container parent) {
40: super (parent);
41: }
42:
43: /**
44: * Recursively searches all Components owned by this container. If the
45: * Component has a name, we store it in the m_components hash table
46: *
47: * @param container
48: * the container to search
49: */
50: protected void buildNames(Container container) {
51: if (!(container instanceof FormEditor)) {
52: super.buildNames(container);
53: }
54: }
55: }
|