Revision 12154 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/properties/panels/TransparencySelectionPanel.java

View differences:

TransparencySelectionPanel.java
25 25
import javax.swing.JPanel;
26 26

  
27 27
import com.iver.andami.PluginServices;
28

  
29 28
/**
30 29
 * Panel con los botones para la selecci?n de transparencia.
31 30
 * 
32 31
 * @author Nacho Brodin (nachobrodin@gmail.com)
33 32
 */
34 33
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
    }
34
	private static final long serialVersionUID = -8601512178169707418L;
35
	private JButton areaViewSelectionButton  = null;
36
	private JButton pixelViewSelectionButton = null;
45 37

  
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"
38
	/**
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
}

Also available in: Unified diff