root / trunk / extensions / extSextanteGvsigBindings / src / es / unex / sextante / gvsig / gui / ModelerDialog.java @ 24989
History | View | Annotate | Download (1.4 KB)
1 |
package es.unex.sextante.gvsig.gui; |
---|---|
2 |
|
3 |
import java.awt.BorderLayout; |
4 |
import java.awt.Dimension; |
5 |
|
6 |
import javax.swing.JPanel; |
7 |
|
8 |
import com.iver.andami.ui.mdiManager.IWindow; |
9 |
import com.iver.andami.ui.mdiManager.IWindowListener; |
10 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
11 |
|
12 |
import es.unex.sextante.core.Sextante; |
13 |
import es.unex.sextante.gui.core.SextanteGUI; |
14 |
import es.unex.sextante.gui.modeler.ModelerPanel; |
15 |
|
16 |
public class ModelerDialog extends JPanel implements IWindow, IWindowListener { |
17 |
|
18 |
private WindowInfo viewInfo;
|
19 |
private ModelerPanel m_Panel;
|
20 |
|
21 |
public ModelerDialog(){
|
22 |
|
23 |
super();
|
24 |
|
25 |
if (SextanteGUI.getInputFactory().getDataObjects() == null){ |
26 |
SextanteGUI.getInputFactory().createDataObjects(); |
27 |
} |
28 |
|
29 |
initGUI(); |
30 |
|
31 |
} |
32 |
|
33 |
private void initGUI() { |
34 |
|
35 |
m_Panel = new ModelerPanel(null); |
36 |
BorderLayout thisLayout = new BorderLayout(); |
37 |
this.setLayout(thisLayout);
|
38 |
this.setSize(new Dimension(m_Panel.getWidth(), m_Panel.getHeight())); |
39 |
this.add(m_Panel);
|
40 |
|
41 |
} |
42 |
|
43 |
public WindowInfo getWindowInfo() {
|
44 |
|
45 |
if (viewInfo == null) { |
46 |
viewInfo=new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE);
|
47 |
viewInfo.setTitle(Sextante.getText("Modelizador"));
|
48 |
} |
49 |
return viewInfo;
|
50 |
|
51 |
} |
52 |
|
53 |
public Object getWindowProfile() { |
54 |
return WindowInfo.DIALOG_PROFILE;
|
55 |
} |
56 |
|
57 |
public void windowActivated() {} |
58 |
|
59 |
public void windowClosed() { |
60 |
|
61 |
SextanteGUI.getInputFactory().clearDataObjects(); |
62 |
|
63 |
} |
64 |
|
65 |
} |