Revision 1172 org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/infobypoint/MainInfoByPointDialog.java
MainInfoByPointDialog.java | ||
---|---|---|
22 | 22 |
package org.gvsig.raster.tools.app.basic.tool.infobypoint; |
23 | 23 |
|
24 | 24 |
import java.awt.BorderLayout; |
25 |
import java.awt.event.ActionEvent; |
|
26 |
import java.awt.event.ActionListener; |
|
25 | 27 |
import java.util.HashMap; |
26 | 28 |
|
27 | 29 |
import javax.swing.JPanel; |
... | ... | |
34 | 36 |
import org.gvsig.raster.tools.app.basic.tool.infobypoint.gui.MainInfoByPointPanel; |
35 | 37 |
import org.gvsig.raster.tools.app.basic.tool.pixelincrease.PixelInspector; |
36 | 38 |
|
37 |
public class MainInfoByPointDialog extends JPanel implements IWindow { |
|
39 |
public class MainInfoByPointDialog extends JPanel implements IWindow, ActionListener {
|
|
38 | 40 |
private static final long serialVersionUID = 1L; |
39 | 41 |
private MainInfoByPointPanel mainPanel = null; |
42 |
private boolean extended = false; |
|
40 | 43 |
|
41 |
public MainInfoByPointDialog() { |
|
44 |
public MainInfoByPointDialog(boolean extended) { |
|
45 |
this.extended = extended; |
|
42 | 46 |
setLayout(new BorderLayout()); |
43 | 47 |
add(getMainPanel(), BorderLayout.CENTER); |
44 | 48 |
} |
... | ... | |
61 | 65 |
translations.put("red", PluginServices.getText(this, "red")); |
62 | 66 |
translations.put("green", PluginServices.getText(this, "green")); |
63 | 67 |
translations.put("blue", PluginServices.getText(this, "blue")); |
64 |
mainPanel = new MainInfoByPointPanel(translations); |
|
68 |
mainPanel = new MainInfoByPointPanel(translations, extended); |
|
69 |
mainPanel.getButtonsPanel().getExtendedButton().addActionListener(this); |
|
65 | 70 |
} |
66 | 71 |
return mainPanel; |
67 | 72 |
} |
... | ... | |
73 | 78 |
public WindowInfo getWindowInfo() { |
74 | 79 |
WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG); |
75 | 80 |
m_viewinfo.setTitle(PluginServices.getText(this, "InfoByPoint")); |
76 |
m_viewinfo.setHeight(380); |
|
81 |
if(!extended) |
|
82 |
m_viewinfo.setHeight(380); |
|
83 |
else |
|
84 |
m_viewinfo.setHeight(404); |
|
77 | 85 |
m_viewinfo.setWidth(250); |
78 | 86 |
return m_viewinfo; |
79 | 87 |
} |
... | ... | |
95 | 103 |
} |
96 | 104 |
|
97 | 105 |
public PixelInspector getPixelInspector() { |
98 |
return getMainPanel().getViewPanel().getPixelInspectorPanel();
|
|
106 |
return getMainPanel().getPixelInspectorPanel(); |
|
99 | 107 |
} |
108 |
|
|
109 |
public void actionPerformed(ActionEvent e) { |
|
110 |
if(e.getSource() == getMainPanel().getButtonsPanel().getExtendedButton()) { |
|
111 |
|
|
112 |
} |
|
113 |
} |
|
100 | 114 |
} |
Also available in: Unified diff