Search in sources :

Example 1 with PopOver

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);
}
Also used : Insets(javafx.geometry.Insets) Label(javafx.scene.control.Label) PopOver(org.controlsfx.control.PopOver)

Example 2 with PopOver

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);
}
Also used : Insets(javafx.geometry.Insets) Label(javafx.scene.control.Label) PopOver(org.controlsfx.control.PopOver)

Example 3 with PopOver

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());
    }
}
Also used : PopOver(org.controlsfx.control.PopOver)

Example 4 with PopOver

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());
    }
}
Also used : PopOver(org.controlsfx.control.PopOver)

Example 5 with PopOver

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);
}
Also used : PopOver(org.controlsfx.control.PopOver)

Aggregations

PopOver (org.controlsfx.control.PopOver)5 Insets (javafx.geometry.Insets)2 Label (javafx.scene.control.Label)2