Package javafx.scene.image

Examples of javafx.scene.image.ImageView


                Utility.exc(ex);
                ex.printStackTrace();
            }

            try {
                __imm = new ImageView(Utility.getImage(icon));
                __button.setGraphic(__imm);
            } catch (Exception exc) {
                Utility.exc(exc);
                exc.printStackTrace();
            }

            String txt_lite = RBLoader.ll(txt);

            if (!tooltip) {

                setStyle("-fx-background-color: " + color + "; "
                        + "-fx-border-width: " + border_width + "; "
                        + "-fx-border-color: white;");

                __label = new Text(" " + txt_lite);
                __label.setId("toolbar_label");
                __label.setStyle("-fx-background-color: " + color + ";"
                        + "-fx-font-size: 10px;"
                        + "-fx-font-weight: bold;");
                __label.setFill(Color.WHITE);
                __label.setTextAlignment(TextAlignment.LEFT);
                __label.setFontSmoothingType(FontSmoothingType.LCD);

                BorderPane bp = new BorderPane();
                bp.setCenter(Utility.sep());
                bp.setBottom(__label);
                setBottom(bp);
            } else {

                setStyle("-fx-background-color: " + color + "; "
                        + "-fx-border-width: 1; "
                        + "-fx-border-color: " + DEF_COLOR_BTN + ";");

                final Tooltip tt = new Tooltip();
                tt.setText(txt_lite);
                tt.setGraphic(new ImageView(Utility.getImage(icon)));
                __button.setTooltip(tt);
            }

            setCenter(__button);
View Full Code Here


        Parent parent = node.getParent();
        if (parent == null || !(parent instanceof Pane)) {
            return;
        }

        ImageView imm = new ImageView(getImage("arrow_right_24.png"));
        ((Pane) parent).getChildren().add(imm);

        switch (pos) {
            case LEFT: {
                imm.setLayoutX(node.getLayoutX() - 30);
                imm.setLayoutY(node.getLayoutY());
                horizontalTransition(imm, node.getLayoutX() - 500, 0.0, 1600).play();
                fadeIn(imm, 3500).play();
                break;
            }
            case RIGHT: {
                imm.setLayoutX(node.getLayoutX() + node.getLayoutBounds().getWidth() + 5);
                imm.setLayoutY(node.getLayoutY() + 2);
                horizontalTransition(imm, node.getLayoutX() + 500, 0.0, 1600).play();
                fadeIn(imm, 4500).play();
                break;
            }
        }
View Full Code Here

        Parent parent = node.getParent();
        if (parent == null || !(parent instanceof Pane)) {
            return;
        }

        ImageView imm = new ImageView(getImage("arrow_right_24.png"));
        ((Pane) parent).getChildren().add(imm);

        switch (pos) {
            case LEFT: {
                imm.setLayoutX(node.getLayoutX() - 30);
                imm.setLayoutY(node.getLayoutY());
                horizontalTransition(imm, node.getLayoutX() - 500, 0.0, 1600).play();
                fadeIn(imm, 3500).play();
                break;
            }
            case RIGHT: {
                imm.setLayoutX(node.getLayoutX() + node.getLayoutBounds().getWidth() + 5);
                imm.setLayoutY(node.getLayoutY() + 2);
                horizontalTransition(imm, node.getLayoutX() + 500, 0.0, 1600).play();
                fadeIn(imm, 4500).play();
                break;
            }
        }
View Full Code Here

   */
  private static class ImageViewCell<S> extends TableCell<S, Image> {
    @Override
    protected void updateItem(Image item, boolean empty) {
      this.setAlignment(Pos.BASELINE_CENTER);
      this.setGraphic(new ImageView(item));
    }
View Full Code Here

      return this.icon;
    }
   
    public ImageView getImageView() {
      if (this.imageView == null) {
        this.imageView = new ImageView(this.getIcon());
      }
      return this.imageView;
    }
View Full Code Here

    int startY = 30;
    for (int v = 1; v <= model.getInitialBlocksVertical(); v++) {
      for (int h = 1; h <= model.getInitialBlocksHorizontal(); h++) {
        int x = startX + (h * 40);
        int y = startY + (v * 40);
        ImageView imageView = ImageViewBuilder.create()
            .image(BallGame.ICON).layoutX(x).layoutY(y).build();
        model.getBoxes().add(imageView);
      }
    }
    area.getChildren().addAll(model.getBoxes());
View Full Code Here

    int startY = 30;
    for (int v = 1; v <= INITIAL_BLOCKS_VERTICAL; v++) {
      for (int h = 1; h <= INITIAL_BLOCKS_HORIZONTAL; h++) {
        int x = startX + (h * 40);
        int y = startY + (v * 40);
        ImageView imageView = ImageViewBuilder.create().image(ICON)
            .layoutX(x).layoutY(y).build();
        boxes.add(imageView);
      }
    }
    area.getChildren().addAll(boxes);
View Full Code Here

    carousel.setMouseTransparent(false);
    carousel.setPickOnBounds(true);
    carousel.setFocusTraversable(true);

    for(Image image : images) {
      carousel.itemsProperty().get().add(new ImageHandle(new ImageView(image)));
    }

    carousel.cellFactoryProperty().set(new Callback<Carousel<ImageHandle>, CarouselCell<ImageHandle>>() {
      @Override
      public CarouselCell<ImageHandle> call(final Carousel<ImageHandle> carousel) {
        CarouselCell<ImageHandle> carouselCell = new CarouselCell<ImageHandle>() {
          @Override
          protected void updateItem(ImageHandle item, boolean empty) {
            super.updateItem(item, empty);

            if(!empty) {
              ImageView image = item.getImage();
              image.setPreserveRatio(true);
              image.fitWidthProperty().bind(carousel.heightProperty().multiply(0.6));
              image.fitHeightProperty().bind(carousel.heightProperty().multiply(0.6));
              setGraphic(image);
            }
            else {
              setGraphic(null);
            }
View Full Code Here

        welcome.setFont(Font.font("Arial", 24));
        Text info = new Text("Luj Szperacz control application");
        info.setFont(Font.font("Arial", 11));
        textVBox.getChildren().addAll(welcome, info);

        ImageView imageTop = new ImageView(new Image(getClass().getResourceAsStream("/images/koprobo.png")));

        hbox.getChildren().addAll(imageTop, textVBox);

        return hbox;
       
View Full Code Here

          }
        }
      }
    });

    final ImageView mainBackground = new ImageView();
    mainBackground.setImage(Assets.getBackground(Assets.IMAGE_SCREENS_GAME_MAIN_BACKGROUND));

    final ImageView menuBackground = new ImageView();
    menuBackground.setImage(Assets.getBackground(Assets.IMAGE_SCREENS_MENU_BACKGROUND));

    selectedTileInfo = new TileWithDescriptionNode();
    selectedTileInfo.setLayoutX(61.0);
    selectedTileInfo.setLayoutY(36.0);
View Full Code Here

TOP

Related Classes of javafx.scene.image.ImageView

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.