use of com.extjs.gxt.ui.client.event.ColorPaletteEvent in project activityinfo by bedatadriven.
the class PolygonLayerOptions method createColorPicker.
private void createColorPicker() {
colorPicker.setValue("000000");
// Set the selected color to the maplayer
colorPicker.addListener(Events.Select, new Listener<ColorPaletteEvent>() {
@Override
public void handleEvent(ColorPaletteEvent be) {
if (!Objects.equal(layer.getMaxColor(), colorPicker.getValue())) {
layer.setMaxColor(colorPicker.getValue());
ValueChangeEvent.fire(PolygonLayerOptions.this, layer);
}
}
});
LabelField labelColor = new LabelField(I18N.CONSTANTS.color());
add(labelColor);
add(colorPicker);
}
use of com.extjs.gxt.ui.client.event.ColorPaletteEvent in project activityinfo by bedatadriven.
the class BubbleLayerOptions method createColorPicker.
private void createColorPicker() {
colorPicker.setValue("000000");
// Set the selected color to the maplayer
colorPicker.addListener(Events.Select, new Listener<ColorPaletteEvent>() {
@Override
public void handleEvent(ColorPaletteEvent be) {
bubbleMapLayer.setBubbleColor(colorPicker.getValue());
ValueChangeEvent.fire(BubbleLayerOptions.this, bubbleMapLayer);
}
});
LabelField labelColor = new LabelField(I18N.CONSTANTS.color());
add(labelColor);
add(colorPicker);
}
use of com.extjs.gxt.ui.client.event.ColorPaletteEvent in project activityinfo by bedatadriven.
the class BubbleLayerOptions method createColorPicker.
private void createColorPicker() {
colorPicker.setValue("000000");
// Set the selected color to the maplayer
colorPicker.addListener(Events.Select, new Listener<ColorPaletteEvent>() {
@Override
public void handleEvent(ColorPaletteEvent be) {
bubbleMapLayer.setBubbleColor(colorPicker.getValue());
ValueChangeEvent.fire(BubbleLayerOptions.this, bubbleMapLayer);
}
});
LabelField labelColor = new LabelField(I18N.CONSTANTS.color());
add(labelColor);
add(colorPicker);
}
use of com.extjs.gxt.ui.client.event.ColorPaletteEvent in project activityinfo by bedatadriven.
the class PolygonLayerOptions method createColorPicker.
private void createColorPicker() {
colorPicker.setValue("000000");
// Set the selected color to the maplayer
colorPicker.addListener(Events.Select, new Listener<ColorPaletteEvent>() {
@Override
public void handleEvent(ColorPaletteEvent be) {
if (!Objects.equal(layer.getMaxColor(), colorPicker.getValue())) {
layer.setMaxColor(colorPicker.getValue());
ValueChangeEvent.fire(PolygonLayerOptions.this, layer);
}
}
});
LabelField labelColor = new LabelField(I18N.CONSTANTS.color());
add(labelColor);
add(colorPicker);
}
use of com.extjs.gxt.ui.client.event.ColorPaletteEvent 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");
}
Aggregations