Revision 2509 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/ColorPickerControllerImpl.java
ColorPickerControllerImpl.java | ||
---|---|---|
16 | 16 |
import javax.swing.event.ChangeEvent; |
17 | 17 |
import javax.swing.event.ChangeListener; |
18 | 18 |
import javax.swing.text.JTextComponent; |
19 |
import org.apache.commons.lang3.StringUtils; |
|
19 | 20 |
|
20 | 21 |
import org.gvsig.tools.ToolsLocator; |
21 | 22 |
import org.gvsig.tools.i18n.I18nManager; |
... | ... | |
50 | 51 |
} |
51 | 52 |
|
52 | 53 |
public ColorPickerControllerImpl(JTextComponent txtLabel, JButton btnShowDialog, JSlider sldAlpha, boolean allowNull) { |
54 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
53 | 55 |
this.txtLabel = txtLabel; |
54 | 56 |
this.btnShowDialog = btnShowDialog; |
55 | 57 |
this.sldAlpha = sldAlpha; |
... | ... | |
61 | 63 |
if( this.btnShowDialog.getText().equals("...") ) { |
62 | 64 |
this.btnShowDialog.setText(""); |
63 | 65 |
} |
66 |
if( StringUtils.isBlank(this.btnShowDialog.getToolTipText()) ) { |
|
67 |
this.btnShowDialog.setToolTipText(i18n.getTranslation("_Color_picker")); |
|
68 |
} |
|
64 | 69 |
|
65 | 70 |
// Remove the listeners to prevent strange behavior when you call this |
66 | 71 |
// class repeatedly with the same button and slider. |
Also available in: Unified diff