gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.swing / org.gvsig.tools.swing.impl / src / main / java / org / gvsig / tools / swing / impl / windowmanager / DefaultWindowManager.java @ 449
History | View | Annotate | Download (604 Bytes)
1 |
package org.gvsig.tools.swing.impl.windowmanager; |
---|---|
2 |
|
3 |
import javax.swing.JComponent; |
4 |
import javax.swing.JDialog; |
5 |
import javax.swing.JFrame; |
6 |
|
7 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
8 |
|
9 |
public class DefaultWindowManager implements WindowManager { |
10 |
|
11 |
public void showWindow(JComponent component, String tittle, MODE mode) { |
12 |
switch (mode) {
|
13 |
case TOOL:
|
14 |
case WINDOW:
|
15 |
case DIALOG:
|
16 |
JFrame frame = new JFrame(tittle); |
17 |
//frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
18 |
|
19 |
frame.setContentPane(component); |
20 |
|
21 |
frame.pack(); |
22 |
frame.setVisible(true);
|
23 |
break;
|
24 |
|
25 |
} |
26 |
|
27 |
} |
28 |
|
29 |
} |