root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / project / documents / view / info / gui / FInfoDialog.java @ 38562
History | View | Annotate | Download (1.77 KB)
1 | 7304 | caballero | |
---|---|---|---|
2 | 29596 | jpiera | package org.gvsig.app.project.documents.view.info.gui; |
3 | 7304 | caballero | |
4 | 33429 | cordinyana | import java.awt.BorderLayout; |
5 | |||
6 | import javax.swing.JPanel; |
||
7 | |||
8 | 29596 | jpiera | import org.gvsig.andami.PluginServices; |
9 | 33657 | cordinyana | import org.gvsig.andami.ui.mdiManager.IWindowListener; |
10 | 29596 | jpiera | import org.gvsig.andami.ui.mdiManager.SingletonWindow; |
11 | import org.gvsig.andami.ui.mdiManager.WindowInfo; |
||
12 | 33657 | cordinyana | import org.gvsig.fmap.mapcontrol.swing.dynobject.LayersDynObjectSetComponent; |
13 | 20994 | jmvivo | |
14 | 7304 | caballero | |
15 | |||
16 | /**
|
||
17 | * Dialog that contains the generic Feature Info Viewer
|
||
18 | *
|
||
19 | * @author laura
|
||
20 | *
|
||
21 | */
|
||
22 | 33657 | cordinyana | public class FInfoDialog extends JPanel implements SingletonWindow, |
23 | IWindowListener { |
||
24 | 7304 | caballero | |
25 | 33657 | cordinyana | private static final long serialVersionUID = -6707094091114785970L; |
26 | 38562 | jldominguez | private LayersDynObjectSetComponent infoViewer;
|
27 | 33657 | cordinyana | |
28 | 38562 | jldominguez | public FInfoDialog(LayersDynObjectSetComponent info) {
|
29 | 33429 | cordinyana | super(new BorderLayout()); |
30 | 38562 | jldominguez | this.infoViewer = info;
|
31 | 33657 | cordinyana | add(infoViewer.asJComponent(), BorderLayout.CENTER);
|
32 | 38562 | jldominguez | setSize(500, 375); |
33 | 7304 | caballero | } |
34 | 38562 | jldominguez | |
35 | public void setInfo(LayersDynObjectSetComponent info) { |
||
36 | |||
37 | if (infoViewer != null) { |
||
38 | infoViewer.dispose(); |
||
39 | } |
||
40 | |||
41 | this.removeAll();
|
||
42 | this.infoViewer = info;
|
||
43 | add(infoViewer.asJComponent(), BorderLayout.CENTER);
|
||
44 | } |
||
45 | 7304 | caballero | |
46 | public WindowInfo getWindowInfo() {
|
||
47 | |||
48 | WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG |
|
||
49 | WindowInfo.RESIZABLE | WindowInfo.PALETTE); |
||
50 | m_viewinfo.setWidth(getWidth()+8);
|
||
51 | m_viewinfo.setHeight(getHeight()); |
||
52 | m_viewinfo.setTitle(PluginServices.getText(this,
|
||
53 | "Identificar_Resultados"));
|
||
54 | |||
55 | return m_viewinfo;
|
||
56 | } |
||
57 | |||
58 | public Object getWindowModel() { |
||
59 | return "FInfoDialog"; |
||
60 | } |
||
61 | 26449 | jmvivo | |
62 | public Object getWindowProfile() { |
||
63 | return WindowInfo.PROPERTIES_PROFILE;
|
||
64 | } |
||
65 | 33657 | cordinyana | |
66 | public void windowActivated() { |
||
67 | // Nothing to do
|
||
68 | } |
||
69 | |||
70 | public void windowClosed() { |
||
71 | infoViewer.dispose(); |
||
72 | } |
||
73 | 7304 | caballero | } |