}
if (enableColors) {
fontColor = new TextButton();
configureButton(fontColor, appearance.fontColor(), m.foreColorTipTitle(), m.foreColorTipText());
final ColorMenu fontColorMenu = new ColorMenu();
fontColorMenu.setFocusOnShow(false);
fontColorMenu.getPalette().addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(ValueChangeEvent<String> event) {
fontColorMenu.hide();
textArea.getFormatter().setForeColor(event.getValue());
}
});
fontColor.setMenu(fontColorMenu);
toolBar.add(fontColor);
fontHighlight = new TextButton();
configureButton(fontHighlight, appearance.fontHighlight(), m.backColorTipTitle(), m.backColorTipText());
final ColorMenu fontHighlightMenu = new ColorMenu();
fontHighlightMenu.setFocusOnShow(false);
fontHighlightMenu.getPalette().addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(ValueChangeEvent<String> event) {
fontHighlightMenu.hide();
textArea.getFormatter().setBackColor(event.getValue());
}
});
fontHighlight.setMenu(fontHighlightMenu);