svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.mkmvnproject.app / org.gvsig.mkmvnproject.app.mainplugin / src / main / java / org / gvsig / mkmvnproject / gui / CreatePluginConsoleWindow.java @ 40557
History | View | Annotate | Download (2.73 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.mkmvnproject.gui; |
25 |
|
26 |
import java.awt.Dimension; |
27 |
import java.io.IOException; |
28 |
|
29 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
30 |
import org.gvsig.andami.ui.mdiManager.IWindowListener; |
31 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
32 |
|
33 |
/**
|
34 |
* A gvSIG window which shows the execution log messages of the create plugin
|
35 |
* process.
|
36 |
*
|
37 |
* @author gvSIG Team
|
38 |
* @version $Id$
|
39 |
*/
|
40 |
public class CreatePluginConsoleWindow extends CreatePluginConsolePanel |
41 |
implements IWindow, IWindowListener {
|
42 |
|
43 |
private static final long serialVersionUID = -5589080107545290284L; |
44 |
|
45 |
private WindowInfo info;
|
46 |
|
47 |
private Object profile = WindowInfo.EDITOR_PROFILE; |
48 |
|
49 |
/**
|
50 |
* Constructor.
|
51 |
*
|
52 |
* @throws IOException
|
53 |
* if there is an error creating the console streams
|
54 |
*/
|
55 |
public CreatePluginConsoleWindow() throws IOException { |
56 |
super();
|
57 |
initializeWindow(); |
58 |
} |
59 |
|
60 |
/**
|
61 |
* Constructor.
|
62 |
*
|
63 |
* @param isDoubleBuffered
|
64 |
* if the panel must be double buffered.
|
65 |
* @throws IOException
|
66 |
* if there is an error creating the console streams
|
67 |
*/
|
68 |
public CreatePluginConsoleWindow(boolean isDoubleBuffered) throws IOException { |
69 |
super(isDoubleBuffered);
|
70 |
initializeWindow(); |
71 |
} |
72 |
|
73 |
/**
|
74 |
* Initializes the window.
|
75 |
*/
|
76 |
private void initializeWindow() { |
77 |
Dimension dimension = new Dimension(600, 300); |
78 |
setSize(dimension); |
79 |
int code = WindowInfo.ICONIFIABLE | WindowInfo.MAXIMIZABLE
|
80 |
| WindowInfo.RESIZABLE | WindowInfo.MODELESSDIALOG; |
81 |
profile = WindowInfo.EDITOR_PROFILE; |
82 |
info = new WindowInfo(code);
|
83 |
info.setTitle("Console");
|
84 |
info.setMinimumSize(dimension); |
85 |
} |
86 |
|
87 |
public WindowInfo getWindowInfo() {
|
88 |
return info;
|
89 |
} |
90 |
|
91 |
public Object getWindowProfile() { |
92 |
return profile;
|
93 |
} |
94 |
|
95 |
public void windowActivated() { |
96 |
// Nothing to do
|
97 |
} |
98 |
|
99 |
public void windowClosed() { |
100 |
super.closeConsole();
|
101 |
} |
102 |
|
103 |
} |