Package javafx.scene.image

Examples of javafx.scene.image.Image


      polygon.setStroke(Color.ORANGE);
      polygon.setStrokeWidth(2.0);
      polygon.setFill(Color.TRANSPARENT);
      return polygon;
    } else {
      Image image;
      if ("tree".equals(object.getName())) {
        image = Assets.getTile(Assets.IMAGE_TILES_SPRING_TREE_01);
      } else if ("flag".equals(object.getName())) {
        image = Assets.getTile(Assets.IMAGE_TILES_SPRING_FLAG);
      } else {
        if (rand.nextBoolean()) {
          image = Assets.getTile(Assets.IMAGE_TILES_SPRING_GRASS_01);
        } else {
          image = Assets.getTile(Assets.IMAGE_TILES_SPRING_GRASS_02);
        }
      }

      ImageView imageView = new ImageView();
      imageView.setImage(image);
      imageView.setTranslateY(-image.getHeight() + World.TILE_HEIGHT);
      return imageView;
    }
  }
View Full Code Here


                .from(uri())
                .withSize(320, 240)
                .to(ImageType.PNG)
                .stream()
                .toByteArray();
        Image qrImage = new Image(new ByteArrayInputStream(imageBytes));
        ImageView view = new ImageView(qrImage);
        view.setEffect(new DropShadow());
        // Embed the image in a pane to ensure the drop-shadow interacts with the fade nicely, otherwise it looks weird.
        // Then fix the width/height to stop it expanding to fill the parent, which would result in the image being
        // non-centered on the screen. Finally fade/blur it in.
        Pane pane = new Pane(view);
        pane.setMaxSize(qrImage.getWidth(), qrImage.getHeight());
        final Main.OverlayUI<ClickableBitcoinAddress> overlay = Main.instance.overlayUI(pane, this);
        view.setOnMouseClicked(new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent event) {
                overlay.done();
View Full Code Here

    private void setServerLogo() {
        if (domainDataModel.getServerType() != null) {
            switch (domainDataModel.getServerType()) {
                case GLASSFISH:
                    serverLogoImageView.setImage(new Image(uiConfiguration.getGlassfishLogoName()));
                    break;
                case WILDFLY_STANDALONE:
                    serverLogoImageView.setImage(new Image(uiConfiguration.getWildflyLogoName()));
                    break;
                case JBOSS_STANDALONE:
                    serverLogoImageView.setImage(new Image(uiConfiguration.getJBossLogoName()));
                    break;
                default:
                    serverLogoImageView.setImage(null);
            }
        }
View Full Code Here

        uiConfiguration = viewContext.getUiConfiguration();
        modalDialog = viewContext.getModalDialog();
        AwesomeDude.setIcon(aboutButton, AwesomeIcon.INFO, uiConfiguration.getIconEmSize(), ContentDisplay.TOP);
        AwesomeDude.setIcon(exitButton, AwesomeIcon.SIGN_OUT, uiConfiguration.getIconEmSize(), ContentDisplay.TOP);
        AwesomeDude.setIcon(configurationButton, AwesomeIcon.GEAR, uiConfiguration.getIconEmSize(), ContentDisplay.TOP);
        logoImageView.setImage(new Image(uiConfiguration.getAppLogoName()));
    }
View Full Code Here

    void initialize() {       
        modalDialog = viewContext.getModalDialog();
        appNameLabel.setText(ApplicationInfo.APPLICATION_NAME);
        appVersionLabel.setText(ApplicationInfo.APPLICATION_VERSION);
        copyrightLabel.setText(ApplicationInfo.APPLICATION_COPYRIGHT);
        logoImageView.setImage(new Image(viewContext.getUiConfiguration().getAppLogoName()));

        loadReleaseNotesToTestArea();
        loadLicenseFileToTestArea();
        loadThirdPartyLicensesFileToTestArea();
View Full Code Here

    //---------------------------------------------------------------------------------------------
    // METHODS.
    //---------------------------------------------------------------------------------------------

    public void captureScreenToFile(Screen screen, File captureFile) {
        Image captureImage = captureScreenToImage(screen);
        writeCaptureImageToFile(captureImage, captureFile);
    }
View Full Code Here

    }

    private void showOrganizationLogo(byte[] imageData) {
        try {
            BufferedImage bufferedImage = ImageIO.read(new ByteArrayInputStream(imageData));
            Image image = SwingFXUtils.toFXImage(bufferedImage, null);
            organizationLogo.setImage(image);
        } catch (IOException ex) {
            LOGGER.error("Error while reading logo", ex);
        }
    }
View Full Code Here

    protected Parent getRootNode() {
        ScrollPane sp = new ScrollPane();
        VBox vb = new VBox();
        sp.setContent(vb);
        sp.setVmax(IMAGE_HEIGHT * 2);
        ImageView img1 = new ImageView(new Image(getClass()
                .getResourceAsStream(IMAGE_RESOURCE)));
        img1.setId(ID1);
        ImageView img2 = new ImageView(new Image(getClass()
                .getResourceAsStream(IMAGE_RESOURCE)));
        img2.setId(ID2);
        vb.getChildren().add(img1);
        vb.getChildren().add(img2);
        sp.setPrefWidth(IMAGE_WIDTH);
View Full Code Here

     * @return the JavaFX image
     * @throws MissingResourceException if no resource for the specified key can be found
     */
    public static Image getFxImage(String key) throws MissingResourceException {
        final String imagePath = ResourceBundle.getBundle(IMAGE_BUNDLE, Languages.getCurrentLocale()).getString(key);
        return new Image(BundleUtils.class.getResource(imagePath).toExternalForm());
    }
View Full Code Here

                                tabPane = new TabPane();
                                Scene scene = new Scene(tabPane, 800, 600);
                                scene.getStylesheets().add(getClass().getResource("styles.css").toExternalForm());
                                stage = new Stage();
                                stage.setTitle("XMPP Viewer");
                                stage.getIcons().addAll(new Image(getClass().getResource("xmpp.png").toExternalForm()));
                                stage.setOnHidden(new EventHandler<WindowEvent>() {
                                    @Override
                                    public void handle(WindowEvent event) {
                                        for (Tab tab : tabPane.getTabs()) {
                                            xmppSession.removeSessionStatusListener(connectionListenerMap.remove(tab));
View Full Code Here

TOP

Related Classes of javafx.scene.image.Image

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.