gvsig-projects-pool / org.gvsig.winmgr / trunk / org.gvsig.winmgr.lib / org.gvsig.winmgr.lib.impl / src / main / java / org / gvsig / winmgr / lib / impl / DefaultWindowManager.java @ 682
History | View | Annotate | Download (3.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.winmgr.lib.impl; |
25 |
|
26 |
import org.gvsig.winmgr.lib.impl.tools.DefaultToolsBuilder; |
27 |
import java.awt.Dimension; |
28 |
import java.awt.Image; |
29 |
import java.awt.Rectangle; |
30 |
import java.awt.image.BufferedImage; |
31 |
import java.util.List; |
32 |
import java.util.Locale; |
33 |
import javax.swing.ImageIcon; |
34 |
import javax.swing.JComponent; |
35 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
36 |
import org.gvsig.winmgr.lib.api.ToolsBuilder; |
37 |
import org.gvsig.winmgr.lib.api.Window; |
38 |
import org.gvsig.winmgr.lib.api.WindowManager; |
39 |
|
40 |
/**
|
41 |
*
|
42 |
* @author jjdelcerro
|
43 |
*/
|
44 |
public class DefaultWindowManager implements WindowManager { |
45 |
|
46 |
private ToolsBuilder tools;
|
47 |
private WindowStack windowStack;
|
48 |
|
49 |
@Override
|
50 |
public Window createWindow(JComponent contents, Object model, String title, int mode, Object profile, Rectangle preferredBound, Dimension minimunSize) { |
51 |
Window win = new DefaultWindow( |
52 |
this.getWindowStack(),
|
53 |
contents, |
54 |
model, |
55 |
title, |
56 |
mode, |
57 |
profile, |
58 |
preferredBound, |
59 |
minimunSize |
60 |
); |
61 |
return win;
|
62 |
} |
63 |
|
64 |
@Override
|
65 |
public void showWindow(Window window) { |
66 |
|
67 |
} |
68 |
|
69 |
@Override
|
70 |
public Window getWindow(JComponent contents) { |
71 |
return null; |
72 |
} |
73 |
|
74 |
@Override
|
75 |
public Window getWindow(int id) { |
76 |
return null; |
77 |
} |
78 |
|
79 |
@Override
|
80 |
public Window getActiveWindow() { |
81 |
return null; |
82 |
} |
83 |
|
84 |
@Override
|
85 |
public List<Window> getAllWindows() { |
86 |
return null; |
87 |
} |
88 |
|
89 |
@Override
|
90 |
public List<Window> getAllWindowsOrdereds() { |
91 |
return null; |
92 |
} |
93 |
|
94 |
@Override
|
95 |
public BufferedImage getImagePreview() { |
96 |
return null; |
97 |
} |
98 |
|
99 |
@Override
|
100 |
public void setBackgroundImage(ImageIcon image, BackgroundImageMode mode) { |
101 |
|
102 |
} |
103 |
|
104 |
@Override
|
105 |
public void setWaitCursor() { |
106 |
|
107 |
} |
108 |
|
109 |
@Override
|
110 |
public void restoreCursor() { |
111 |
|
112 |
} |
113 |
|
114 |
@Override
|
115 |
public void setLocale(Locale locale) { |
116 |
|
117 |
} |
118 |
|
119 |
@Override
|
120 |
public ToolsBuilder getTools() {
|
121 |
return this.tools; |
122 |
} |
123 |
|
124 |
@Override
|
125 |
public ToolsBuilder createToolsBuilder() {
|
126 |
ToolsBuilder theTools = new DefaultToolsBuilder();
|
127 |
return theTools;
|
128 |
} |
129 |
|
130 |
@Override
|
131 |
public Dialog createDialog(JComponent jc, String string, String string1, int i) { |
132 |
return null; |
133 |
} |
134 |
|
135 |
@Override
|
136 |
public void showWindow(JComponent jc, String string, MODE mode, Image image) { |
137 |
|
138 |
} |
139 |
|
140 |
@Override
|
141 |
public void showWindow(JComponent jc, String string, MODE mode, Image image, int i) { |
142 |
|
143 |
} |
144 |
|
145 |
@Override
|
146 |
public void showWindow(JComponent jc, String string, MODE mode) { |
147 |
|
148 |
} |
149 |
|
150 |
private WindowStack getWindowStack() {
|
151 |
if( this.windowStack==null ) { |
152 |
this.windowStack = new WindowStack(); |
153 |
} |
154 |
return this.windowStack; |
155 |
} |
156 |
} |