Java Code Examples for com.jfoenix.controls.JFXTextField#setEditable()
The following examples show how to use
com.jfoenix.controls.JFXTextField#setEditable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BalanceWithConfirmationTextField.java From bisq with GNU Affero General Public License v3.0 | 6 votes |
public BalanceWithConfirmationTextField() { textField = new JFXTextField(); textField.setFocusTraversable(false); textField.setEditable(false); txConfidenceIndicator = new TxConfidenceIndicator(); txConfidenceIndicator.setFocusTraversable(false); txConfidenceIndicator.setPrefSize(24, 24); txConfidenceIndicator.setId("funds-confidence"); txConfidenceIndicator.setLayoutY(1); txConfidenceIndicator.setProgress(0); txConfidenceIndicator.setVisible(false); progressIndicatorTooltip = new Tooltip("-"); Tooltip.install(txConfidenceIndicator, progressIndicatorTooltip); AnchorPane.setRightAnchor(txConfidenceIndicator, 0.0); AnchorPane.setRightAnchor(textField, 55.0); AnchorPane.setLeftAnchor(textField, 0.0); getChildren().addAll(textField, txConfidenceIndicator); }
Example 2
Source File: PrivateBinWorkspaceExporter.java From milkman with MIT License | 5 votes |
@Override public Node getRoot(Workspace workspace, Templater templater) { textField = new JFXTextField(); textField.setEditable(false); burnCheckbox = new JFXCheckBox("Burn after reading"); VBox vBox = new VBox(burnCheckbox, textField); return vBox; }
Example 3
Source File: PrivateBinExporter.java From milkman with MIT License | 5 votes |
@Override public Node getRoot(RequestContainer request, Templater templater) { textField = new JFXTextField(); textField.setEditable(false); burnCheckbox = new JFXCheckBox("Burn after reading"); VBox vBox = new VBox(burnCheckbox, textField); return vBox; }
Example 4
Source File: PrivateBinCollectionExporter.java From milkman with MIT License | 5 votes |
@Override public Node getRoot(Collection collection, Templater templater) { textField = new JFXTextField(); textField.setEditable(false); burnCheckbox = new JFXCheckBox("Burn after reading"); VBox vBox = new VBox(burnCheckbox, textField); return vBox; }
Example 5
Source File: TextFieldWithIcon.java From bisq with GNU Affero General Public License v3.0 | 5 votes |
public TextFieldWithIcon() { textField = new JFXTextField(); textField.setEditable(false); textField.setMouseTransparent(true); textField.setFocusTraversable(false); setLeftAnchor(textField, 0d); setRightAnchor(textField, 0d); dummyTextField = new Label(); dummyTextField.setWrapText(true); dummyTextField.setAlignment(Pos.CENTER_LEFT); dummyTextField.setTextAlignment(TextAlignment.LEFT); dummyTextField.setMouseTransparent(true); dummyTextField.setFocusTraversable(false); setLeftAnchor(dummyTextField, 0d); dummyTextField.setVisible(false); iconLabel = new Label(); iconLabel.setLayoutX(0); iconLabel.setLayoutY(3); dummyTextField.widthProperty().addListener((observable, oldValue, newValue) -> { iconLabel.setLayoutX(dummyTextField.widthProperty().get() + 20); }); getChildren().addAll(textField, dummyTextField, iconLabel); }
Example 6
Source File: GeneralSepaForm.java From bisq with GNU Affero General Public License v3.0 | 5 votes |
ComboBox<Country> addCountrySelection() { HBox hBox = new HBox(); hBox.setSpacing(10); ComboBox<Country> countryComboBox = new JFXComboBox<>(); currencyTextField = new JFXTextField(""); currencyTextField.setEditable(false); currencyTextField.setMouseTransparent(true); currencyTextField.setFocusTraversable(false); currencyTextField.setMinWidth(300); currencyTextField.setVisible(true); currencyTextField.setManaged(true); currencyTextField.setText(Res.get("payment.currencyWithSymbol", euroCurrency.getNameAndCode())); hBox.getChildren().addAll(countryComboBox, currencyTextField); addTopLabelWithVBox(gridPane, ++gridRow, Res.get("payment.bank.country"), hBox, 0); countryComboBox.setPromptText(Res.get("payment.select.bank.country")); countryComboBox.setConverter(new StringConverter<>() { @Override public String toString(Country country) { return country.name + " (" + country.code + ")"; } @Override public Country fromString(String s) { return null; } }); return countryComboBox; }
Example 7
Source File: TextFieldWithCopyIcon.java From bisq with GNU Affero General Public License v3.0 | 5 votes |
public TextFieldWithCopyIcon(String customStyleClass) { Label copyIcon = new Label(); copyIcon.setLayoutY(3); copyIcon.getStyleClass().addAll("icon", "highlight"); copyIcon.setTooltip(new Tooltip(Res.get("shared.copyToClipboard"))); AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY); copyIcon.setOnMouseClicked(e -> { String text = getText(); if (text != null && text.length() > 0) { String copyText; if (copyWithoutCurrencyPostFix) { String[] strings = text.split(" "); if (strings.length > 1) copyText = strings[0]; // exclude the BTC postfix else copyText = text; } else { copyText = text; } Utilities.copyToClipboard(copyText); } }); textField = new JFXTextField(); textField.setEditable(false); if (customStyleClass != null) textField.getStyleClass().add(customStyleClass); textField.textProperty().bindBidirectional(text); AnchorPane.setRightAnchor(copyIcon, 5.0); AnchorPane.setRightAnchor(textField, 30.0); AnchorPane.setLeftAnchor(textField, 0.0); textField.focusTraversableProperty().set(focusTraversableProperty().get()); //TODO app wide focus //focusedProperty().addListener((ov, oldValue, newValue) -> textField.requestFocus()); getChildren().addAll(textField, copyIcon); }
Example 8
Source File: TxIdTextField.java From bisq with GNU Affero General Public License v3.0 | 5 votes |
public TxIdTextField() { txConfidenceIndicator = new TxConfidenceIndicator(); txConfidenceIndicator.setFocusTraversable(false); txConfidenceIndicator.setMaxSize(20, 20); txConfidenceIndicator.setId("funds-confidence"); txConfidenceIndicator.setLayoutY(1); txConfidenceIndicator.setProgress(0); txConfidenceIndicator.setVisible(false); AnchorPane.setRightAnchor(txConfidenceIndicator, 0.0); AnchorPane.setTopAnchor(txConfidenceIndicator, 3.0); progressIndicatorTooltip = new Tooltip("-"); txConfidenceIndicator.setTooltip(progressIndicatorTooltip); copyIcon = new Label(); copyIcon.setLayoutY(3); copyIcon.getStyleClass().addAll("icon", "highlight"); copyIcon.setTooltip(new Tooltip(Res.get("txIdTextField.copyIcon.tooltip"))); AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY); AnchorPane.setRightAnchor(copyIcon, 30.0); Tooltip tooltip = new Tooltip(Res.get("txIdTextField.blockExplorerIcon.tooltip")); blockExplorerIcon = new Label(); blockExplorerIcon.getStyleClass().addAll("icon", "highlight"); blockExplorerIcon.setTooltip(tooltip); AwesomeDude.setIcon(blockExplorerIcon, AwesomeIcon.EXTERNAL_LINK); blockExplorerIcon.setMinWidth(20); AnchorPane.setRightAnchor(blockExplorerIcon, 52.0); AnchorPane.setTopAnchor(blockExplorerIcon, 4.0); textField = new JFXTextField(); textField.setId("address-text-field"); textField.setEditable(false); textField.setTooltip(tooltip); AnchorPane.setRightAnchor(textField, 80.0); AnchorPane.setLeftAnchor(textField, 0.0); textField.focusTraversableProperty().set(focusTraversableProperty().get()); getChildren().addAll(textField, copyIcon, blockExplorerIcon, txConfidenceIndicator); }
Example 9
Source File: TakeOfferView.java From bisq with GNU Affero General Public License v3.0 | 4 votes |
private void addPaymentGroup() { paymentAccountTitledGroupBg = addTitledGroupBg(gridPane, gridRow, 1, Res.get("takeOffer.paymentInfo")); GridPane.setColumnSpan(paymentAccountTitledGroupBg, 2); final Tuple4<ComboBox<PaymentAccount>, Label, TextField, HBox> paymentAccountTuple = addComboBoxTopLabelTextField(gridPane, gridRow, Res.get("shared.selectTradingAccount"), Res.get("shared.paymentMethod"), Layout.FIRST_ROW_DISTANCE); paymentAccountsComboBox = paymentAccountTuple.first; HBox.setMargin(paymentAccountsComboBox, new Insets(Layout.FLOATING_LABEL_DISTANCE, 0, 0, 0)); paymentAccountsComboBox.setConverter(GUIUtil.getPaymentAccountsComboBoxStringConverter()); paymentAccountsComboBox.setCellFactory(model.getPaymentAccountListCellFactory(paymentAccountsComboBox)); paymentAccountsComboBox.setVisible(false); paymentAccountsComboBox.setManaged(false); paymentAccountsComboBox.setOnAction(e -> { PaymentAccount paymentAccount = paymentAccountsComboBox.getSelectionModel().getSelectedItem(); if (paymentAccount != null) { maybeShowClearXchangeWarning(paymentAccount); maybeShowFasterPaymentsWarning(paymentAccount); } model.onPaymentAccountSelected(paymentAccount); }); paymentMethodLabel = paymentAccountTuple.second; paymentMethodTextField = paymentAccountTuple.third; paymentMethodTextField.setMinWidth(250); paymentMethodTextField.setEditable(false); paymentMethodTextField.setMouseTransparent(true); paymentMethodTextField.setFocusTraversable(false); currencyTextField = new JFXTextField(); currencyTextField.setMinWidth(250); currencyTextField.setEditable(false); currencyTextField.setMouseTransparent(true); currencyTextField.setFocusTraversable(false); final Tuple2<Label, VBox> tradeCurrencyTuple = getTopLabelWithVBox(Res.get("shared.tradeCurrency"), currencyTextField); HBox.setMargin(tradeCurrencyTuple.second, new Insets(5, 0, 0, 0)); final HBox hBox = paymentAccountTuple.fourth; hBox.setSpacing(30); hBox.setAlignment(Pos.CENTER_LEFT); hBox.setPadding(new Insets(10, 0, 18, 0)); hBox.getChildren().add(tradeCurrencyTuple.second); }
Example 10
Source File: AddressTextField.java From bisq with GNU Affero General Public License v3.0 | 4 votes |
public AddressTextField(String label) { JFXTextField textField = new BisqTextField(); textField.setId("address-text-field"); textField.setEditable(false); textField.setLabelFloat(true); textField.setPromptText(label); textField.textProperty().bind(address); String tooltipText = Res.get("addressTextField.openWallet"); textField.setTooltip(new Tooltip(tooltipText)); textField.setOnMousePressed(event -> wasPrimaryButtonDown = event.isPrimaryButtonDown()); textField.setOnMouseReleased(event -> { if (wasPrimaryButtonDown) GUIUtil.showFeeInfoBeforeExecute(AddressTextField.this::openWallet); wasPrimaryButtonDown = false; }); textField.focusTraversableProperty().set(focusTraversableProperty().get()); //TODO app wide focus //focusedProperty().addListener((ov, oldValue, newValue) -> textField.requestFocus()); Label extWalletIcon = new Label(); extWalletIcon.setLayoutY(3); extWalletIcon.getStyleClass().addAll("icon", "highlight"); extWalletIcon.setTooltip(new Tooltip(tooltipText)); AwesomeDude.setIcon(extWalletIcon, AwesomeIcon.SIGNIN); extWalletIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(this::openWallet)); Label copyIcon = new Label(); copyIcon.setLayoutY(3); copyIcon.getStyleClass().addAll("icon", "highlight"); Tooltip.install(copyIcon, new Tooltip(Res.get("addressTextField.copyToClipboard"))); AwesomeDude.setIcon(copyIcon, AwesomeIcon.COPY); copyIcon.setOnMouseClicked(e -> GUIUtil.showFeeInfoBeforeExecute(() -> { if (address.get() != null && address.get().length() > 0) Utilities.copyToClipboard(address.get()); })); AnchorPane.setRightAnchor(copyIcon, 30.0); AnchorPane.setRightAnchor(extWalletIcon, 5.0); AnchorPane.setRightAnchor(textField, 55.0); AnchorPane.setLeftAnchor(textField, 0.0); getChildren().addAll(textField, copyIcon, extWalletIcon); }