List of usage examples for javafx.scene.control TextArea setPrefHeight
public final void setPrefHeight(double value)
From source file:io.bitsquare.gui.components.paymentmethods.USPostalMoneyOrderForm.java
public static int addFormForBuyer(GridPane gridPane, int gridRow, PaymentAccountContractData paymentAccountContractData) { addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, "Account holder name:", ((USPostalMoneyOrderAccountContractData) paymentAccountContractData).getHolderName()); TextArea textArea = addLabelTextArea(gridPane, ++gridRow, "Postal address:", "").second; textArea.setPrefHeight(60); textArea.setEditable(false);//from w w w . j av a 2 s . c o m textArea.setId("text-area-disabled"); textArea.setText(((USPostalMoneyOrderAccountContractData) paymentAccountContractData).getPostalAddress()); return gridRow; }
From source file:io.bitsquare.gui.components.paymentmethods.USPostalMoneyOrderForm.java
@Override public void addFormForDisplayAccount() { gridRowFrom = gridRow;/*w w w . ja v a2 s. c o m*/ addLabelTextField(gridPane, gridRow, "Account name:", usPostalMoneyOrderAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE); addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(usPostalMoneyOrderAccount.getPaymentMethod().getId())); addLabelTextField(gridPane, ++gridRow, "Account holder name:", usPostalMoneyOrderAccount.getHolderName()); TextArea textArea = addLabelTextArea(gridPane, ++gridRow, "Postal address:", "").second; textArea.setText(usPostalMoneyOrderAccount.getPostalAddress()); textArea.setPrefHeight(60); textArea.setEditable(false); addLabelTextField(gridPane, ++gridRow, "Currency:", usPostalMoneyOrderAccount.getSingleTradeCurrency().getNameAndCode()); addAllowedPeriod(); }
From source file:com.github.drbookings.ui.controller.BookingDetailsController.java
private void addCheckInNote(final Pane content, final BookingBean be) { final VBox b = new VBox(); b.getChildren().add(new Text("Check-in Note")); final TextArea ta0 = new TextArea(be.getCheckInNote()); ta0.setWrapText(true);//from w w w . j a v a2 s . c o m ta0.setPrefHeight(80); b.getChildren().add(ta0); booking2CheckInNote.put(be, ta0); content.getChildren().add(b); }
From source file:com.github.drbookings.ui.controller.BookingDetailsController.java
private void addCheckOutNote(final Pane content, final BookingBean be) { final VBox b = new VBox(); b.getChildren().add(new Text("Check-out Note")); final TextArea ta0 = new TextArea(be.getCheckOutNote()); ta0.setWrapText(true);/* ww w . jav a2 s.c o m*/ ta0.setPrefHeight(80); b.getChildren().add(ta0); booking2CheckOutNote.put(be, ta0); content.getChildren().add(b); }
From source file:com.github.drbookings.ui.controller.BookingDetailsController.java
private void addSpecialRequestNote(final Pane content, final BookingBean be) { final VBox b = new VBox(); b.getChildren().add(new Text("Special Requests")); final TextArea ta0 = new TextArea(be.getSpecialRequestNote()); ta0.setWrapText(true);/* w w w .j ava2 s . co m*/ ta0.setPrefHeight(80); b.getChildren().add(ta0); booking2SpecialRequestNote.put(be, ta0); content.getChildren().add(b); }
From source file:com.github.drbookings.ui.controller.MainController.java
private void showAbout() { final Alert alert = new Alert(AlertType.INFORMATION); alert.setTitle("About DrBookings"); final TextArea label = new TextArea(); label.setEditable(false);//from w w w .j a v a 2 s.c o m label.setPrefHeight(400); label.setPrefWidth(400); label.getStyleClass().add("copyable-label"); final StringBuilder sb = new StringBuilder(); try { sb.append("Application version\t").append(Manifests.read("Implementation-Version")).append("\n"); sb.append("Build time\t\t").append(Manifests.read("Build-Time")).append("\n"); } catch (final Exception e) { if (logger.isInfoEnabled()) { logger.error("Failed to add manifest entry", e.getLocalizedMessage()); } } label.setText(sb.toString()); alert.setHeaderText("proudly brought to you by kerner1000"); alert.setContentText(null); alert.getDialogPane().setContent(label); alert.showAndWait(); }
From source file:com.cdd.bao.editor.EditSchema.java
public void actionFileAssayStats() { List<String> stats = new ArrayList<>(); SchemaUtil.gatherAssayStats(stack.peekSchema(), stats); String text = String.join("\n", stats); Dialog<Boolean> showdlg = new Dialog<>(); showdlg.setTitle("Assay Stats"); TextArea area = new TextArea(text); area.setWrapText(true);/*from www .ja v a2s. c om*/ area.setPrefWidth(700); area.setPrefHeight(500); showdlg.getDialogPane().setContent(area); showdlg.getDialogPane().getButtonTypes().addAll(new ButtonType("OK", ButtonBar.ButtonData.OK_DONE)); showdlg.setResultConverter(buttonType -> true); showdlg.showAndWait(); }
From source file:com.cdd.bao.editor.EditSchema.java
public void actionFileMerge() { FileChooser chooser = new FileChooser(); chooser.setTitle("Merge Schema"); if (schemaFile != null) chooser.setInitialDirectory(schemaFile.getParentFile()); File file = chooser.showOpenDialog(stage); if (file == null) return;/*from w w w. j a v a2 s. c o m*/ Schema addSchema = null; try { addSchema = ModelSchema.deserialise(file); } catch (IOException ex) { ex.printStackTrace(); Util.informWarning("Merge", "Failed to parse file: is it a valid schema?"); return; } List<String> log = new ArrayList<>(); Schema merged = SchemaUtil.mergeSchema(stack.getSchema(), addSchema, log); if (log.size() == 0) { Util.informMessage("Merge", "The merge file is the same: no action."); return; } String text = String.join("\n", log); Dialog<Boolean> confirm = new Dialog<>(); confirm.setTitle("Confirm Merge Modifications"); TextArea area = new TextArea(text); area.setWrapText(true); area.setPrefWidth(700); area.setPrefHeight(500); confirm.getDialogPane().setContent(area); ButtonType btnApply = new ButtonType("Apply", ButtonBar.ButtonData.OK_DONE); confirm.getDialogPane().getButtonTypes().addAll(new ButtonType("Cancel", ButtonBar.ButtonData.CANCEL_CLOSE), btnApply); confirm.setResultConverter(buttonType -> { if (buttonType == btnApply) return true; return null; }); Optional<Boolean> result = confirm.showAndWait(); if (!result.isPresent() || result.get() != true) return; stack.changeSchema(merged, true); rebuildTree(); }