Statistics
| Revision:

root / branches / v2_0_0_prep / extensions / org.gvsig.mkmvnproject / src / main / java / org / gvsig / mkmvnproject / gui / CreatePluginConsoleWindow.java @ 38543

History | View | Annotate | Download (2.68 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.mkmvnproject.gui;
23

    
24
import java.awt.Dimension;
25
import java.io.IOException;
26

    
27
import org.gvsig.andami.ui.mdiManager.IWindow;
28
import org.gvsig.andami.ui.mdiManager.IWindowListener;
29
import org.gvsig.andami.ui.mdiManager.WindowInfo;
30

    
31
/**
32
 * A gvSIG window which shows the execution log messages of the create plugin
33
 * process.
34
 * 
35
 * @author gvSIG Team
36
 * @version $Id$
37
 */
38
public class CreatePluginConsoleWindow extends CreatePluginConsolePanel
39
                implements IWindow, IWindowListener {
40

    
41
        private static final long serialVersionUID = -5589080107545290284L;
42

    
43
        private WindowInfo info;
44

    
45
        private Object profile = WindowInfo.EDITOR_PROFILE;
46

    
47
        /**
48
         * Constructor.
49
         * 
50
         * @throws IOException
51
         *             if there is an error creating the console streams
52
         */
53
        public CreatePluginConsoleWindow() throws IOException {
54
                super();
55
                initializeWindow();
56
        }
57

    
58
        /**
59
         * Constructor.
60
         * 
61
         * @param isDoubleBuffered
62
         *            if the panel must be double buffered.
63
         * @throws IOException
64
         *             if there is an error creating the console streams
65
         */
66
        public CreatePluginConsoleWindow(boolean isDoubleBuffered) throws IOException {
67
                super(isDoubleBuffered);
68
                initializeWindow();
69
        }
70

    
71
        /**
72
         * Initializes the window.
73
         */
74
        private void initializeWindow() {
75
                Dimension dimension = new Dimension(600, 300);
76
                setSize(dimension);
77
                int code = WindowInfo.ICONIFIABLE | WindowInfo.MAXIMIZABLE
78
                                | WindowInfo.RESIZABLE | WindowInfo.MODELESSDIALOG;
79
                profile = WindowInfo.EDITOR_PROFILE;
80
                info = new WindowInfo(code);
81
                info.setTitle("Console");
82
                info.setMinimumSize(dimension);
83
        }
84

    
85
        public WindowInfo getWindowInfo() {
86
                return info;
87
        }
88

    
89
        public Object getWindowProfile() {
90
                return profile;
91
        }
92

    
93
        public void windowActivated() {
94
                // Nothing to do
95
        }
96

    
97
        public void windowClosed() {
98
                super.closeConsole();
99
        }
100

    
101
}