root / trunk / extensions / extRasterTools-SE / src / org / gvsig / rastertools / histogram / ui / HistogramDialog.java @ 10819
History | View | Annotate | Download (2.21 KB)
1 | 10799 | bsanchez | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
4 | *
|
||
5 | * This program is free software; you can redistribute it and/or
|
||
6 | * modify it under the terms of the GNU General Public License
|
||
7 | * as published by the Free Software Foundation; either version 2
|
||
8 | * of the License, or (at your option) any later version.
|
||
9 | *
|
||
10 | * This program is distributed in the hope that it will be useful,
|
||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
13 | * GNU General Public License for more details.
|
||
14 | *
|
||
15 | * You should have received a copy of the GNU General Public License
|
||
16 | * along with this program; if not, write to the Free Software
|
||
17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
18 | */
|
||
19 | package org.gvsig.rastertools.histogram.ui; |
||
20 | |||
21 | import java.awt.BorderLayout; |
||
22 | |||
23 | import javax.swing.JPanel; |
||
24 | |||
25 | import com.iver.andami.PluginServices; |
||
26 | import com.iver.andami.ui.mdiManager.IWindow; |
||
27 | import com.iver.andami.ui.mdiManager.WindowInfo; |
||
28 | /**
|
||
29 | * <code>HistogramDialog</code>. Creaci?n de la ventana para gvSIG.
|
||
30 | *
|
||
31 | * @version 20/03/2007
|
||
32 | * @author Nacho Brodin (brodin_ign@gva.es)
|
||
33 | * @author Borja Sanchez Zamorano (borja.sanchez@iver.es)
|
||
34 | */
|
||
35 | public class HistogramDialog extends JPanel implements IWindow { |
||
36 | private static final long serialVersionUID = 7362459094802955247L; |
||
37 | private HistogramPanel histogramPanel = null; |
||
38 | |||
39 | public HistogramDialog(int width, int height){ |
||
40 | this.setSize(width, height);
|
||
41 | this.setLayout(new BorderLayout(5, 5)); |
||
42 | |||
43 | this.add(getHistogramPanel(), java.awt.BorderLayout.CENTER);
|
||
44 | } |
||
45 | |||
46 | /**
|
||
47 | * Obtiene el panel con el histograma
|
||
48 | * @return HistogramPanel
|
||
49 | */
|
||
50 | public HistogramPanel getHistogramPanel(){
|
||
51 | if(histogramPanel == null){ |
||
52 | histogramPanel = new HistogramPanel();
|
||
53 | 10819 | bsanchez | // TODO: A?adir los eventos para cerrar la ventana
|
54 | 10799 | bsanchez | } |
55 | return histogramPanel;
|
||
56 | } |
||
57 | |||
58 | public WindowInfo getWindowInfo() {
|
||
59 | WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE);
|
||
60 | m_viewinfo.setTitle(PluginServices.getText(this, "histograma")); |
||
61 | m_viewinfo.setHeight(this.getHeight());
|
||
62 | m_viewinfo.setWidth(this.getWidth());
|
||
63 | return m_viewinfo;
|
||
64 | } |
||
65 | } |