Revision 1149 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 | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
1 | 22 |
package org.gvsig.raster.tools.app.basic.tool.infobypoint; |
2 | 23 |
|
3 | 24 |
import java.awt.BorderLayout; |
4 | 25 |
import java.util.HashMap; |
5 | 26 |
|
6 | 27 |
import javax.swing.JPanel; |
7 |
import javax.swing.event.ChangeEvent; |
|
8 |
import javax.swing.event.ChangeListener; |
|
9 | 28 |
|
10 | 29 |
import org.gvsig.andami.PluginServices; |
11 | 30 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
12 | 31 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
13 | 32 |
import org.gvsig.raster.tools.app.basic.tool.infobypoint.gui.InfoByPointDataModel; |
14 | 33 |
import org.gvsig.raster.tools.app.basic.tool.infobypoint.gui.MainInfoByPointPanel; |
34 |
import org.gvsig.raster.tools.app.basic.tool.pixelincrease.PixelInspector; |
|
15 | 35 |
|
16 |
public class MainInfoByPointDialog extends JPanel implements IWindow, ChangeListener {
|
|
36 |
public class MainInfoByPointDialog extends JPanel implements IWindow { |
|
17 | 37 |
private static final long serialVersionUID = 1L; |
18 | 38 |
private MainInfoByPointPanel mainPanel = null; |
19 | 39 |
|
20 | 40 |
public MainInfoByPointDialog() { |
21 | 41 |
setLayout(new BorderLayout()); |
22 | 42 |
add(getMainPanel(), BorderLayout.CENTER); |
23 |
getMainPanel().getTabs().addChangeListener(this); |
|
24 | 43 |
} |
25 | 44 |
|
26 | 45 |
public MainInfoByPointPanel getMainPanel() { |
... | ... | |
38 | 57 |
translations.put("coords", PluginServices.getText(this, "coords")); |
39 | 58 |
translations.put("lat", PluginServices.getText(this, "lat")); |
40 | 59 |
translations.put("long", PluginServices.getText(this, "long")); |
41 |
translations.put("view_and_info", PluginServices.getText(this, "view_and_info")); |
|
60 |
translations.put("red", PluginServices.getText(this, "red")); |
|
61 |
translations.put("green", PluginServices.getText(this, "green")); |
|
62 |
translations.put("blue", PluginServices.getText(this, "blue")); |
|
42 | 63 |
mainPanel = new MainInfoByPointPanel(translations); |
43 | 64 |
} |
44 | 65 |
return mainPanel; |
... | ... | |
51 | 72 |
public WindowInfo getWindowInfo() { |
52 | 73 |
WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG); |
53 | 74 |
m_viewinfo.setTitle(PluginServices.getText(this, "InfoByPoint")); |
54 |
m_viewinfo.setHeight(350);
|
|
75 |
m_viewinfo.setHeight(380);
|
|
55 | 76 |
m_viewinfo.setWidth(250); |
56 | 77 |
return m_viewinfo; |
57 | 78 |
} |
... | ... | |
59 | 80 |
public Object getWindowProfile() { |
60 | 81 |
return WindowInfo.PROPERTIES_PROFILE; |
61 | 82 |
} |
62 |
|
|
63 |
public void updateDataModel() { |
|
64 |
getMainPanel().updateDataModel(); |
|
65 |
} |
|
66 | 83 |
|
67 | 84 |
public InfoByPointDataModel getInfoByPointDataModel() { |
68 | 85 |
return getMainPanel().getInfoByPointDataModel(); |
69 | 86 |
} |
70 | 87 |
|
71 |
public void stateChanged(ChangeEvent e) { |
|
72 |
if(e.getSource() == getMainPanel().getTabs()) { |
|
73 |
if(getMainPanel().getTabs().getSelectedIndex() == 2) { |
|
74 |
} else { |
|
75 |
} |
|
76 |
} |
|
88 |
public PixelInspector getPixelInspector() { |
|
89 |
return getMainPanel().getViewPanel().getPixelInspectorPanel(); |
|
77 | 90 |
} |
78 |
|
|
79 | 91 |
} |
Also available in: Unified diff