本文整理了Java中javafx.scene.control.TextArea.<init>()
方法的一些代码示例,展示了TextArea.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextArea.<init>()
方法的具体详情如下:
包路径:javafx.scene.control.TextArea
类名称:TextArea
方法名:<init>
暂无
代码示例来源:origin: speedment/speedment
@Override
protected TextInputControl getInputControl() {
TextArea area = new TextArea();
area.setWrapText(true);
return area;
}
代码示例来源:origin: pmd/pmd
private void showLicensePopup() {
Alert licenseAlert = new Alert(AlertType.INFORMATION);
licenseAlert.setWidth(500);
licenseAlert.setHeaderText("License");
ScrollPane scroll = new ScrollPane();
try {
scroll.setContent(new TextArea(IOUtils.toString(getClass().getResourceAsStream("LICENSE"),
StandardCharsets.UTF_8)));
} catch (IOException e) {
e.printStackTrace();
}
licenseAlert.getDialogPane().setContent(scroll);
licenseAlert.showAndWait();
}
代码示例来源:origin: jfoenixadmin/JFoenix
main.setSpacing(50);
TextArea javafxTextArea = new TextArea();
javafxTextArea.setPromptText("JavaFX Text Area");
main.getChildren().add(javafxTextArea);
代码示例来源:origin: speedment/speedment
final TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
代码示例来源:origin: com.speedment.tool/tool-propertyeditor
@Override
protected TextInputControl getInputControl() {
TextArea area = new TextArea();
area.setWrapText(true);
return area;
}
代码示例来源:origin: com.powsybl/powsybl-gse-afs-ext-base
private javafx.scene.Node createListStringComponent(Parameter parameter) {
TextArea textArea = new TextArea(((List<String>) parameter.getDefaultValue()).stream().collect(Collectors.joining(System.lineSeparator())));
textArea.setPrefColumnCount(20);
textArea.setPrefRowCount(5);
textArea.textProperty().addListener((observable, oldValue, newValue) -> parametersValue.put(parameter.getName(), newValue.replace(System.lineSeparator(), ",")));
return new VBox(5, new Label(parameter.getDescription()), textArea);
}
代码示例来源:origin: com.aquafx-project/aquafx
public VBox createPage(int pageIndex) {
VBox box = new VBox(5);
int page = pageIndex * itemsPerPage();
for (int i = page; i < page + itemsPerPage(); i++) {
TextArea text = new TextArea(textPages[i]);
text.setWrapText(true);
box.getChildren().add(text);
}
return box;
}
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
@Override
public Node createValueVisualisation() {
TextArea textArea = new TextArea();
textArea.textProperty().bindBidirectional(observableAttributeValue);
textArea.disableProperty().bind(readOnly);
return textArea;
}
}
代码示例来源:origin: PhoenicisOrg/phoenicis
/**
* Adds the description input to the given {@link GridPane}
*
* @param gridPane The grid pane to which the description input should be added
* @return The {@link TextArea} containing the description
*/
private TextArea addDescription(final GridPane gridPane) {
final int row = gridPane.getRowCount();
final Label descriptionLabel = new Label(tr("Description:"));
descriptionLabel.getStyleClass().add("captionTitle");
GridPane.setValignment(descriptionLabel, VPos.TOP);
final TextArea description = new TextArea();
gridPane.addRow(row, descriptionLabel, description);
return description;
}
代码示例来源:origin: PhoenicisOrg/phoenicis
/**
* Creates the expandable content component of the {@link ErrorDialog}
*
* @return The expandable content component of the {@link ErrorDialog}
*/
private VBox createExpandableContent() {
final Label label = new Label(tr("Stack trace:"));
final TextArea textArea = new TextArea();
textArea.setEditable(false);
textArea.textProperty().bind(Bindings.createStringBinding(
() -> Optional.ofNullable(getException()).map(ExceptionUtils::getFullStackTrace).orElse(null),
exception));
VBox.setVgrow(textArea, Priority.ALWAYS);
final VBox container = new VBox(label, textArea);
container.setFillWidth(true);
return container;
}
代码示例来源:origin: org.controlsfx/controlsfx
TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
代码示例来源:origin: com.canoo.dolphin-platform/dolphin-platform-client-javafx
TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
代码示例来源:origin: edu.utah.bmi.nlp/nlp-core
public void popDialog(String title, String header, String content) {
if (guiEnabled)
Platform.runLater(() -> {
Dialog<String> dialog = new Dialog<>();
dialog.setTitle(title);
dialog.setHeaderText(header);
TextArea textField = new TextArea();
dialog.setHeight(400);
dialog.setResizable(true);
dialog.getDialogPane().setContent(textField);
dialog.getDialogPane().getButtonTypes().add(ButtonType.OK);
textField.setEditable(false);
textField.setText(content);
textField.setWrapText(true);
dialog.showAndWait();
});
if(print)
System.out.println(title+":\t"+header+":\t"+content);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public static void showException(String title, String message, Exception exception) {
final Alert alert = new Alert(Alert.AlertType.ERROR);
alert.initStyle(StageStyle.UTILITY);
alert.setTitle("Exception");
alert.setHeaderText(title);
alert.setContentText(message);
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw);
exception.printStackTrace(pw);
final String exceptionText = sw.toString();
final Label label = new Label("Details:");
final TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
textArea.setMaxWidth(Double.MAX_VALUE);
textArea.setMaxHeight(Double.MAX_VALUE);
GridPane.setVgrow(textArea, Priority.ALWAYS);
GridPane.setHgrow(textArea, Priority.ALWAYS);
final GridPane expContent = new GridPane();
expContent.setMaxWidth(Double.MAX_VALUE);
expContent.add(label, 0, 0);
expContent.add(textArea, 0, 1);
alert.getDialogPane().setExpandableContent(expContent);
alert.showAndWait();
}
代码示例来源:origin: com.dlsc.formsfx/formsfx-core
/**
* {@inheritDoc}
*/
@Override
public void initializeParts() {
super.initializeParts();
getStyleClass().add("simple-text-control");
stack = new StackPane();
editableField = new TextField(field.getValue());
editableArea = new TextArea(field.getValue());
readOnlyLabel = new Label(field.getValue());
fieldLabel = new Label(field.labelProperty().getValue());
editableField.setPromptText(field.placeholderProperty().getValue());
}
代码示例来源:origin: com.intuit.karate/karate-core
public LogPanel(Logger logger) {
setPadding(App.PADDING_ALL);
textArea = new TextArea();
TextAreaLogAppender.init(logger, textArea);
textArea.setFont(App.getDefaultFont());
Button clearButton = new Button("Clear Log");
clearButton.setOnAction(e -> textArea.clear());
setCenter(textArea);
setBottom(clearButton);
setMargin(clearButton, new Insets(2.0, 0, 0, 0));
}
代码示例来源:origin: com.github.vatbub/common.view.core
public ExceptionAlert(Throwable e, String contentText, ButtonType... buttonTypes) {
super(AlertType.ERROR, contentText, buttonTypes);
String exceptionText = ExceptionUtils.getFullStackTrace(e);
Label label = new Label(bundle.getString("stackTraceLabel"));
TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
textArea.setMaxWidth(Double.MAX_VALUE);
textArea.setMaxHeight(Double.MAX_VALUE);
GridPane.setVgrow(textArea, Priority.ALWAYS);
GridPane.setHgrow(textArea, Priority.ALWAYS);
GridPane expContent = new GridPane();
expContent.setMaxWidth(Double.MAX_VALUE);
expContent.add(label, 0, 0);
expContent.add(textArea, 0, 1);
// Set expandable Exception into the dialog pane.
this.getDialogPane().setExpandableContent(expContent);
}
}
代码示例来源:origin: org.tentackle/tentackle-fx
String exceptionText = sw.toString();
Label label = new Label("STACKTRACE:");
TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
代码示例来源:origin: PhoenicisOrg/phoenicis
@Override
protected void drawStepContent() {
super.drawStepContent();
TextArea licenceWidget = new TextArea(licenceText);
licenceWidget.setLayoutX(10);
licenceWidget.setLayoutY(100);
licenceWidget.setMinWidth(700);
licenceWidget.setMaxWidth(700);
licenceWidget.setMinHeight(308);
licenceWidget.setMaxHeight(308);
licenceWidget.setEditable(false);
CheckBox confirmWidget = new CheckBox(tr("I agree"));
confirmWidget.setOnAction(event -> {
isAgree = !isAgree;
confirmWidget.setSelected(isAgree);
setNextButtonEnabled(isAgree);
});
confirmWidget.setLayoutX(10);
confirmWidget.setLayoutY(418);
setNextButtonEnabled(false);
this.addToContentPane(licenceWidget);
this.addToContentPane(confirmWidget);
}
}
代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx
Button reportIssueButton = new Button(Translator.translate("reportIssue"));
Label label = new Label("stacktrace:");
TextArea textArea = new TextArea();
textArea.setEditable(false);
textArea.setWrapText(true);
内容来源于网络,如有侵权,请联系作者删除!