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();
});
}
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();
}
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();
}
}
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);
}
}
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();
}
Aggregations