javafx.scene.control.TextArea.setText()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(208)

本文整理了Java中javafx.scene.control.TextArea.setText()方法的一些代码示例,展示了TextArea.setText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextArea.setText()方法的具体详情如下:
包路径:javafx.scene.control.TextArea
类名称:TextArea
方法名:setText

TextArea.setText介绍

暂无

代码示例

代码示例来源:origin: pmd/pmd

private void onExceptionSelectionChanges(LogEntry newVal) {
  logDetailsTextArea.setText(newVal == null ? "" : newVal.getStackTrace());
  handleSelectedEntry(newVal);
}

代码示例来源:origin: speedment/speedment

areaConnectionUrl.setText(url);

代码示例来源:origin: speedment/speedment

final InputStream in = MailPromptController.class.getResourceAsStream("/text/terms.txt");
  final String str = inputToString(in);
  terms.setText(str);
} catch (final IOException ex) {
  ui.showError(

代码示例来源:origin: org.copper-engine/copper-monitoring-client

private void craeteTextChart(Map<String, List<TimeValuePair<Double>>> seriesTitleToData) {
  StringBuilder result = new StringBuilder();
  for (Entry<String, List<TimeValuePair<Double>>> seriesData : seriesTitleToData.entrySet()) {
    result.append(seriesData.getKey());
    result.append("\n");
    for (TimeValuePair<Double> value : seriesData.getValue()) {
      result.append(value.date);
      result.append("\t");
      result.append(value.value);
      result.append("\n");
    }
  }
  textChart.setText(result.toString());
}

代码示例来源:origin: it.tidalwave.accounting/it-tidalwave-accounting-ui-javafx

@Override
 public void populate (final @Nonnull PresentationModel pm)
  {
   taReport.setText(pm.as(PlainTextRenderable).render());
  }
}

代码示例来源:origin: org.copper-engine/copper-monitoring-client

@Override
public void showFilteredResult(List<LogsResultModel> filteredResult, LogsFilterModel usedFilter) {
  LogsResultModel resultModel = filteredResult.get(0);
  resultTable.getItems().clear();
  setOriginalItems(resultTable, resultModel.logs);
  StringBuilder textresult = new StringBuilder();
  textresult.append("Time");
  textresult.append("\t");
  textresult.append("Level");
  textresult.append("\t");
  textresult.append("message");
  textresult.append("\t");
  textresult.append("Location");
  textresult.append("\n");
  for (LogsRowModel row : resultModel.logs) {
    row.fillString(textresult);
  }
  resultTextarea.setText(textresult.toString());
  logConfig.setText(resultModel.config.get());
  updateConfig.setDisable(true);
}

代码示例来源:origin: Tristan971/Lyrebird

/**
 * In case this is a reply we pre-fill the content field with the appropriate mentions.
 */
private void prefillMentionsForReply() {
  final User currentUser = sessionManager.currentSessionProperty().getValue().getTwitterUser().get();
  final Status replied = inReplyStatus.getValue();
  final StringBuilder prefillText = new StringBuilder();
  prefillText.append('@').append(replied.getUser().getScreenName());
  Arrays.stream(replied.getUserMentionEntities())
     .map(UserMentionEntity::getScreenName)
     .filter(username -> !username.equals(currentUser.getScreenName()))
     .forEach(username -> prefillText.append(' ').append('@').append(username));
  prefillText.append(' ');
  final String prefill = prefillText.toString();
  tweetTextArea.setText(prefill);
  tweetTextArea.positionCaret(prefill.length());
}

代码示例来源:origin: org.copper-engine/copper-monitoring-client

textresult.append("\n");
resultTextarea.setText(textresult.toString());

代码示例来源:origin: org.copper-engine/copper-monitoring-client

private void updateView(String message, final AuditTrailResultModel newValue) {
  CodeFormatLanguage mode = CodeFormatLanguage.XML;
  if (newValue.messageType.getValue() != null && newValue.messageType.getValue().toLowerCase().equals("json")) {
    mode = CodeFormatLanguage.JAVASCRIPT;
  }
  String formatedMessage = codeMirrorFormatter.format(message, mode, true);
  htmlMessageView.getEngine().loadContent(formatedMessage);
  textMessageView.setText(message);
}

代码示例来源:origin: org.copper-engine/copper-monitoring-client

@Override
  public void changed(ObservableValue<? extends AuditTrailResultModel> observable, AuditTrailResultModel oldValue,
      final AuditTrailResultModel newValue) {
    // richtext support will is not available in current javafx (plante for 8) for now this is a workaround
    // with a javascriptlib+webview
    if (newValue != null) {
      final ProgressIndicator bar = new ProgressIndicator();
      detailstackPane.getChildren().add(bar);
      Thread thread = new Thread(new Runnable() {
        @Override
        public void run() {
          final String message = copperDataProvider.getAuditTrailMessage(newValue.id);
          Platform.runLater(new Runnable() {
            @Override
            public void run() {
              detailstackPane.getChildren().remove(bar);
              updateView(message, newValue);
            }
          });
        }
      });
      thread.setDaemon(true);
      thread.start();
    } else {
      htmlMessageView.getEngine().loadContent("");
      textMessageView.setText("");
    }
  }
});

