Statistics
| Revision:

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

History | View | Annotate | Download (2.66 KB)

1
/* 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
/**
30
 * Panel con los botones para la selecci?n de transparencia.
31
 * 
32
 * @author Nacho Brodin (nachobrodin@gmail.com)
33
 */
34
public class TransparencySelectionPanel extends JPanel {
35
    final private static long                         serialVersionUID = 0;
36
    private JButton                                         areaViewSelectionButton = null;
37
    private JButton                                         pixelViewSelectionButton = null;
38
    
39
    /**
40
     * Constructor. 
41
     */
42
    public TransparencySelectionPanel() {
43
        initialize();
44
    }
45

    
46
    /**
47
     * This method initializes this
48
     *
49
     * @return void
50
     */
51
    private void initialize() {
52
            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));
53
            FlowLayout fl = new FlowLayout();
54
            fl.setAlignment(FlowLayout.LEFT);
55
            setLayout(fl);
56
            add(getAreaViewSelectionButton(), null);
57
            add(getPixelViewSelectionButton(), null);
58
    }
59
 
60
    /**
61
     * 
62
     * @return
63
     */
64
    public JButton getAreaViewSelectionButton(){
65
            if(areaViewSelectionButton == null){
66
                    areaViewSelectionButton = new JButton();
67
                    areaViewSelectionButton.setPreferredSize(new Dimension(25, 25));
68
            }
69
            return areaViewSelectionButton;
70
    }
71
    
72
    /**
73
     * 
74
     * @return
75
     */
76
    public JButton getPixelViewSelectionButton(){
77
            if(pixelViewSelectionButton == null){
78
                    pixelViewSelectionButton = new JButton();
79
                    pixelViewSelectionButton.setPreferredSize(new Dimension(25, 25));
80
            }
81
            return pixelViewSelectionButton;
82
    }
83
    
84
} //  @jve:decl-index=0:visual-constraint="36,15"