Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.Anchor


        //so that users will know it can close (but really it can be closed from anywhere)
        //and also so that we can set focus to something within the message.
        //The div is so it can float right
        SimplePanel div = new SimplePanel();
        div.addStyleName("spiffy-dialog-caption-close");
        m_close = new Anchor();
        m_close.getElement().setId(id + "longMsg_hide");
        m_close.setHref("#");
        m_close.setTitle(STRINGS.close());
        m_close.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event)
View Full Code Here


        add(projCreator, "createSpiffy");
    }
   
    private void addAnchor(final String text, final String id, final String location)
    {
        Anchor link = new Anchor(text, "#");
        link.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event)
            {
                event.preventDefault();
View Full Code Here

        setVisible(false);

        /*
         * Add the samples anchor
         */
        Anchor samples = new Anchor(Index.getStrings().helloSpiffySample(), Index.generateNavItemURL(Index.SAMPLES_NAV_ITEM_ID));
        samples.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event)
            {
                event.preventDefault();
View Full Code Here

    /**
     * Creates a new SPSampleHeader panel
     */
    public SPSampleHeader()
    {
        Anchor logout = new Anchor(Index.getStrings().logout(), "#");
        logout.getElement().setId("header_logout");
        setLogout(logout);
        if (!Index.userLoggedIn()) {
            logout.setVisible(false);
            setWelcomeString("");           
        } else {
            String token = RESTility.getUserToken();
            int dashIdx = token.indexOf('-');
            if (dashIdx != -1) {
                setWelcomeString(Index.getStrings().welcome(token.substring(0, dashIdx)));
            } else {
                setWelcomeString(Index.getStrings().welcome(token));
            }
        }
        logout.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event)
                {
                    event.preventDefault();
                    doLogout();
                }
View Full Code Here

        favoriteStar.attachToProject(project.getProjectId());
        if (starredProjects.contains(project.getProjectId())) {
          favoriteStar.setStarredStatus(true);
        }

        Anchor nameWidget = new Anchor(project.getName());
        nameWidget.addStyleName("tty-HomePageProjectsGridProjectName");

        HorizontalPanel projectWidget = new HorizontalPanel();
        projectWidget.add(favoriteStar);
        projectWidget.add(nameWidget);
        projectWidget.addStyleName("tty-HomePageProjectsGridProject");

        nameWidget.addClickHandler(new ClickHandler() {
          @Override
          public void onClick(ClickEvent event) {
            gotoProject(project.getProjectId().toString());
          }
        });
View Full Code Here

        // Display only 100 characters of a checkin summary.
        if (linkText.length() > 100) {
          linkText = linkText.substring(0, 97) + "...";
        }

        checkinsPanel.add(new Anchor(linkText, checkin.getChangeUrl()));
      }
    }

    return checkinsPanel;
  }
View Full Code Here

    VerticalPanel panel = new VerticalPanel();
    if (testCases.size() == 0) {
      panel.add(new Label("No test cases are associated with this cell."));
    } else {
      for (TestCase testCase : testCases) {
        panel.add(new Anchor(testCase.getTitle(), testCase.getTestCaseUrl()));
      }
    }

    return panel;
  }
View Full Code Here

    long attributeId = targetCell.getParentAttribute().getAttributeId();
    long componentId = targetCell.getParentComponent().getComponentId();

    for (Bug bug : lookupByComponent.get(componentId)) {
      String linkText = "Component - " + Long.toString(bug.getExternalId()) + ": " + bug.getTitle();
      Anchor anchor = new Anchor(linkText, bug.getBugUrl());
      content.add(anchor);
    }
    for (Bug bug : lookupByAttribute.get(attributeId)) {
      String linkText = "Attribute - " + Long.toString(bug.getExternalId()) + ": " + bug.getTitle();
      Anchor anchor = new Anchor(linkText, bug.getBugUrl());
      content.add(anchor);
    }
    for (Capability capability : targetCell.getCapabilities()) {
      long capabilityId = capability.getCapabilityId();
      for (Bug bug : lookupByCapability.get(capabilityId)) {
        String linkText =
            "Capability - " + Long.toString(bug.getExternalId()) + ": " + bug.getTitle();
        Anchor anchor = new Anchor(linkText, bug.getBugUrl());
        content.add(anchor);
      }
    }
    String labelText = "Unassigned - " + unassignedBugs.size();
    Label label = new Label(labelText);
View Full Code Here

    disclosure.setOpen(false);
    disclosure.setContent(addForm);

    HorizontalPanel title = new HorizontalPanel();
    title.add(new Label(header));
    addTestAnchor = new Anchor(addText);
    addTestAnchor.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          disclosure.setOpen(!disclosure.isOpen());
        }
View Full Code Here

     String host = LinkUtil.getLinkHost(datum.getLinkUrl());
     Widget description;
     if (host != null) {
       HorizontalPanel panel = new HorizontalPanel();
       Anchor anchor = new Anchor(datum.getLinkText(), datum.getLinkUrl());
       anchor.setTarget("_blank");

       Label hostLabel = new Label(host);
       panel.add(anchor);
       panel.add(hostLabel);
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.Anchor

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.