代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx

contentProperty.setValue(errMessage);
Platform.runLater(() -> textArea.setText(exceptionText));

代码示例来源:origin: org.copper-engine/copper-monitoring-client

private void showDetails(final WorkflowInstanceResultModel workflowInstanceResultModel) {
  if (workflowInstanceResultModel != null) {
    errorInfo.setText(workflowInstanceResultModel.errorInfos.get());
    if (service == null) {
      service = new DetailLoadService(usedFilter, workflowInstanceResultModel, stackDetailPane, detailForm, issueReporter);
    }
    if (!service.isRunning()) {
      service.reset();
      service.setWorkflowInstanceResultModel(workflowInstanceResultModel);
      service.start();
    }
  } else {
    errorInfo.clear();
  }
}

代码示例来源: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: 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: org.copper-engine/copper-monitoring-client

area.setPrefRowCount(10);
if (e != null) {
  area.setText(Throwables.getStackTraceAsString(e));

代码示例来源:origin: org.copper-engine/copper-monitoring-client

public void update(ProcessingEngineInfo processingEngineInfo){
  id.setText(processingEngineInfo.getId());
  typ.setText(processingEngineInfo.getTyp().toString());
  workflowRepositoryId.setText(processingEngineInfo.getRepositoryInfo().getName());
  workflowRepositoryTyp.setText(processingEngineInfo.getRepositoryInfo().getWorkflowRepositorTyp().toString());
  workflowRepositoryPaths.setText("");
  for (String path : processingEngineInfo.getRepositoryInfo().getSrcPaths()) {
    workflowRepositoryPaths.setText(workflowRepositoryPaths.getText() + path + "\n");
  }
  injectorTyp.setText(processingEngineInfo.getDependencyInjectorInfo().getTyp());
  statisticsCollector.setText(processingEngineInfo.getStatisticsCollectorType());
  storageId.setText(processingEngineInfo.getStorageInfo().getDescription());
  batcherId.setText(processingEngineInfo.getStorageInfo().getBatcher().getDescription());
  batcherthreadnum.setText(Integer.toString(processingEngineInfo.getStorageInfo().getBatcher().getNumThreads()));
  state_ENQUEUED.setText("?");//Integer.toString(workflowStateSummary.getCount(WorkflowInstanceState.ENQUEUED)));
  state_ERROR.setText("?");//Integer.toString(workflowStateSummary.getCount(WorkflowInstanceState.ERROR)));
  state_FINISHED.setText("?");//Integer.toString(workflowStateSummary.getCount(WorkflowInstanceState.FINISHED)));
  state_INVALID.setText("?");//Integer.toString(workflowStateSummary.getCount(WorkflowInstanceState.INVALID)));
  state_WAITING.setText("?");//Integer.toString(workflowStateSummary.getCount(WorkflowInstanceState.WAITING)));
  updateProcessorPools(processingEngineInfo);
}

代码示例来源:origin: com.aquafx-project/aquafx

textareaBox.getChildren().add(area);
TextArea area2 = new TextArea();
area2.setText("Disabled");
area2.setDisable(true);
area2.setPrefWidth(290);

代码示例来源:origin: com.intuit.karate/karate-core

text = step.toString();
int lines = StringUtils.wrappedLinesEstimate(text, 30);
textArea.setText(text);
textArea.setPrefRowCount(lines);
textArea.focusedProperty().addListener((val, before, after) -> {

相关文章