Revision 6455
trunk/libraries/libUI/src/org/gvsig/gui/beans/AcceptCancelPanel.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.1 2006-07-03 07:12:28 jaume
|
|
46 |
* Revision 1.2 2006-07-20 10:42:37 jaume
|
|
47 | 47 |
* *** empty log message *** |
48 | 48 |
* |
49 |
* Revision 1.1 2006/07/03 07:12:28 jaume |
|
50 |
* *** empty log message *** |
|
49 | 51 |
* |
52 |
* |
|
50 | 53 |
*/ |
51 | 54 |
package org.gvsig.gui.beans; |
52 | 55 |
|
... | ... | |
83 | 86 |
super(); |
84 | 87 |
initialize(okAction, cancelAction); |
85 | 88 |
} |
86 |
|
|
87 | 89 |
/** |
90 |
* Creates a new instance of the panel with the buttons aligned to the right |
|
91 |
* with no listeners set. |
|
92 |
* |
|
93 |
*/ |
|
94 |
public AcceptCancelPanel() { |
|
95 |
super(); |
|
96 |
initialize(null, null); |
|
97 |
} |
|
98 |
/** |
|
88 | 99 |
* This method initializes this |
89 | 100 |
* |
90 | 101 |
*/ |
91 | 102 |
private void initialize(ActionListener okAction, ActionListener cancelAction) { |
92 | 103 |
this.setLayout(new BorderLayout()); |
93 | 104 |
JPanel aux = new JPanel(); |
94 |
aux.add(getBtnOk(okAction), java.awt.BorderLayout.EAST); |
|
95 |
aux.add(getCancelButton(cancelAction), java.awt.BorderLayout.EAST); |
|
105 |
if (okAction != null) |
|
106 |
aux.add(getBtnOk(okAction), java.awt.BorderLayout.EAST); |
|
107 |
if (cancelAction != null) |
|
108 |
aux.add(getCancelButton(cancelAction), java.awt.BorderLayout.EAST); |
|
96 | 109 |
this.add(aux, java.awt.BorderLayout.EAST); |
97 | 110 |
} |
98 | 111 |
|
Also available in: Unified diff