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.defaults;
20:
21: import com.jeta.forms.beanmgr.BeanManager;
22: import com.jeta.forms.gui.components.ContainedFormFactory;
23: import com.jeta.forms.gui.form.FormComponentFactory;
24: import com.jeta.forms.gui.form.GridOverlayFactory;
25: import com.jeta.forms.project.ProjectManager;
26: import com.jeta.forms.support.UserProperties;
27: import com.jeta.open.registry.JETARegistry;
28: import com.jeta.open.support.ComponentFinderFactory;
29: import com.jeta.swingbuilder.codegen.builder.PropertyWriterFactory;
30: import com.jeta.swingbuilder.gui.beanmgr.DefaultBeanManager;
31: import com.jeta.swingbuilder.gui.colorchooser.DefaultColorChooserFactory;
32: import com.jeta.swingbuilder.gui.components.DefaultContainedFormFactory;
33: import com.jeta.swingbuilder.gui.editor.DesignFormComponentFactory;
34: import com.jeta.swingbuilder.gui.editor.DesignGridOverlayFactory;
35: import com.jeta.swingbuilder.gui.lookandfeel.DefaultLookAndFeelManager;
36: import com.jeta.swingbuilder.project.DefaultProjectManager;
37: import com.jeta.swingbuilder.support.DesignTimeComponentFinderFactory;
38: import com.jeta.swingbuilder.support.DesignerUserProperties;
39:
40: /**
41: * This class loads the JETARegistry with default objects required by the
42: * SwingBuilder system.
43: *
44: * @author Jeff Tassin
45: */
46: public class DefaultInitializer {
47: /**
48: * Initializes the components needed by the Forms system.
49: */
50: public static void initialize() {
51: com.jeta.forms.logger.FormsLogger
52: .debug("SwingBuilder. default initializer");
53: JETARegistry.rebind(ProjectManager.COMPONENT_ID,
54: new DefaultProjectManager());
55: JETARegistry.rebind(BeanManager.COMPONENT_ID,
56: new DefaultBeanManager());
57: JETARegistry.rebind(DefaultLookAndFeelManager.COMPONENT_ID,
58: new DefaultLookAndFeelManager());
59: JETARegistry.rebind(GridOverlayFactory.COMPONENT_ID,
60: new DesignGridOverlayFactory());
61: JETARegistry.rebind(FormComponentFactory.COMPONENT_ID,
62: new DesignFormComponentFactory());
63: JETARegistry.rebind(ComponentFinderFactory.COMPONENT_ID,
64: new DesignTimeComponentFinderFactory());
65: JETARegistry.rebind(UserProperties.COMPONENT_ID,
66: new DesignerUserProperties());
67: JETARegistry.rebind(ContainedFormFactory.COMPONENT_ID,
68: new DefaultContainedFormFactory());
69: JETARegistry.rebind(PropertyWriterFactory.COMPONENT_ID,
70: new PropertyWriterFactory());
71: JETARegistry.rebind(DefaultColorChooserFactory.COMPONENT_ID,
72: new DefaultColorChooserFactory());
73:
74: JETARegistry.rebind("AbeilleForms.runTime", Boolean
75: .valueOf(false));
76: }
77: }
|