use of org.controlsfx.control.PopOver in project bitsquare by bitsquare.
the class InputTextField method createErrorPopOver.
private static void createErrorPopOver(String errorMessage) {
Label errorLabel = new Label(errorMessage);
errorLabel.setId("validation-error");
errorLabel.setPadding(new Insets(0, 10, 0, 10));
errorLabel.setOnMouseClicked(e -> hideErrorMessageDisplay());
errorMessageDisplay = new PopOver(errorLabel);
errorMessageDisplay.setDetachable(true);
errorMessageDisplay.setDetachedTitle("Close");
errorMessageDisplay.setArrowIndent(5);
}
use of org.controlsfx.control.PopOver in project bitsquare by bitsquare.
the class PasswordTextField method createErrorPopOver.
private static void createErrorPopOver(String errorMessage) {
Label errorLabel = new Label(errorMessage);
errorLabel.setId("validation-error");
errorLabel.setPadding(new Insets(0, 10, 0, 10));
errorLabel.setOnMouseClicked(e -> hideErrorMessageDisplay());
errorMessageDisplay = new PopOver(errorLabel);
errorMessageDisplay.setDetachable(true);
errorMessageDisplay.setDetachedTitle("Close");
errorMessageDisplay.setArrowIndent(5);
}
use of org.controlsfx.control.PopOver in project bitsquare by bitsquare.
the class TakeOfferView method createInfoPopover.
// As we don't use binding here we need to recreate it on mouse over to reflect the current state
private void createInfoPopover() {
GridPane infoGridPane = new GridPane();
infoGridPane.setHgap(5);
infoGridPane.setVgap(5);
infoGridPane.setPadding(new Insets(10, 10, 10, 10));
int i = 0;
if (model.isSeller())
addPayInfoEntry(infoGridPane, i++, BSResources.get("takeOffer.fundsBox.tradeAmount"), model.getAmount());
addPayInfoEntry(infoGridPane, i++, BSResources.get("takeOffer.fundsBox.securityDeposit"), model.getSecurityDeposit());
addPayInfoEntry(infoGridPane, i++, BSResources.get("takeOffer.fundsBox.offerFee"), model.getTakerFee());
addPayInfoEntry(infoGridPane, i++, BSResources.get("takeOffer.fundsBox.networkFee"), model.getNetworkFee());
Separator separator = new Separator();
separator.setOrientation(Orientation.HORIZONTAL);
separator.setStyle("-fx-background: #666;");
GridPane.setConstraints(separator, 1, i++);
infoGridPane.getChildren().add(separator);
addPayInfoEntry(infoGridPane, i, BSResources.get("takeOffer.fundsBox.total"), model.totalToPay.get());
totalToPayInfoPopover = new PopOver(infoGridPane);
if (totalToPayInfoIconLabel.getScene() != null) {
totalToPayInfoPopover.setDetachable(false);
totalToPayInfoPopover.setArrowIndent(5);
totalToPayInfoPopover.show(totalToPayInfoIconLabel.getScene().getWindow(), getPopupPosition().getX(), getPopupPosition().getY());
}
}
use of org.controlsfx.control.PopOver in project bitsquare by bitsquare.
the class CreateOfferView method createInfoPopover.
// As we don't use binding here we need to recreate it on mouse over to reflect the current state
private void createInfoPopover() {
GridPane infoGridPane = new GridPane();
infoGridPane.setHgap(5);
infoGridPane.setVgap(5);
infoGridPane.setPadding(new Insets(10, 10, 10, 10));
int i = 0;
if (model.isSellOffer())
addPayInfoEntry(infoGridPane, i++, BSResources.get("createOffer.fundsBox.tradeAmount"), model.tradeAmount.get());
addPayInfoEntry(infoGridPane, i++, BSResources.get("createOffer.fundsBox.securityDeposit"), model.getSecurityDeposit());
addPayInfoEntry(infoGridPane, i++, BSResources.get("createOffer.fundsBox.offerFee"), model.getOfferFee());
addPayInfoEntry(infoGridPane, i++, BSResources.get("createOffer.fundsBox.networkFee"), model.getNetworkFee());
Separator separator = new Separator();
separator.setOrientation(Orientation.HORIZONTAL);
separator.setStyle("-fx-background: #666;");
GridPane.setConstraints(separator, 1, i++);
infoGridPane.getChildren().add(separator);
addPayInfoEntry(infoGridPane, i, BSResources.get("createOffer.fundsBox.total"), model.totalToPay.get());
totalToPayInfoPopover = new PopOver(infoGridPane);
if (totalToPayInfoIconLabel.getScene() != null) {
totalToPayInfoPopover.setDetachable(false);
totalToPayInfoPopover.setArrowIndent(5);
totalToPayInfoPopover.show(totalToPayInfoIconLabel.getScene().getWindow(), getPopupPosition().getX(), getPopupPosition().getY());
}
}
use of org.controlsfx.control.PopOver in project Gargoyle by callakrsos.
the class FxUtil method showPopOver.
public static void showPopOver(Node root, Node showingNode, Function<PopOver, PopOver> callback) {
if (root == showingNode)
return;
PopOver popOver = null;
if (callback != null) {
popOver = callback.apply(new PopOver(showingNode));
} else
popOver = new PopOver(showingNode);
popOver.show(root);
}