use of org.w3c.dom.events.EventListener in project intellij-plugins by StepicOrg.
the class StudyBrowserWindow method initHyperlinkListener.
private void initHyperlinkListener() {
engine.getLoadWorker().stateProperty().addListener((ov, oldState, newState) -> {
if (newState == Worker.State.SUCCEEDED) {
final EventListener linkListener = makeHyperLinkListener();
addListenerToAllHyperlinkItems(linkListener);
final EventListener formListener = new FormListener(project, this);
final Document doc = engine.getDocument();
((EventTarget) doc).addEventListener(FormListener.EVENT_TYPE_SUBMIT, formListener, false);
}
});
}
use of org.w3c.dom.events.EventListener in project newsrob by marianokamp.
the class EventListenerInitializerImpl method initializeEventListeners.
/**
* This method is called by the SVG viewer
* when the scripts are loaded to register
* the listener needed.
* @param doc The current document.
*/
public void initializeEventListeners(SVGDocument doc) {
System.err.println(">>>>>>>>>>>>>>>>>>> SVGDocument : " + doc);
((EventTarget) doc.getElementById("testContent")).addEventListener("mousedown", new EventListener() {
public void handleEvent(Event evt) {
((Element) evt.getTarget()).setAttributeNS(null, "fill", "orange");
}
}, false);
}
Aggregations