Search in sources :

Example 1 with ColorMenu

use of com.extjs.gxt.ui.client.widget.menu.ColorMenu in project activityinfo by bedatadriven.

the class ColorField method onTriggerClick.

@Override
protected void onTriggerClick(ComponentEvent ce) {
    super.onTriggerClick(ce);
    menu = new ColorMenu() {

        @Override
        protected void onClick(ComponentEvent ce) {
        // TODO Auto-generated method stub
        }
    };
    menu.getColorPalette().addListener(Events.BeforeSelect, new Listener<ColorPaletteEvent>() {

        @Override
        public void handleEvent(ColorPaletteEvent ce) {
            setValue(ce.getColor());
            menu.hide();
        }
    });
    menu.show(getElement(), "l");
}
Also used : ColorMenu(com.extjs.gxt.ui.client.widget.menu.ColorMenu)

Example 2 with ColorMenu

use of com.extjs.gxt.ui.client.widget.menu.ColorMenu in project activityinfo by bedatadriven.

the class ColorField method onTriggerClick.

@Override
protected void onTriggerClick(ComponentEvent ce) {
    super.onTriggerClick(ce);
    menu = new ColorMenu() {

        @Override
        protected void onClick(ComponentEvent ce) {
        // TODO Auto-generated method stub
        }
    };
    menu.getColorPalette().addListener(Events.BeforeSelect, new Listener<ColorPaletteEvent>() {

        @Override
        public void handleEvent(ColorPaletteEvent ce) {
            setValue(ce.getColor());
            menu.hide();
        }
    });
    menu.show(getElement(), "l");
}
Also used : ColorMenu(com.extjs.gxt.ui.client.widget.menu.ColorMenu) ColorPaletteEvent(com.extjs.gxt.ui.client.event.ColorPaletteEvent) ComponentEvent(com.extjs.gxt.ui.client.event.ComponentEvent)

Aggregations

ColorMenu (com.extjs.gxt.ui.client.widget.menu.ColorMenu)2 ColorPaletteEvent (com.extjs.gxt.ui.client.event.ColorPaletteEvent)1 ComponentEvent (com.extjs.gxt.ui.client.event.ComponentEvent)1