Package com.sencha.gxt.widget.core.client.menu

Examples of com.sencha.gxt.widget.core.client.menu.ColorMenu


    }

    if (enableColors) {
      fontColor = new TextButton();
      configureButton(fontColor, appearance.fontColor(), m.foreColorTipTitle(), m.foreColorTipText());
      ColorMenu menu = new ColorMenu();
      menu.getPalette().addValueChangeHandler(new ValueChangeHandler<String>() {

        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
          textArea.getFormatter().setForeColor(event.getValue());
        }
      });
      fontColor.setMenu(menu);

      toolBar.add(fontColor);

      fontHighlight = new TextButton();
      configureButton(fontHighlight, appearance.fontHighlight(), m.backColorTipTitle(), m.backColorTipText());

      menu = new ColorMenu();
      menu.getPalette().addValueChangeHandler(new ValueChangeHandler<String>() {
        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
          textArea.getFormatter().setBackColor(event.getValue());
        }
      });
View Full Code Here


    }

    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);
View Full Code Here

TOP

Related Classes of com.sencha.gxt.widget.core.client.menu.ColorMenu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.