Search in sources :

Example 6 with EventListener

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);
        }
    });
}
Also used : EventListener(org.w3c.dom.events.EventListener) Document(org.w3c.dom.Document) EventTarget(org.w3c.dom.events.EventTarget)

Example 7 with EventListener

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);
}
Also used : Event(org.w3c.dom.events.Event) EventListener(org.w3c.dom.events.EventListener) EventTarget(org.w3c.dom.events.EventTarget)

Aggregations

EventListener (org.w3c.dom.events.EventListener)7 EventTarget (org.w3c.dom.events.EventTarget)4 Event (org.w3c.dom.events.Event)3 MouseEvent (java.awt.event.MouseEvent)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 File (java.io.File)1 GeneralSecurityException (java.security.GeneralSecurityException)1 MessageDigest (java.security.MessageDigest)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Matcher (java.util.regex.Matcher)1 ChangeEvent (javax.swing.event.ChangeEvent)1 URIDereferencer (javax.xml.crypto.URIDereferencer)1 XMLStructure (javax.xml.crypto.XMLStructure)1 CanonicalizationMethod (javax.xml.crypto.dsig.CanonicalizationMethod)1 Manifest (javax.xml.crypto.dsig.Manifest)1 Reference (javax.xml.crypto.dsig.Reference)1 SignatureMethod (javax.xml.crypto.dsig.SignatureMethod)1 SignedInfo (javax.xml.crypto.dsig.SignedInfo)1