Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.AnchorElement


        if (!isMenuItemAllowed(menuItem)) {
            return;
        }
        if (menuItem.isLeafMenuItem()) {
            final LIElement li = Document.get().createLIElement();
            final AnchorElement a = Document.get().createAnchorElement();
            a.setTitle(menuItem.getTitle());
            a.setInnerText(menuItem.getTitle());
            a.setHref("#" + application.getPlaceHistoryMapper().getToken(menuItem.getPlace()));
            li.appendChild(a);
            panel.appendChild(li);
            menuItem.setElement(li);
        } else {
            final LIElement dropdown = Document.get().createLIElement();
            dropdown.addClassName("dropdown");
            final AnchorElement toogle = Document.get().createAnchorElement();
            toogle.setTitle(menuItem.getTitle());
            toogle.setInnerText(menuItem.getTitle());
            toogle.addClassName("dropdown-toggle");
            toogle.setAttribute("data-toggle", "dropdown");// XXX
            menuItem.setElement(dropdown);
            final UListElement dropdownMenu = Document.get().createULElement();
            dropdownMenu.addClassName("dropdown-menu");
            dropdown.appendChild(toogle);
            dropdown.appendChild(dropdownMenu);
View Full Code Here


        navHeader.addClassName("nav-header");
        sideBar.appendChild(navHeader);

        for (final MenuItem menuItem : currentMenuItem.getParent()) {
            final LIElement li = Document.get().createLIElement();
            final AnchorElement anchor = Document.get().createAnchorElement();
            anchor.setTitle(menuItem.getTitle());
            anchor.setInnerText(menuItem.getTitle());
            anchor.setHref("#" + application.getPlaceHistoryMapper().getToken(menuItem.getPlace()));
            li.appendChild(anchor);
            menuItem.setElement(li);
            sideBar.appendChild(li);

            if (menuItem == currentMenuItem) {
View Full Code Here

            RootPanel.getBodyElement().appendChild(divElement);
            divElement.setInnerHTML("<a href='" + escapeAttribute(url)
                    + "' ></a>");

            AnchorElement a = divElement.getChild(0).cast();
            String href = a.getHref();

            RootPanel.getBodyElement().removeChild(divElement);
            return href;
        } else {
            AnchorElement a = Document.get().createAnchorElement();
            a.setHref(url);
            return a.getHref();
        }
    }
View Full Code Here

    dialog.removeFromParent();
   
  }

  protected Element createButton(String text){
    AnchorElement buttonElement = Document.get().createAnchorElement();
    buttonElement.getStyle().setFontSize(12, Unit.PT);
    buttonElement.getStyle().setColor("#000");
    buttonElement.getStyle().setTextDecoration(TextDecoration.NONE);
    buttonElement.getStyle().setBackgroundColor("#ddd");
    buttonElement.getStyle().setMarginLeft(1, Unit.EM);
   
    buttonElement.getStyle().setBorderColor("black");
    buttonElement.getStyle().setBorderWidth(1, Unit.PX);
    buttonElement.getStyle().setBorderStyle(BorderStyle.SOLID);
    buttonElement.getStyle().setPadding(3, Unit.PT);
    buttonElement.setHref("#");
   
    buttonElement.setInnerText(text);
    return buttonElement;
  }
View Full Code Here

        for (Map.Entry<String, String> linkText : section.getLinks().entrySet()) {
            String href = linkText.getKey();
            String text = linkText.getValue();

            // No template / new HTML() here. We don't want nested divs. Otherwise :last-child rules won't work!
            AnchorElement link = Document.get().createAnchorElement();
            link.setHref(href);
            link.setTarget("_blank");
            link.setClassName("homepage-link");
            link.setInnerText(text);
            links.getElement().appendChild(link);
        }
        sidebarSections.add(sidebarSection);
    }
View Full Code Here

        }
        if (notification.boxStyle() != null) {
            box.addClassName(notification.boxStyle());
        }

        AnchorElement btn = DOM.createAnchor().cast();
        btn.setClassName("gtx-tray-notification-btn");
        EventUtils.addOnClickHandler(btn, new Handler<Event>() {
            @Override
            public void handle(Event event) {
                close();
            }
View Full Code Here

    valueCell.setInnerText(value);
  }

  private static AnchorElement createNewTabLink(Document document,
      String className, String href, String text) {
    final AnchorElement link = document.createAnchorElement();
    link.setClassName(className);
    link.setHref(href);
    link.setInnerText(text);
    link.setTarget("_blank");
    return link;
  }
View Full Code Here

    // Create the title element and the close link.
    Document document = myElement.getOwnerDocument();
    this.titleElement = document.createDivElement();
    titleElement.setClassName(resources.sourceViewerCss().titleText());
    AnchorElement closeLink = document.createAnchorElement();
    closeLink.setClassName(resources.sourceViewerCss().closeLink());
    closeLink.setHref("javascript:;");
    closeLink.setInnerText("Close");
    headerElem.appendChild(titleElement);
    headerElem.appendChild(closeLink);

    this.columnMarker = document.createSpanElement();
View Full Code Here

    }

    public void reSymbolize(final String sourceServer,
        final SourceViewerServer sourceViewerServer,
        final JsSymbol sourceSymbol, final SourcePresenter sourcePresenter) {
      AnchorElement resymbolizedSymbol = symbolNameCell.getOwnerDocument().createAnchorElement();
      resymbolizedSymbol.setClassName(css.resymbolizedLink());
      resymbolizedSymbol.setInnerText(sourceSymbol.getSymbolName());
      resymbolizedSymbol.setHref("javascript:;");

      symbolNameCell.appendChild(resymbolizedSymbol);
      listenerManager.manageEventListener(ClickEvent.addClickListener(
          resymbolizedSymbol, resymbolizedSymbol, new ClickListener() {
            public void onClick(ClickEvent event) {
View Full Code Here

      }

      public void reSymbolize(final String sourceServer,
          final SourceViewerServer sourceViewerServer,
          final JsSymbol sourceSymbol, final SourcePresenter sourcePresenter) {
        AnchorElement resymbolizedSymbol = bottomDiv.getOwnerDocument().createAnchorElement();
        resymbolizedSymbol.setClassName(css.resymbolizedLink());
        resymbolizedSymbol.setInnerText(sourceSymbol.getSymbolName());
        resymbolizedSymbol.setHref("javascript:;");

        bottomDiv.appendChild(resymbolizedSymbol);
        listenerManager.manageEventListener(ClickEvent.addClickListener(
            resymbolizedSymbol, resymbolizedSymbol, new ClickListener() {
              public void onClick(ClickEvent event) {
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.AnchorElement

Copyright © 2018 www.massapicom. 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.