(HyperlinkEvent e)
| 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 |
nothing calls this directly
no test coverage detected