Revision 5485 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/Panels/annotation/ConfigureLabel.java
ConfigureLabel.java | ||
---|---|---|
24 | 24 |
|
25 | 25 |
|
26 | 26 |
public class ConfigureLabel extends JWizardPanel { |
27 |
|
|
28 |
public static final String TEXT_FOR_DEFAULT_VALUE = "- Default -"; |
|
29 |
|
|
27 | 30 |
private FLyrAnnotation layer; |
28 | 31 |
|
29 | 32 |
private HashMap fieldsNames = new HashMap() ; |
... | ... | |
86 | 89 |
|
87 | 90 |
|
88 | 91 |
protected boolean checkIsOkPanelData() { |
89 |
if (((String)this.getCmbSize().getSelectedItem()).trim().length() > 0) {
|
|
92 |
if (!((String)this.getCmbSize().getSelectedItem()).equals(ConfigureLabel.TEXT_FOR_DEFAULT_VALUE)) {
|
|
90 | 93 |
return (((String)this.getCmbSizeUnits().getSelectedItem()).trim().length() > 0); |
91 | 94 |
} |
92 | 95 |
return true; |
... | ... | |
178 | 181 |
} |
179 | 182 |
|
180 | 183 |
private void fillFieldsNames(JComboBox cmb,int[] types) { |
181 |
cmb.addItem("");
|
|
184 |
cmb.addItem(ConfigureLabel.TEXT_FOR_DEFAULT_VALUE);
|
|
182 | 185 |
Collection names; |
183 | 186 |
if (types == null) { |
184 | 187 |
|
... | ... | |
297 | 300 |
this.cmbSizeUnits= new JComboBox(); |
298 | 301 |
this.cmbSizeUnits.setEditable(false); |
299 | 302 |
this.cmbSizeUnits.setBounds(cmbSizeUnitsPosition); |
300 |
this.cmbSizeUnits.addItem(" "); |
|
301 | 303 |
this.cmbSizeUnits.addItem(PluginServices.getText(this,"pixels")); |
302 | 304 |
this.cmbSizeUnits.addItem(PluginServices.getText(this,"metros")); |
303 | 305 |
this.cmbSizeUnits.addItemListener(this.eventsListener); |
... | ... | |
306 | 308 |
} |
307 | 309 |
|
308 | 310 |
public boolean sizeUnitsInPixels(){ |
309 |
return (this.getCmbSize().getSelectedIndex() == 1);
|
|
311 |
return (this.getCmbSize().getSelectedIndex() == 0);
|
|
310 | 312 |
} |
311 | 313 |
|
312 | 314 |
|
Also available in: Unified diff