Examples of addEventListener()


Examples of elemental.html.ButtonElement.addEventListener()

    // Create a button with an event handler that will throw an exception.
    Document doc = Browser.getDocument();
    ButtonElement btn = doc.createButtonElement();
    doc.getBody().appendChild(btn);

    btn.addEventListener(Event.CLICK, new EventListener() {
      @Override
      public void handleEvent(Event evt) {
        throw new RuntimeException("w00t!");
      }
    }, false);
View Full Code Here

Examples of elemental.html.DivElement.addEventListener()

    private Element createScrollbarElement(BaseResources.Css baseCss) {
      final DivElement scrollbarElement = Elements.createDivElement(css.scrollbar());
      scrollbarElement.addClassName(baseCss.documentScrollable());

      scrollbarElement.addEventListener(Event.SCROLL, new EventListener() {
        @Override
        public void handleEvent(Event evt) {
          setScrollTop(scrollbarElement.getScrollTop(), false);
        }
      }, false);
View Full Code Here

Examples of elemental.html.Element.addEventListener()

      rootElement.appendChild(sliderLeft);
      rootElement.appendChild(sliderSplitter);
      rootElement.appendChild(sliderRight);
      setElement(rootElement);

      rootElement.addEventListener(Event.CLICK, toggleSliderListener, false);

      new SplitterController().start();
    }

    private void setActive(boolean active) {
View Full Code Here

Examples of elemental.html.InputElement.addEventListener()

    element.appendChild(input);
    input.focus();
    input.select();

    // If we hit enter, commit the action.
    input.addEventListener(Event.KEYUP, keyListener, false);

    // If we lose focus, commit the action.
    input.addEventListener(Event.BLUR, blurListener, false);

    state = new State<D>(node, callback, input, oldLabel);
View Full Code Here

Examples of elemental.html.TextAreaElement.addEventListener()

     *
     * TODO: This isn't actually true, there could be paste events
     * of only one character. Change this to check if the event was a clipboard
     * event.
     */
    inputElement.addEventListener(EVENT_TEXTINPUT, new EventListener() {
      @Override
      public void handleEvent(Event event) {
        /*
         * TODO: figure out best event to listen to. Tried "input",
         * but see http://code.google.com/p/chromium/issues/detail?id=76516
View Full Code Here

Examples of gnu.io.SerialPort.addEventListener()

            serialPort.setSerialPortParams(baud,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);

            this.in = serialPort.getInputStream();
            this.out = serialPort.getOutputStream();

            serialPort.addEventListener(this);
            serialPort.notifyOnDataAvailable(true)
            serialPort.notifyOnBreakInterrupt(true);

            returnCode = true;
        }
View Full Code Here

Examples of gov.nist.javax.sip.stack.SIPClientTransaction.addEventListener()

                }

            }

            // The provider is the event listener for all transactions.
            ct.addEventListener(this);
            return (ClientTransaction) ct;
        } catch (IOException ex) {

            throw new TransactionUnavailableException(
                    "Could not resolve next hop or listening point unavailable! ",
View Full Code Here

Examples of gov.nist.javax.sip.stack.SIPDialog.addEventListener()

            } else {
                throw new SipException(
                        "Cannot call this method after response is received!");
            }
        }
        dialog.addEventListener(this);
        return dialog;

    }

    /**
 
View Full Code Here

Examples of gov.nist.javax.sip.stack.SIPServerTransaction.addEventListener()

                } catch (IOException ex) {
                    throw new TransactionUnavailableException(
                    "Error sending provisional response");
                }
                // So I can handle timeouts.
                transaction.addEventListener(this);
                if (isAutomaticDialogSupportEnabled()) {
                    // If automatic dialog support is enabled then
                    // this tx gets his own dialog.
                    String dialogId = sipRequest.getDialogId(true);
                    SIPDialog dialog = sipStack.getDialog(dialogId);
View Full Code Here

Examples of javax.comm.SerialPort.addEventListener()

            SerialPort serial = (SerialPort)commPort.open("Bluetooth", 10000);
            serial.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
            inStream = serial.getInputStream();
            outStream = serial.getOutputStream();
            readBuffer = new byte[32];
            serial.addEventListener(this);
            serial.notifyOnDataAvailable(true);
            serial.notifyOnBreakInterrupt(true);
            serial.notifyOnCarrierDetect(true);
            serial.notifyOnCTS(true);
            serial.notifyOnFramingError(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.