Examples of Background


Examples of javafx.scene.layout.Background

    }

    @Override public void start(Stage stage) {
        HBox lcd = new HBox();
        lcd.setPadding(new Insets(15, 15, 15, 15));
        lcd.setBackground(new Background(new BackgroundFill(Color.BLACK, CornerRadii.EMPTY, Insets.EMPTY)));
        lcd.setSpacing(10);
        lcd.setAlignment(Pos.CENTER);
        lcd.setFillHeight(false);
        HBox.setMargin(seg3, new Insets(0, 20, 0, 0));
        lcd.getChildren().addAll(seg0, seg1, seg2, seg3, seg4, seg5);
View Full Code Here

Examples of javafx.scene.layout.Background

        };
    }

    @Override public void start(Stage stage) {
        StackPane pane = new StackPane();
        pane.setBackground(new Background(new BackgroundFill(Color.DARKGRAY, CornerRadii.EMPTY, Insets.EMPTY)));
        pane.setPadding(new Insets(10, 10, 10, 10));
        pane.getChildren().add(control);

        Scene scene = new Scene(pane);
View Full Code Here

Examples of javafx.scene.layout.Background

    }

    @Override public void start(Stage stage) {
        HBox lcd = new HBox();
        lcd.setPadding(new Insets(15, 15, 15, 15));
        lcd.setBackground(new Background(new BackgroundFill(Color.BLACK, CornerRadii.EMPTY, Insets.EMPTY)));
        lcd.setSpacing(10);
        lcd.setAlignment(Pos.CENTER);
        lcd.setFillHeight(false);
        HBox.setMargin(seg3, new Insets(0, 20, 0, 0));
        lcd.getChildren().addAll(seg0, seg1, seg2, seg3);
View Full Code Here

Examples of javax.media.j3d.Background

    Geometry halfSphereGeometry = createHalfSphereGeometry();  
    final Shape3D halfSphere = new Shape3D(halfSphereGeometry, backgroundAppearance);
    BranchGroup backgroundBranch = new BranchGroup();
    backgroundBranch.addChild(halfSphere);
   
    final Background background = new Background(backgroundBranch);
    updateBackgroundColorAndTexture(backgroundAppearance, this.home, waitForLoading);
    background.setImageScaleMode(Background.SCALE_FIT_ALL);
    background.setApplicationBounds(new BoundingBox(
        new Point3d(-1E6, -1E6, -1E6),
        new Point3d(1E6, 1E6, 1E6)));   
   
    if (listenToHomeUpdates) {
      // Add a listener on sky color and texture properties change
View Full Code Here

Examples of javax.media.j3d.Background

      model.setCapability(BranchGroup.ALLOW_DETACH);
      model.addChild(modelTransformGroup);
      sceneRoot.addChild(model);
     
      // Render scene with a white background
      Background background = (Background)sceneRoot.getChild(0);       
      background.setColor(1, 1, 1);
      canvas3D.renderOffScreenBuffer();
      canvas3D.waitForOffScreenRendering();         
      BufferedImage imageWithWhiteBackgound = canvas3D.getOffScreenBuffer().getImage();
      int [] imageWithWhiteBackgoundPixels = getImagePixels(imageWithWhiteBackgound);
     
      // Render scene with a black background
      background.setColor(0, 0, 0);
      canvas3D.renderOffScreenBuffer();
      canvas3D.waitForOffScreenRendering();         
      BufferedImage imageWithBlackBackgound = canvas3D.getOffScreenBuffer().getImage();
      int [] imageWithBlackBackgoundPixels = getImagePixels(imageWithBlackBackgound);
     
View Full Code Here

Examples of javax.media.j3d.Background

 
  /**
   * Returns the background node. 
   */
  private Node getBackgroundNode() {
    Background background = new Background(new Color3f(0.9f, 0.9f, 0.9f));
    background.setCapability(Background.ALLOW_COLOR_WRITE);
    background.setApplicationBounds(new BoundingSphere(new Point3d(0, 0, 0), 100));
    return background;
  }
View Full Code Here

Examples of javax.media.j3d.Background

        sapp.setPolygonAttributes(C.noCull);
        sapp.setTexture(tileManager.getTexture("data/images/misc/clouds.jpg"));
        TransformGroup tg = new TransformGroup(new Transform3D(C.mkquat(1, 0, 0, Math.PI/2), new Vector3d(), 1.0));
        tg.addChild(new Sphere(1f, Primitive.GENERATE_TEXTURE_COORDS, 100, sapp));
        back.addChild(tg);
        Background bg = new Background(back);
        bg.setApplicationBounds(bounds);
        addChild(bg);
    }
View Full Code Here

Examples of javax.media.j3d.Background

    //Add the transformation group with the blue part to the scene.
    theScene.addChild(tgObject);


    //The following four lines generate a white background.
    Background bg = new Background(new Color3f(1.0f,1.0f,1.0f));
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);
    bg.setApplicationBounds(bounds);
    theScene.addChild(bg);



    theScene.compile();
View Full Code Here

Examples of javax.media.j3d.Background

        BranchGroup theScene = new BranchGroup();

        theScene.addChild(tgObject);

        // The following four lines generate a white background.
        Background bg = new Background(new Color3f(1.0f, 1.0f, 1.0f));
        BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),
                Double.MAX_VALUE);
        bg.setApplicationBounds(bounds);
        theScene.addChild(bg);

        theScene.compile();

        // Add the scene to the universe.
View Full Code Here

Examples of javax.media.j3d.Background

    theScene.addChild(tg1);
    theScene.addChild(tg2);


    //Generate a white background.
    Background bg = new Background(new Color3f(1.0f,1.0f,1.0f));
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);
    bg.setApplicationBounds(bounds);
    theScene.addChild(bg);


    theScene.compile();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.