Search in sources :

Example 26 with ImageView

use of javafx.scene.image.ImageView in project bitsquare by bitsquare.

the class CreateOfferView method addAmountPriceGroup.

private void addAmountPriceGroup() {
    TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, ++gridRow, 2, "Set amount and price", Layout.GROUP_DISTANCE);
    GridPane.setColumnSpan(titledGroupBg, 3);
    imageView = new ImageView();
    imageView.setPickOnBounds(true);
    directionLabel = new Label();
    directionLabel.setAlignment(Pos.CENTER);
    directionLabel.setPadding(new Insets(-5, 0, 0, 0));
    directionLabel.setId("direction-icon-label");
    VBox imageVBox = new VBox();
    imageVBox.setAlignment(Pos.CENTER);
    imageVBox.setSpacing(6);
    imageVBox.getChildren().addAll(imageView, directionLabel);
    GridPane.setRowIndex(imageVBox, gridRow);
    GridPane.setRowSpan(imageVBox, 2);
    GridPane.setMargin(imageVBox, new Insets(Layout.FIRST_ROW_AND_GROUP_DISTANCE, 10, 10, 10));
    gridPane.getChildren().add(imageVBox);
    addAmountPriceFields();
    addSecondRow();
    Tuple2<Button, Button> tuple = add2ButtonsAfterGroup(gridPane, ++gridRow, BSResources.get("createOffer.amountPriceBox.next"), BSResources.get("shared.cancel"));
    nextButton = tuple.first;
    editOfferElements.add(nextButton);
    nextButton.disableProperty().bind(model.isNextButtonDisabled);
    //UserThread.runAfter(() -> nextButton.requestFocus(), 100, TimeUnit.MILLISECONDS);
    cancelButton1 = tuple.second;
    editOfferElements.add(cancelButton1);
    cancelButton1.setDefaultButton(false);
    cancelButton1.setOnAction(e -> {
        close();
        model.dataModel.swapTradeToSavings();
    });
    cancelButton1.setId("cancel-button");
    GridPane.setMargin(nextButton, new Insets(-35, 0, 0, 0));
    nextButton.setOnAction(e -> {
        if (model.isPriceInRange())
            onShowPayFundsScreen();
    });
}
Also used : ImageView(javafx.scene.image.ImageView)

Example 27 with ImageView

use of javafx.scene.image.ImageView in project bitsquare by bitsquare.

the class OfferBookView method setDirection.

public void setDirection(Offer.Direction direction) {
    model.initWithDirection(direction);
    ImageView iconView = new ImageView();
    createOfferButton.setGraphic(iconView);
    iconView.setId(direction == Offer.Direction.SELL ? "image-sell-white" : "image-buy-white");
    createOfferButton.setId(direction == Offer.Direction.SELL ? "sell-button-big" : "buy-button-big");
    setDirectionTitles();
}
Also used : ImageView(javafx.scene.image.ImageView)

Example 28 with ImageView

use of javafx.scene.image.ImageView in project Gargoyle by callakrsos.

the class DaoWizardImageCell method createImageField.

private void createImageField() {
    try {
        if (src != null && !src.isEmpty()) {
            String file = getClass().getResource(src).getFile();
            image = new Image(new FileInputStream(file), WIDTH, HEIGHT, true, true);
            imageView = new ImageView(image);
        }
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
}
Also used : FileNotFoundException(java.io.FileNotFoundException) ImageView(javafx.scene.image.ImageView) Image(javafx.scene.image.Image) FileInputStream(java.io.FileInputStream)

Example 29 with ImageView

use of javafx.scene.image.ImageView in project Gargoyle by callakrsos.

the class DaoWizardYnImageCell method ycreateImageField.

/********************************
	 * 작성일 : 2016. 8. 27. 작성자 : KYJ
	 *
	 * 이미지생성1
	 *
	 * @throws IOException
	 ********************************/
private void ycreateImageField() throws IOException {
    if (y != null) {
        yimage = new Image(y.openStream(), WIDTH, HEIGHT, true, true);
        yimageView = new ImageView(yimage);
    }
}
Also used : ImageView(javafx.scene.image.ImageView) Image(javafx.scene.image.Image)

Example 30 with ImageView

use of javafx.scene.image.ImageView in project Gargoyle by callakrsos.

the class CheckBoxFxControlsTreeItem method getImage.

/**
	 * resources패키지로부터 image를 가져오는 처리
	 * 
	 * @param name
	 * @return
	 */
ImageView getImage(String name) {
    try {
        String name2 = "images/nodeicons/" + name + ".png";
        URL resource = this.getClass().getClassLoader().getResource(name2);
        if (resource != null) {
            File file = new File(resource.toURI());
            if (file.exists())
                return new ImageView(new Image(resource.openStream()));
        }
    } catch (Exception e) {
    // not important...
    }
    return new ImageView();
}
Also used : ImageView(javafx.scene.image.ImageView) Image(javafx.scene.image.Image) File(java.io.File) URL(java.net.URL)

Aggregations

ImageView (javafx.scene.image.ImageView)201 Image (javafx.scene.image.Image)90 Button (javafx.scene.control.Button)45 Label (javafx.scene.control.Label)41 Insets (javafx.geometry.Insets)35 Tooltip (javafx.scene.control.Tooltip)32 VBox (javafx.scene.layout.VBox)29 Scene (javafx.scene.Scene)25 File (java.io.File)24 ChangeListener (javafx.beans.value.ChangeListener)24 AutoTooltipLabel (bisq.desktop.components.AutoTooltipLabel)20 Node (javafx.scene.Node)20 AnchorPane (javafx.scene.layout.AnchorPane)20 Callback (javafx.util.Callback)20 Pane (javafx.scene.layout.Pane)18 GridPane (javafx.scene.layout.GridPane)17 HBox (javafx.scene.layout.HBox)17 StackPane (javafx.scene.layout.StackPane)17 Inject (javax.inject.Inject)17 List (java.util.List)16