MCPcopy Index your code
hub / github.com/processing/processing / hyperlinkUpdate

Method hyperlinkUpdate

app/src/processing/app/ui/WebFrame.java:93–116  ·  view source on GitHub ↗
(HyperlinkEvent e)

Source from the content-addressed store, hash-verified

91
92 editorPane.addHyperlinkListener(new HyperlinkListener() {
93 @Override
94 public void hyperlinkUpdate(HyperlinkEvent e) {
95 //System.out.println(e);
96 if (e instanceof FormSubmitEvent) {
97 String result = ((FormSubmitEvent) e).getData();
98 StringDict dict = new StringDict();
99 if (result.trim().length() != 0) {
100 String[] pairs = result.split("&");
101 for (String pair : pairs) {
102 //System.out.println("pair is " + pair);
103 String[] pieces = pair.split("=");
104 String attr = PApplet.urlDecode(pieces[0]);
105 String valu = PApplet.urlDecode(pieces[1]);
106 dict.set(attr, valu);
107 }
108 }
109 //dict.print();
110 handleSubmit(dict);
111
112 } else if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
113 //System.out.println("clicked " + e.getURL());
114 handleLink(e.getURL().toExternalForm());
115 }
116 }
117 });
118 }
119

Callers

nothing calls this directly

Calls 6

urlDecodeMethod · 0.95
setMethod · 0.95
handleSubmitMethod · 0.95
handleLinkMethod · 0.95
splitMethod · 0.80
trimMethod · 0.45

Tested by

no test coverage detected