本文整理了Java中javafx.scene.control.TextArea.setPrefRowCount()
方法的一些代码示例,展示了TextArea.setPrefRowCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextArea.setPrefRowCount()
方法的具体详情如下:
包路径:javafx.scene.control.TextArea
类名称:TextArea
方法名:setPrefRowCount
暂无
代码示例来源: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: org.tentackle/tentackle-fx
if (comp instanceof TextArea) {
try {
((TextArea) comp).setPrefRowCount(Integer.parseInt(option.substring(Constants.BIND_LINES.length() + 1)));
processed = true;
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
super.buildFrom(controller, configuration);
textArea.setPrefRowCount(2);
// prompt
prompt.ifPresent(e -> {
final String val = controller.getLocalised(prompt.get());
textArea.setPromptText(val);
});
// process wizardConfiguration
final Optional<VLViewComponentXML> displayConfig = configuration.getComponentById(DISPLAY_CONFIG);
displayConfig.ifPresent(d -> {
d.booleanPropertyValueOf(XMLConstants.READ_ONLY).ifPresent(e -> {
textArea.setDisable(e);
});
d.intPropertyValueOf(XMLConstants.COUNTER).ifPresent(e -> {
if (e > 0) {
// !! not for validation, for counter
// textArea.setMaxLength(e);
}
});
});
textArea.setText(owner.getCurrentInternalValue());
Bindings.bindBidirectional(textArea.textProperty(), owner.currentInternalValueProperty(), owner.getConverter());
}
代码示例来源:origin: PhoenicisOrg/phoenicis
valueLabel.setPrefRowCount(entry.getValue().toString().length() / 25);
代码示例来源:origin: org.copper-engine/copper-monitoring-client
area.setPrefRowCount(10);
if (e != null) {
area.setText(Throwables.getStackTraceAsString(e));
代码示例来源:origin: com.dlsc.formsfx/formsfx-core
editableArea.setPrefRowCount(5);
editableArea.setPrefHeight(80);
editableArea.setWrapText(true);
代码示例来源:origin: com.intuit.karate/karate-core
int lines = StringUtils.wrappedLinesEstimate(text, 30);
textArea.setText(text);
textArea.setPrefRowCount(lines);
textArea.focusedProperty().addListener((val, before, after) -> {
if (!after) { // if we lost focus
内容来源于网络,如有侵权,请联系作者删除!