KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > launch4j > formimpl > ConfigFormImpl


1 /*
2     Launch4j (http://launch4j.sourceforge.net/)
3     Cross-platform Java application wrapper for creating Windows native executables.
4
5     Copyright (C) 2004, 2006 Grzegorz Kowal
6
7     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
11
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     GNU General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with this program; if not, write to the Free Software
19     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */

21
22 /*
23  * Created on May 10, 2005
24  */

25 package net.sf.launch4j.formimpl;
26
27 import javax.swing.BorderFactory JavaDoc;
28 import javax.swing.JFileChooser JavaDoc;
29 import javax.swing.JTextArea JavaDoc;
30
31 import net.sf.launch4j.binding.Binding;
32 import net.sf.launch4j.binding.Bindings;
33 import net.sf.launch4j.binding.IValidatable;
34 import net.sf.launch4j.form.ConfigForm;
35
36 /**
37  * @author Copyright (C) 2005 Grzegorz Kowal
38  */

39 public class ConfigFormImpl extends ConfigForm {
40     private final Bindings _bindings = new Bindings();
41     private final JFileChooser JavaDoc _fileChooser = new FileChooser(ConfigFormImpl.class);
42
43     public ConfigFormImpl() {
44         _tab.setBorder(BorderFactory.createMatteBorder(0, -1, -1, -1, getBackground()));
45         _tab.addTab(Messages.getString("tab.basic"),
46                 new BasicFormImpl(_bindings, _fileChooser));
47         _tab.addTab(Messages.getString("tab.classpath"),
48                 new ClassPathFormImpl(_bindings, _fileChooser));
49         _tab.addTab(Messages.getString("tab.header"),
50                 new HeaderFormImpl(_bindings));
51         _tab.addTab(Messages.getString("tab.jre"),
52                 new JreFormImpl(_bindings, _fileChooser));
53         _tab.addTab(Messages.getString("tab.envVars"),
54                 new EnvironmentVarsFormImpl(_bindings));
55         _tab.addTab(Messages.getString("tab.splash"),
56                 new SplashFormImpl(_bindings, _fileChooser));
57         _tab.addTab(Messages.getString("tab.version"),
58                 new VersionInfoFormImpl(_bindings, _fileChooser));
59         _tab.addTab(Messages.getString("tab.messages"),
60                 new MessagesFormImpl(_bindings));
61     }
62
63     public void clear(IValidatable bean) {
64         _bindings.clear(bean);
65     }
66
67     public void put(IValidatable bean) {
68         _bindings.put(bean);
69     }
70
71     public void get(IValidatable bean) {
72         _bindings.get(bean);
73     }
74     
75     public boolean isModified() {
76         return _bindings.isModified();
77     }
78     
79     public JTextArea JavaDoc getLogTextArea() {
80         return _logTextArea;
81     }
82     
83     public Binding getBinding(String JavaDoc property) {
84         return _bindings.getBinding(property);
85     }
86 }
87
Popular Tags