Revision 12154 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/properties/dialog/ButtonsPanel.java
ButtonsPanel.java | ||
---|---|---|
22 | 22 |
|
23 | 23 |
import javax.swing.JButton; |
24 | 24 |
import javax.swing.JPanel; |
25 |
|
|
26 | 25 |
/** |
27 | 26 |
* Panel con los controles de bot?n de aplicar, aceptar y cancelar. |
28 | 27 |
* |
29 | 28 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
30 |
* |
|
31 | 29 |
*/ |
32 | 30 |
public class ButtonsPanel extends JPanel { |
33 | 31 |
private static final long serialVersionUID = -5111153508681932951L; |
34 |
private JButton bAccept = null; |
|
35 |
private JButton bApply = null; |
|
36 |
private JButton bCancel = null; |
|
37 |
private int sizePanelX = 0; |
|
38 |
private int sizePanelY = 30; |
|
39 |
|
|
32 |
private JButton bAccept = null; |
|
33 |
private JButton bApply = null; |
|
34 |
private JButton bCancel = null; |
|
35 |
private int sizePanelY = 30; |
|
40 | 36 |
|
41 | 37 |
/** |
42 |
* This method initializes |
|
43 |
* |
|
38 |
* This method initializes |
|
44 | 39 |
*/ |
45 |
public ButtonsPanel(int sizex) {
|
|
40 |
public ButtonsPanel() { |
|
46 | 41 |
super(); |
47 |
this.sizePanelX = sizex; |
|
48 | 42 |
initialize(); |
49 | 43 |
} |
50 | 44 |
|
51 | 45 |
/** |
52 | 46 |
* This method initializes this |
53 |
* |
|
54 | 47 |
*/ |
55 | 48 |
private void initialize() { |
56 |
FlowLayout flowLayout = new FlowLayout();
|
|
57 |
flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
|
|
58 |
flowLayout.setHgap(2);
|
|
59 |
flowLayout.setVgap(2);
|
|
60 |
this.setLayout(flowLayout);
|
|
61 |
this.setPreferredSize(new java.awt.Dimension(sizePanelX, sizePanelY));
|
|
62 |
this.add(getAccept(), null);
|
|
63 |
this.add(getApply(), null);
|
|
64 |
this.add(getCancel(), null);
|
|
65 |
|
|
49 |
FlowLayout flowLayout = new FlowLayout();
|
|
50 |
flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
|
|
51 |
flowLayout.setHgap(2);
|
|
52 |
flowLayout.setVgap(2);
|
|
53 |
this.setLayout(flowLayout);
|
|
54 |
this.setPreferredSize(new java.awt.Dimension(0, sizePanelY));
|
|
55 |
this.add(getAccept(), null);
|
|
56 |
this.add(getApply(), null);
|
|
57 |
this.add(getCancel(), null);
|
|
58 |
|
|
66 | 59 |
} |
67 | 60 |
|
68 | 61 |
/** |
69 |
* This method initializes jButton |
|
70 |
* |
|
71 |
* @return javax.swing.JButton |
|
62 |
* This method initializes jButton |
|
63 |
* @return javax.swing.JButton |
|
72 | 64 |
*/ |
73 | 65 |
public JButton getAccept() { |
74 | 66 |
if (bAccept == null) { |
... | ... | |
79 | 71 |
} |
80 | 72 |
|
81 | 73 |
/** |
82 |
* This method initializes jButton1 |
|
83 |
* |
|
84 |
* @return javax.swing.JButton |
|
74 |
* This method initializes jButton1 |
|
75 |
* @return javax.swing.JButton |
|
85 | 76 |
*/ |
86 | 77 |
public JButton getApply() { |
87 | 78 |
if (bApply == null) { |
... | ... | |
92 | 83 |
} |
93 | 84 |
|
94 | 85 |
/** |
95 |
* This method initializes jButton2 |
|
96 |
* |
|
97 |
* @return javax.swing.JButton |
|
86 |
* This method initializes jButton2 |
|
87 |
* @return javax.swing.JButton |
|
98 | 88 |
*/ |
99 | 89 |
public JButton getCancel() { |
100 | 90 |
if (bCancel == null) { |
... | ... | |
103 | 93 |
} |
104 | 94 |
return bCancel; |
105 | 95 |
} |
106 |
|
|
107 |
} |
|
96 |
} |
Also available in: Unified diff