MCPcopy Create free account
hub / github.com/FabricMC/Matcher / WebViewTab

Method WebViewTab

src/main/java/matcher/gui/tab/WebViewTab.java:23–39  ·  view source on GitHub ↗
(String text, String templatePath)

Source from the content-addressed store, hash-verified

21
22abstract 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));

Callers

nothing calls this directly

Calls 3

readTemplateMethod · 0.95
addListenerMethod · 0.80
runMethod · 0.80

Tested by

no test coverage detected