Java 类javafx.scene.effect.Shadow 实例源码

项目:openjfx-8u-dev-tests    文件:CanvasEffects2App.java   
List<NamedEffect> getNamedEffectList() {
    List<NamedEffect> nes = new ArrayList<NamedEffect>();
    nes.add(new NamedEffect("colored", new Shadow() {{ setColor(Color.GREEN);}}));
    nes.add(new NamedEffect("height: 40", new Shadow() {{ setHeight(40);}}));
    nes.add(new NamedEffect("width: 40", new Shadow() {{ setWidth(40);}}));
    nes.add(new NamedEffect("radius: 40", new Shadow() {{ setRadius(40);}}));
    for (final BlurType bt : BlurType.values()) {
        nes.add(new NamedEffect("bt:" + bt.name(), new Shadow() {{ setBlurType(bt);}}));
    }

    return nes;
}
项目:jointry    文件:SpriteDialog.java   
private void mSpriteSelect(Sprite sprite, DInfo dinfo) {
    sprite.setEffect(new Shadow(4.0f, Color.valueOf(dinfo.get(K_COLOR))));
}