Revision 1194 org.gvsig.raster.wms/trunk/org.gvsig.raster.wms/org.gvsig.raster.wms.app/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/infobypoint/MainInfoByPointDialog.java
MainInfoByPointDialog.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
import java.awt.BorderLayout; |
25 | 25 |
import java.awt.Component; |
26 |
import java.awt.event.ActionEvent; |
|
27 |
import java.awt.event.ActionListener; |
|
26 |
import java.awt.Dimension; |
|
28 | 27 |
import java.util.HashMap; |
29 | 28 |
|
30 | 29 |
import javax.swing.ImageIcon; |
30 |
import javax.swing.JEditorPane; |
|
31 | 31 |
import javax.swing.JPanel; |
32 |
import javax.swing.JScrollPane; |
|
32 | 33 |
|
33 | 34 |
import org.gvsig.andami.IconThemeHelper; |
34 | 35 |
import org.gvsig.andami.PluginServices; |
... | ... | |
44 | 45 |
* Dialog for the information by point of a raster layer |
45 | 46 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
46 | 47 |
*/ |
47 |
public class MainInfoByPointDialog extends JPanel implements IWindow, ActionListener {
|
|
48 |
public class MainInfoByPointDialog extends JPanel implements IWindow { |
|
48 | 49 |
private static final long serialVersionUID = 1L; |
49 | 50 |
private MainInfoByPointPanel mainPanel = null; |
50 |
private boolean extended = false; |
|
51 |
private JScrollPane scroll = null; |
|
52 |
private JPanel wmsInfo = null; |
|
53 |
private JEditorPane jeditor = null; |
|
51 | 54 |
|
52 |
public MainInfoByPointDialog(boolean extended) { |
|
53 |
this.extended = extended; |
|
55 |
public MainInfoByPointDialog() { |
|
54 | 56 |
setLayout(new BorderLayout()); |
55 |
add((Component)getMainPanel(), BorderLayout.CENTER); |
|
57 |
add((Component)getMainPanel(), BorderLayout.WEST); |
|
58 |
add((Component)getWMSInfoPanel(), BorderLayout.CENTER); |
|
56 | 59 |
} |
57 | 60 |
|
58 | 61 |
public MainInfoByPointPanel getMainPanel() { |
... | ... | |
77 | 80 |
icons.put("forward-icon", IconThemeHelper.getImageIcon("forward-icon")); |
78 | 81 |
icons.put("backward-icon", IconThemeHelper.getImageIcon("backward-icon")); |
79 | 82 |
mainPanel = RasterSwingLocator.getSwingManager().createInfoByPointPanel( |
80 |
translations, icons, extended);
|
|
81 |
mainPanel.addListenerExtendedButton(this);
|
|
83 |
translations, icons, null);
|
|
84 |
((JPanel)mainPanel).setPreferredSize(new Dimension(230, 0));
|
|
82 | 85 |
} |
83 | 86 |
return mainPanel; |
84 | 87 |
} |
85 | 88 |
|
89 |
private JPanel getWMSInfoPanel() { |
|
90 |
if(wmsInfo == null) { |
|
91 |
wmsInfo = new JPanel(); |
|
92 |
wmsInfo.setLayout(new BorderLayout()); |
|
93 |
jeditor = new JEditorPane(); |
|
94 |
scroll = new JScrollPane(jeditor); |
|
95 |
wmsInfo.add(scroll, BorderLayout.CENTER); |
|
96 |
} |
|
97 |
return wmsInfo; |
|
98 |
} |
|
99 |
|
|
100 |
public void setWMSInfoText(String text, String type) { |
|
101 |
jeditor.setContentType(type); |
|
102 |
jeditor.setText(text); |
|
103 |
} |
|
104 |
|
|
86 | 105 |
/* |
87 | 106 |
* (non-Javadoc) |
88 | 107 |
* @see com.iver.andami.ui.mdiManager.IWindow#getWindowInfo() |
89 | 108 |
*/ |
90 | 109 |
public WindowInfo getWindowInfo() { |
91 |
WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG); |
|
110 |
WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG | WindowInfo.RESIZABLE);
|
|
92 | 111 |
m_viewinfo.setTitle(PluginServices.getText(this, "WMS InfoByPoint")); |
93 | 112 |
m_viewinfo.setHeight(380); |
94 |
m_viewinfo.setWidth(250);
|
|
113 |
m_viewinfo.setWidth(500);
|
|
95 | 114 |
return m_viewinfo; |
96 | 115 |
} |
97 | 116 |
|
... | ... | |
114 | 133 |
public PixelInspector getPixelInspector() { |
115 | 134 |
return getMainPanel().getPixelInspectorPanel(); |
116 | 135 |
} |
117 |
|
|
118 |
public void actionPerformed(ActionEvent e) { |
|
119 |
} |
|
120 |
} |
|
136 |
} |
Also available in: Unified diff