Statistics
| Revision:

root / trunk / extensions / extRasterTools-SE / src / org / gvsig / rastertools / properties / panels / TransparencySelectionPanel.java @ 29454

History | View | Annotate | Download (2.42 KB)

1 10740 nacho
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2007 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.properties.panels;
20
21
import java.awt.Dimension;
22
import java.awt.FlowLayout;
23
24
import javax.swing.JButton;
25
import javax.swing.JPanel;
26
27
import com.iver.andami.PluginServices;
28
/**
29
 * Panel con los botones para la selecci?n de transparencia.
30
 *
31
 * @author Nacho Brodin (nachobrodin@gmail.com)
32
 */
33
public class TransparencySelectionPanel extends JPanel {
34 12154 bsanchez
        private static final long serialVersionUID = -8601512178169707418L;
35
        private JButton areaViewSelectionButton  = null;
36
        private JButton pixelViewSelectionButton = null;
37 10740 nacho
38 12154 bsanchez
        /**
39
         * Constructor.
40
         */
41
        public TransparencySelectionPanel() {
42
                initialize();
43
        }
44
45
        /**
46
         * This method initializes this
47
         * @return void
48
         */
49
        private void initialize() {
50
                setBorder(javax.swing.BorderFactory.createTitledBorder(null, PluginServices.getText(this, "transp_selection"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));
51
                FlowLayout fl = new FlowLayout();
52
                fl.setAlignment(FlowLayout.LEFT);
53
                setLayout(fl);
54
                add(getAreaViewSelectionButton(), null);
55
                add(getPixelViewSelectionButton(), null);
56
        }
57
58
        public JButton getAreaViewSelectionButton() {
59
                if (areaViewSelectionButton == null) {
60
                        areaViewSelectionButton = new JButton();
61
                        areaViewSelectionButton.setPreferredSize(new Dimension(25, 25));
62
                }
63
                return areaViewSelectionButton;
64
        }
65
66
        public JButton getPixelViewSelectionButton() {
67
                if (pixelViewSelectionButton == null) {
68
                        pixelViewSelectionButton = new JButton();
69
                        pixelViewSelectionButton.setPreferredSize(new Dimension(25, 25));
70
                }
71
                return pixelViewSelectionButton;
72
        }
73
}