(String text, String templatePath)
| 21 | |
| 22 | abstract class WebViewTab extends Tab implements IGuiComponent.Selectable { |
| 23 | protected WebViewTab(String text, String templatePath) { |
| 24 | super(text); |
| 25 | |
| 26 | this.template = readTemplate(templatePath); |
| 27 | |
| 28 | webView.getEngine().getLoadWorker().stateProperty().addListener((observable, oldValue, newValue) -> { |
| 29 | if (newValue == State.SUCCEEDED) { |
| 30 | Runnable r; |
| 31 | |
| 32 | while ((r = pendingWebViewTasks.poll()) != null) { |
| 33 | r.run(); |
| 34 | } |
| 35 | } |
| 36 | }); |
| 37 | |
| 38 | setContent(webView); |
| 39 | } |
| 40 | |
| 41 | protected void displayText(String text) { |
| 42 | displayHtml(HtmlUtil.escape(text)); |
nothing calls this directly
no test coverage detected