Package elemental.html

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


          setScrollTop(scrollbarElement.getScrollTop(), false);
        }
      }, false);

      // Prevent stealing focus from scrollable.
      scrollbarElement.addEventListener(Event.MOUSEDOWN, new EventListener() {
        @Override
        public void handleEvent(Event evt) {
          evt.preventDefault();
        }
      }, false);
View Full Code Here

    private Element createScrollableElement(BaseResources.Css baseCss) {
      final DivElement scrollableElement = Elements.createDivElement(css.scrollable());
      scrollableElement.addClassName(baseCss.documentScrollable());

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

        public void handleEvent(Event evt) {
          setScrollTop(scrollableElement.getScrollTop(), false);
        }
      }, false);

      scrollableElement.addEventListener(Event.CONTEXTMENU, new EventListener() {
        @Override
        public void handleEvent(Event evt) {
          /*
           * TODO: eventually have our context menu, but for now
           * disallow browser's since it's confusing that it does not have copy
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.