label.setShowShadow(true);
label.setShadowSoftness(10);
label.setShadowOffset(5);
label.setKeepInParentRect(true);
final Slider softness = new Slider("Softness");
softness.setMinValue(1);
softness.setMaxValue(10);
softness.setNumValues(11);
softness.setShowRange(false);
softness.setLabelWidth(20);
softness.setValue(10);
softness.addDrawHandler(new DrawHandler() {
public void onDraw(DrawEvent event) {
softness.addValueChangedHandler(new ValueChangedHandler() {
public void onValueChanged(ValueChangedEvent event) {
label.setShadowSoftness(event.getValue());
label.updateShadow();
}
});
}
});
final Slider offset = new Slider("Offset");
offset.setMinValue(0);
offset.setMaxValue(20);
offset.setNumValues(21);
offset.setShowRange(false);
offset.setLabelWidth(20);
offset.setLeft(60);
offset.setValue(5);
offset.addDrawHandler(new DrawHandler() {
public void onDraw(DrawEvent event) {
offset.addValueChangedHandler(new ValueChangedHandler() {
public void onValueChanged(ValueChangedEvent event) {
label.setShadowOffset(event.getValue());
label.updateShadow();
}
});