svn-gvsig-desktop / trunk / extensions / extRasterTools / src / com / iver / cit / gvsig / rasterTools / saveRaster / ui / MethodSaveRasterSelectorPanel.java @ 4468
History | View | Annotate | Download (3.02 KB)
1 |
package com.iver.cit.gvsig.rasterTools.saveRaster.ui; |
---|---|
2 |
|
3 |
import java.awt.FlowLayout; |
4 |
import java.awt.GridBagConstraints; |
5 |
import java.awt.GridBagLayout; |
6 |
|
7 |
import javax.swing.ButtonGroup; |
8 |
import javax.swing.JPanel; |
9 |
import javax.swing.JRadioButton; |
10 |
|
11 |
public class MethodSaveRasterSelectorPanel extends JPanel { |
12 |
|
13 |
private JPanel pMethodSelector = null; |
14 |
private JRadioButton rbScale = null; |
15 |
private JRadioButton rbMtsPixel = null; |
16 |
private JRadioButton rbSize = null; |
17 |
private ButtonGroup group = null; |
18 |
|
19 |
/**
|
20 |
* This is the default constructor
|
21 |
*/
|
22 |
public MethodSaveRasterSelectorPanel() {
|
23 |
super();
|
24 |
initialize(); |
25 |
} |
26 |
|
27 |
/**
|
28 |
* This method initializes this
|
29 |
*
|
30 |
* @return void
|
31 |
*/
|
32 |
private void initialize() { |
33 |
FlowLayout flowLayout = new FlowLayout(); |
34 |
flowLayout.setHgap(2);
|
35 |
flowLayout.setVgap(2);
|
36 |
this.setLayout(flowLayout);
|
37 |
this.setSize(98, 73); |
38 |
this.setPreferredSize(new java.awt.Dimension(98,73)); |
39 |
group = new ButtonGroup(); |
40 |
this.add(getPMethodSelector(), null); |
41 |
} |
42 |
|
43 |
/**
|
44 |
* This method initializes jPanel
|
45 |
*
|
46 |
* @return javax.swing.JPanel
|
47 |
*/
|
48 |
public JPanel getPMethodSelector() { |
49 |
if (pMethodSelector == null) { |
50 |
GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); |
51 |
gridBagConstraints2.gridx = 0;
|
52 |
gridBagConstraints2.anchor = java.awt.GridBagConstraints.WEST; |
53 |
gridBagConstraints2.gridy = 2;
|
54 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
55 |
gridBagConstraints1.gridx = 0;
|
56 |
gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; |
57 |
gridBagConstraints1.gridy = 0;
|
58 |
GridBagConstraints gridBagConstraints = new GridBagConstraints(); |
59 |
gridBagConstraints.gridx = 0;
|
60 |
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; |
61 |
gridBagConstraints.gridy = 1;
|
62 |
pMethodSelector = new JPanel(); |
63 |
pMethodSelector.setLayout(new GridBagLayout()); |
64 |
pMethodSelector.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,1));
|
65 |
pMethodSelector.setPreferredSize(new java.awt.Dimension(105,71)); |
66 |
group.add(getRbScale()); |
67 |
group.add(getRbMtsPixel()); |
68 |
group.add(getRbSize()); |
69 |
pMethodSelector.add(getRbScale(), gridBagConstraints1); |
70 |
pMethodSelector.add(getRbMtsPixel(), gridBagConstraints); |
71 |
pMethodSelector.add(getRbSize(), gridBagConstraints2); |
72 |
} |
73 |
return pMethodSelector;
|
74 |
} |
75 |
|
76 |
/**
|
77 |
* This method initializes jRadioButton
|
78 |
*
|
79 |
* @return javax.swing.JRadioButton
|
80 |
*/
|
81 |
public JRadioButton getRbScale() { |
82 |
if (rbScale == null) { |
83 |
rbScale = new JRadioButton(); |
84 |
rbScale.setText("Escala");
|
85 |
rbScale.setSelected(true);
|
86 |
} |
87 |
return rbScale;
|
88 |
} |
89 |
|
90 |
/**
|
91 |
* This method initializes jRadioButton1
|
92 |
*
|
93 |
* @return javax.swing.JRadioButton
|
94 |
*/
|
95 |
public JRadioButton getRbMtsPixel() { |
96 |
if (rbMtsPixel == null) { |
97 |
rbMtsPixel = new JRadioButton(); |
98 |
rbMtsPixel.setText("Mts/Pixel");
|
99 |
} |
100 |
return rbMtsPixel;
|
101 |
} |
102 |
|
103 |
/**
|
104 |
* This method initializes jRadioButton2
|
105 |
*
|
106 |
* @return javax.swing.JRadioButton
|
107 |
*/
|
108 |
public JRadioButton getRbSize() { |
109 |
if (rbSize == null) { |
110 |
rbSize = new JRadioButton(); |
111 |
rbSize.setText("Tama?o");
|
112 |
} |
113 |
return rbSize;
|
114 |
} |
115 |
|
116 |
} |