01: /*
02: JSmooth: a VM wrapper toolkit for Windows
03: Copyright (C) 2003 Rodrigo Reyes <reyes@charabia.net>
04:
05: This program is free software; you can redistribute it and/or modify
06: it under the terms of the GNU General Public License as published by
07: the Free Software Foundation; either version 2 of the License, or
08: (at your option) any later version.
09:
10: This program is distributed in the hope that it will be useful,
11: but WITHOUT ANY WARRANTY; without even the implied warranty of
12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: GNU General Public License for more details.
14:
15: You should have received a copy of the GNU General Public License
16: along with this program; if not, write to the Free Software
17: Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18:
19: */
20:
21: package net.charabia.jsmoothgen.application.gui.editors;
22:
23: import net.charabia.jsmoothgen.skeleton.*;
24: import net.charabia.jsmoothgen.application.*;
25: import net.charabia.jsmoothgen.application.gui.*;
26: import net.charabia.jsmoothgen.application.gui.util.*;
27: import javax.swing.*;
28: import java.awt.*;
29: import java.util.*;
30: import com.l2fprod.common.swing.*;
31: import com.l2fprod.common.propertysheet.*;
32:
33: public class ExecutableName extends Editor {
34: private FileSelectionTextField m_selector = new FileSelectionTextField();
35:
36: public ExecutableName() {
37: setLayout(new BorderLayout());
38: add(BorderLayout.CENTER, m_selector);
39: }
40:
41: public void dataChanged() {
42: if (getBaseDir() != null)
43: m_selector.setBaseDir(getBaseDir());
44:
45: if (m_model.getExecutableName() != null)
46: m_selector.setFile(getAbsolutePath(new java.io.File(m_model
47: .getExecutableName())));
48: else
49: m_selector.setFile(null);
50: }
51:
52: public void updateModel() {
53: if (m_selector.getFile() != null)
54: m_model.setExecutableName(m_selector.getFile().toString());
55: else
56: m_model.setExecutableName(null);
57: }
58:
59: public String getLabel() {
60: return "EXECUTABLE_LABEL";
61: }
62:
63: public String getDescription() {
64: return "EXECUTABLE_HELP";
65: }
66:
67: }
|