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.application.*;
24: import net.charabia.jsmoothgen.application.gui.*;
25: import net.charabia.jsmoothgen.application.gui.util.*;
26: import javax.swing.*;
27: import java.awt.event.*;
28: import java.util.*;
29: import java.io.*;
30: import se.datadosen.component.RiverLayout;
31:
32: public class JSmoothInfo extends Editor implements
33: JSmoothModelBean.SkeletonChangedListener {
34: // private JEditorPane m_skeldesc = new JEditorPane("text/html","<html></html>");
35: private HTMLPane m_skeldesc = new HTMLPane();
36:
37: public JSmoothInfo() {
38: setLayout(new java.awt.BorderLayout());
39: add(java.awt.BorderLayout.CENTER, m_skeldesc);
40: setBackground(java.awt.Color.red);
41: String text = Main.MAIN.local("JSMOOTH_WELCOME_SCREEN");
42: m_skeldesc.setText(text);
43: }
44:
45: public void dataChanged() {
46: }
47:
48: private void updateSkeletonData() {
49: }
50:
51: public void updateModel() {
52: }
53:
54: public String getLabel() {
55: return "SKELETONCHOOSER_LABEL";
56: }
57:
58: public String getDescription() {
59: return "SKELETONCHOOSER_HELP";
60: }
61:
62: public void skeletonChanged() {
63: }
64:
65: public boolean needsBigSpace() {
66: return true;
67: }
68:
69: public boolean needsFullSpace() {
70: return true;
71: }
72:
73: public String readFile(java.io.File f) {
74: StringBuffer buffer = new StringBuffer();
75: try {
76: FileInputStream fis = new FileInputStream(f);
77: InputStreamReader isr = new InputStreamReader(fis);
78: int c;
79: while ((c = isr.read()) != -1)
80: buffer.append((char) c);
81: isr.close();
82: fis.close();
83: } catch (Exception ex) {
84: ex.printStackTrace();
85: }
86: return buffer.toString();
87: }
88:
89: }
|