Java 类com.vaadin.ui.components.colorpicker.ColorChangeListener 实例源码

项目:VaadinUtils    文件:ColorPickerField.java   
public ColorPickerField(iColorFactory colorFactory)
{
    this.colorFactory = colorFactory;
    this.colorPicker = new ColorPicker();
    this.colorPicker.addColorChangeListener(new ColorChangeListener()
    {
        private static final long serialVersionUID = 1L;

        @Override
        public void colorChanged(ColorChangeEvent event)
        {
            setValue(ColorPickerField.this.colorFactory.createColor(event.getColor()));

        }
    });

}
项目:hybridbpm    文件:ChartColorLayout.java   
private void fillTable() {
        colorTable.removeAllItems();

        int rowIndex = 0;
        final Map<String, String> valueColourMap = getPreferenceValue(DiagrammePreference.VALUE_COLOUR_MAP, preferences);
        Iterator<Map.Entry<String, String>> it = valueColourMap.entrySet().iterator();
        while (it.hasNext()) {
            final Map.Entry<String, String> entry = it.next();

            int[] d = ColourUtil.decode(entry.getValue());

            final Color c = new SolidColor(d[0], d[1], d[2]);

            ColorPicker picker = new ColorPicker();
            picker.setColor(new com.vaadin.shared.ui.colorpicker.Color(ColourUtil.decode(c.toString())[0],
                    ColourUtil.decode(c.toString())[1], ColourUtil.decode(c.toString())[2]));
            picker.setPosition(Page.getCurrent().getBrowserWindowWidth() / 2 - 246 / 2,
                    Page.getCurrent().getBrowserWindowHeight() / 2 - 507 / 2);

            picker.addColorChangeListener(new ColorChangeListener() {

                @Override
                public void colorChanged(ColorChangeEvent event) {
                    valueColourMap.put(entry.getKey(), event.getColor().getCSS());

                    preferences.getItemDataSource().getItemProperty(DiagrammePreference.VALUE_COLOUR_MAP).setValue(valueColourMap);

//                    chartLayout.getConfigurationLayout().getLookAndFeelLayout().renderChart();
                }
            });
            colorTable.addItem(new Object[]{entry.getKey(), picker}, rowIndex);
            rowIndex++;
        }
    }
项目:ilves    文件:ColorPickerField.java   
public ColorPickerField() {
    colorPicker = new ColorPicker();
    colorPicker.addColorChangeListener(new ColorChangeListener() {
        @Override
        public void colorChanged(ColorChangeEvent event) {
            setColorToField(event.getColor().getRGB());
        }
    });
    colorPicker.setHistoryVisibility(false);
}
项目:hawkbit    文件:AbstractCreateUpdateTagLayout.java   
@Override
public void addColorChangeListener(final ColorChangeListener listener) {
}
项目:hawkbit    文件:AbstractCreateUpdateTagLayout.java   
@Override
public void removeColorChangeListener(final ColorChangeListener listener) {
}
项目:hawkbit    文件:CreateUpdateSoftwareTypeLayout.java   
@Override
public void addColorChangeListener(final ColorChangeListener listener) {
    LOG.debug("inside addColorChangeListener");
}
项目:hawkbit    文件:CreateUpdateSoftwareTypeLayout.java   
@Override
public void removeColorChangeListener(final ColorChangeListener listener) {
    LOG.debug("inside removeColorChangeListener");

}