Package javafx.scene.effect

Examples of javafx.scene.effect.Lighting


  protected void applyBarFillColorHex(final Node node, final String colorHex) {
    node.setStyle("-fx-bar-fill: " + colorHex + ";");
    final DropShadow ds = new DropShadow();
    ds.setOffsetX(3.0);
    ds.setOffsetY(3.0);
    final Lighting lighting = new Lighting();
    lighting.setSurfaceScale(1d);
    lighting.setLight(new Light.Distant());
    ds.setInput(lighting);
    node.setEffect(ds);
  }
View Full Code Here


   */
  protected final Lighting createLighting() {
    final Light.Distant handBaseLight = new Light.Distant();
    Bindings.bindBidirectional(handBaseLight.azimuthProperty(), lightingAzimuthProperty);
    Bindings.bindBidirectional(handBaseLight.elevationProperty(), lightingElevationProperty);
    final Lighting handBaseLighting = new Lighting();
    handBaseLighting.setLight(handBaseLight);
    handBaseLighting.setSpecularConstant(0.7d);
    handBaseLighting.setSpecularExponent(20d);
    handBaseLighting.setDiffuseConstant(1.0d);
    handBaseLighting.setSurfaceScale(7d * sizeScale);
    return handBaseLighting;
  }
View Full Code Here

          indicatorHeight, pointDistance, centerX, centerY, fillProperty);
      indicatorShape.getTransforms().addAll(indicatorRotate);
      indicatorBase.getChildren().add(indicatorShape);
    }
   
    final Lighting lighting = createLighting();
    if (indicatorType == IndicatorType.KNOB) {
      lighting.setSpecularConstant(0.4d);
      lighting.setSpecularExponent(40d);
      lighting.setDiffuseConstant(1.7d);
    }
    indicatorBase.setEffect(lighting);
   
    indicator.getChildren().add(indicatorBase);
   
View Full Code Here

   * @param indicatorShape the indicator/hand shape
   * @param dialNode the center portion of the knob
   * @return the completed knob
   */
    protected Group createKnob(final Shape indicatorShape, final Node dialNode) {
    final Lighting lighting = createLighting();
    lighting.setSurfaceScale(5d * sizeScale);
    final Shape indicatorBolt = createIndicatorBolt();
    indicatorBolt.setEffect(lighting);
   
      final Group handShapeGroup = new Group();
      handShapeGroup.setCache(true);
View Full Code Here

   */
  private void createPreloaderScene() {
    bar = new ProgressBar();
    bar.setMinWidth(WIDTH / 1.3d);
    final Light light = new Light.Distant();
    final Lighting lighting = new Lighting();
    lighting.setSurfaceScale(3d);
    lighting.setLight(light);
    bar.setEffect(lighting);
    new Dialog(null, stage, KEY.APP_TITLE, RS.rbLabel(KEY.LOADING), null,
        WIDTH, HEIGHT, bar);
  }
View Full Code Here

   *            the {@linkplain Service}
   * @return the {@linkplain ProgressIndicator} alert {@linkplain Service}
   */
  public static <T> Service<T> alertProgress(final Stage parent, final Task<T> progressTask) {
    final Light light = new Light.Distant();
    final Lighting lighting = new Lighting();
    lighting.setSurfaceScale(1d);
    lighting.setLight(light);
    //final ProgressIndicator pi = ProgressIndicatorBuilder.create().maxWidth(200d).effect(lighting).build();
    final ProgressIndicator pi = ProgressBarBuilder.create().maxWidth(parent.getWidth() / 2d).maxHeight(25d).effect(lighting).build();
    final Stage alert = alert(parent, parent.getWidth(), parent.getHeight(), Modality.APPLICATION_MODAL, pi,
        LabelBuilder.create().text(RS.rbLabel(KEY.SENDING)).build());
    final Service<T> service = new Service<T>() {
View Full Code Here

TOP

Related Classes of javafx.scene.effect.Lighting

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.