use of javafx.scene.layout.HBox in project aic-praise by aic-sri-international.
the class SGSolverDemoController method configureSettingsContent.
private Node configureSettingsContent() {
VBox configureMenu = new VBox(2);
configureMenu.setPadding(new Insets(3, 3, 3, 3));
HBox displayPrecisionHBox = newButtonHBox();
displayPrecisionSpinner.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(1, 80, _displayPrecision.get()));
displayPrecisionSpinner.setPrefWidth(60);
_displayPrecision.bind(displayPrecisionSpinner.valueProperty());
displayPrecisionHBox.getChildren().addAll(new Label("Display Numeric Precision:"), displayPrecisionSpinner);
displayExactCheckBox.setSelected(_isDisplayExact.get());
displayExactCheckBox.setText("Display Numerics Exactly");
_isDisplayExact.bind(displayExactCheckBox.selectedProperty());
HBox displayScientificHBox = newButtonHBox();
displayScientificGreater.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(2, 80, _displayScientificGreater.get()));
displayScientificGreater.setPrefWidth(60);
_displayScientificGreater.bind(displayScientificGreater.valueProperty());
displayScientificAfter.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(2, 80, _displayScientificAfter.get()));
displayScientificAfter.setPrefWidth(60);
_displayScientificAfter.bind(displayScientificAfter.valueProperty());
displayScientificHBox.getChildren().addAll(new Label("Use Scientific When Outside Range:"), displayScientificGreater, new Label("."), displayScientificAfter);
debugModeCheckBox.setSelected(_inDebugMode.get());
debugModeCheckBox.setText("In Debug Mode");
_inDebugMode.bind(debugModeCheckBox.selectedProperty());
configureMenu.getChildren().addAll(displayPrecisionHBox, displayScientificHBox, displayExactCheckBox, new Separator(Orientation.HORIZONTAL), debugModeCheckBox);
return configureMenu;
}
use of javafx.scene.layout.HBox in project jabref by JabRef.
the class LinkedFilesEditor method createFileDisplay.
private static Node createFileDisplay(LinkedFileViewModel linkedFile) {
Text icon = MaterialDesignIconFactory.get().createIcon(linkedFile.getTypeIcon());
Text text = new Text(linkedFile.getLink());
ProgressBar progressIndicator = new ProgressBar();
progressIndicator.progressProperty().bind(linkedFile.downloadProgressProperty());
progressIndicator.visibleProperty().bind(linkedFile.downloadOngoingProperty());
Button acceptAutoLinkedFile = MaterialDesignIconFactory.get().createIconButton(MaterialDesignIcon.BRIEFCASE_CHECK);
acceptAutoLinkedFile.setTooltip(new Tooltip(Localization.lang("This file was found automatically. Do you want to link it to this entry?")));
acceptAutoLinkedFile.visibleProperty().bind(linkedFile.isAutomaticallyFoundProperty());
acceptAutoLinkedFile.setOnAction(event -> linkedFile.acceptAsLinked());
acceptAutoLinkedFile.getStyleClass().setAll("flatButton");
HBox container = new HBox(10);
container.setPrefHeight(Double.NEGATIVE_INFINITY);
container.getChildren().addAll(icon, text, progressIndicator, acceptAutoLinkedFile);
return container;
}
use of javafx.scene.layout.HBox in project bitsquare by bitsquare.
the class SendPrivateNotificationWindow method addContent.
private void addContent() {
InputTextField keyInputTextField = addLabelInputTextField(gridPane, ++rowIndex, "Key for private notification:", 10).second;
Tuple2<Label, TextArea> labelTextAreaTuple2 = addLabelTextArea(gridPane, ++rowIndex, "Private notification:", "Enter notification");
TextArea alertMessageTextArea = labelTextAreaTuple2.second;
Label first = labelTextAreaTuple2.first;
first.setMinWidth(200);
sendButton = new Button("Send private notification");
sendButton.setOnAction(e -> {
if (alertMessageTextArea.getText().length() > 0 && keyInputTextField.getText().length() > 0) {
if (!sendPrivateNotificationHandler.handle(new PrivateNotification(alertMessageTextArea.getText()), pubKeyRing, nodeAddress, keyInputTextField.getText(), new SendMailboxMessageListener() {
@Override
public void onArrived() {
log.trace("PrivateNotificationMessage arrived at peer.");
new Popup<>().feedback("Message arrived.").onClose(SendPrivateNotificationWindow.this::hide).show();
}
@Override
public void onStoredInMailbox() {
log.trace("PrivateNotificationMessage was stored in mailbox.");
new Popup<>().feedback("Message stored in mailbox.").onClose(SendPrivateNotificationWindow.this::hide).show();
}
@Override
public void onFault(String errorMessage) {
new Popup<>().feedback("Message sending failed. error=" + errorMessage).onClose(SendPrivateNotificationWindow.this::hide).show();
}
}))
new Popup().warning("The key you entered was not correct.").width(300).onClose(() -> blurAgain()).show();
}
});
closeButton = new Button("Close");
closeButton.setOnAction(e -> {
hide();
closeHandlerOptional.ifPresent(closeHandler -> closeHandler.run());
});
HBox hBox = new HBox();
hBox.setSpacing(10);
GridPane.setRowIndex(hBox, ++rowIndex);
GridPane.setColumnIndex(hBox, 1);
hBox.getChildren().addAll(sendButton, closeButton);
gridPane.getChildren().add(hBox);
GridPane.setMargin(hBox, new Insets(10, 0, 0, 0));
}
use of javafx.scene.layout.HBox in project bitsquare by bitsquare.
the class DisputeSummaryWindow method addFeeControls.
private void addFeeControls() {
Label splitFeeLabel = addLabel(gridPane, ++rowIndex, "Arbitration fee:", 10);
GridPane.setValignment(splitFeeLabel, VPos.TOP);
loserPaysFeeRadioButton = new RadioButton("Loser pays arbitration fee");
splitFeeRadioButton = new RadioButton("Split arbitration fee");
waiveFeeRadioButton = new RadioButton("Waive arbitration fee");
HBox feeRadioButtonPane = new HBox();
feeRadioButtonPane.setSpacing(20);
feeRadioButtonPane.getChildren().addAll(loserPaysFeeRadioButton, splitFeeRadioButton, waiveFeeRadioButton);
GridPane.setRowIndex(feeRadioButtonPane, rowIndex);
GridPane.setColumnIndex(feeRadioButtonPane, 1);
GridPane.setMargin(feeRadioButtonPane, new Insets(10, 0, 10, 0));
gridPane.getChildren().add(feeRadioButtonPane);
feeToggleGroup = new ToggleGroup();
loserPaysFeeRadioButton.setToggleGroup(feeToggleGroup);
splitFeeRadioButton.setToggleGroup(feeToggleGroup);
waiveFeeRadioButton.setToggleGroup(feeToggleGroup);
feeToggleSelectionListener = (observable, oldValue, newValue) -> {
if (newValue == loserPaysFeeRadioButton)
disputeResult.setDisputeFeePolicy(DisputeResult.DisputeFeePolicy.LOSER);
else if (newValue == splitFeeRadioButton)
disputeResult.setDisputeFeePolicy(DisputeResult.DisputeFeePolicy.SPLIT);
else if (newValue == waiveFeeRadioButton)
disputeResult.setDisputeFeePolicy(DisputeResult.DisputeFeePolicy.WAIVE);
};
feeToggleGroup.selectedToggleProperty().addListener(feeToggleSelectionListener);
if (dispute.isSupportTicket())
feeToggleGroup.selectToggle(waiveFeeRadioButton);
}
use of javafx.scene.layout.HBox in project bitsquare by bitsquare.
the class DisputeSummaryWindow method addReasonControls.
private void addReasonControls() {
Label label = addLabel(gridPane, ++rowIndex, "Reason of dispute:", 10);
GridPane.setValignment(label, VPos.TOP);
reasonWasBugRadioButton = new RadioButton("Bug");
reasonWasUsabilityIssueRadioButton = new RadioButton("Usability");
reasonProtocolViolationRadioButton = new RadioButton("Protocol violation");
reasonNoReplyRadioButton = new RadioButton("No reply");
reasonWasScamRadioButton = new RadioButton("Scam");
reasonWasOtherRadioButton = new RadioButton("Other");
HBox feeRadioButtonPane = new HBox();
feeRadioButtonPane.setSpacing(20);
feeRadioButtonPane.getChildren().addAll(reasonWasBugRadioButton, reasonWasUsabilityIssueRadioButton, reasonProtocolViolationRadioButton, reasonNoReplyRadioButton, reasonWasScamRadioButton, reasonWasOtherRadioButton);
GridPane.setRowIndex(feeRadioButtonPane, rowIndex);
GridPane.setColumnIndex(feeRadioButtonPane, 1);
GridPane.setMargin(feeRadioButtonPane, new Insets(10, 0, 10, 0));
gridPane.getChildren().add(feeRadioButtonPane);
reasonToggleGroup = new ToggleGroup();
reasonWasBugRadioButton.setToggleGroup(reasonToggleGroup);
reasonWasUsabilityIssueRadioButton.setToggleGroup(reasonToggleGroup);
reasonProtocolViolationRadioButton.setToggleGroup(reasonToggleGroup);
reasonNoReplyRadioButton.setToggleGroup(reasonToggleGroup);
reasonWasScamRadioButton.setToggleGroup(reasonToggleGroup);
reasonWasOtherRadioButton.setToggleGroup(reasonToggleGroup);
reasonToggleSelectionListener = (observable, oldValue, newValue) -> {
if (newValue == reasonWasBugRadioButton)
disputeResult.setReason(DisputeResult.Reason.BUG);
else if (newValue == reasonWasUsabilityIssueRadioButton)
disputeResult.setReason(DisputeResult.Reason.USABILITY);
else if (newValue == reasonProtocolViolationRadioButton)
disputeResult.setReason(DisputeResult.Reason.PROTOCOL_VIOLATION);
else if (newValue == reasonNoReplyRadioButton)
disputeResult.setReason(DisputeResult.Reason.NO_REPLY);
else if (newValue == reasonWasScamRadioButton)
disputeResult.setReason(DisputeResult.Reason.SCAM);
else if (newValue == reasonWasOtherRadioButton)
disputeResult.setReason(DisputeResult.Reason.OTHER);
};
reasonToggleGroup.selectedToggleProperty().addListener(reasonToggleSelectionListener);
}
Aggregations