本文整理了Java中javafx.scene.control.TextArea.setEditable()
方法的一些代码示例,展示了TextArea.setEditable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextArea.setEditable()
方法的具体详情如下:
包路径:javafx.scene.control.TextArea
类名称:TextArea
方法名:setEditable
暂无
代码示例来源:origin: speedment/speedment
textArea.setEditable(false);
textArea.setWrapText(true);
代码示例来源: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: it.unibo.alchemist/alchemist-projectview
alert.setHeaderText(FXUtil.RESOURCES.getString("error_follows"));
alert.setContentText(messages);
textArea.setEditable(false);
textArea.setWrapText(true);
textArea.setMaxWidth(Double.MAX_VALUE);
代码示例来源:origin: org.controlsfx/controlsfx
textArea.setEditable(false);
textArea.setWrapText(true);
代码示例来源:origin: com.canoo.dolphin-platform/dolphin-platform-client-javafx
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.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.copper-engine/copper-monitoring-client
area.setEditable(false);
VBox.setVgrow(area, Priority.ALWAYS);
back.getChildren().add(area);
代码示例来源:origin: org.tentackle/tentackle-fx
Label label = new Label("STACKTRACE:");
TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
textArea.setMaxWidth(Double.MAX_VALUE);
代码示例来源: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
Label label = new Label("stacktrace:");
TextArea textArea = new TextArea();
textArea.setEditable(false);
textArea.setWrapText(true);
内容来源于网络,如有侵权,请联系作者删除!