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

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


   }

   @Test
   public void html() {
      // Arrange
      Hyperlink link = new Hyperlink();

      // Act
      link.setHTML("<h1>test</h1>");

      // Assert
      assertEquals("<h1>test</h1>", link.getHTML());
      assertEquals(1, link.getElement().getChild(0).getChildCount());
      HeadingElement h1 = link.getElement().getChild(0).getChild(0).cast();
      assertEquals("H1", h1.getTagName());
      assertEquals("test", h1.getInnerText());
   }
View Full Code Here


   }

   @Test
   public void title() {
      // Act
      Hyperlink link = new Hyperlink();

      // Act
      link.setTitle("title");

      // Assert
      assertEquals("title", link.getTitle());
   }
View Full Code Here

    logoutAnchor = new Anchor(message.getLinkLogout());
    logoutAnchor.addStyleName(constant.getHeaderLinkStyle());
    northPanel.add(logoutAnchor);

    profileHyperlink = new Hyperlink(message.getLinkProfile(), constant.getLinkProfile());
    profileHyperlink.addStyleName(constant.getHeaderLinkStyle());
    northPanel.add(profileHyperlink);

    this.addNorth(northPanel, 60);
    this.add(tabPanel);
View Full Code Here

    this.citationCount = citeCnt;
  }

  @Override
  public Hyperlink getAuthorLink() {
    Hyperlink link = new Hyperlink();
    link.setTargetHistoryToken(NameTokens.paper+";q="+uri);
    link.setText(title);
    return link;
  }
View Full Code Here

    super.onBind();
    getEventBus().addHandler(HistoryTokenChangeEvent.getType(), new HistoryTokenChangeHandler(){
      @Override
      public void onHistoryTokenChange(HistoryTokenChangeEvent event) {
        getView().getBreadcrumbContainer().clear();
        Hyperlink h = new Hyperlink();
        h.setTargetHistoryToken(NameTokens.main);
        h.setText("Home");
        h.setStyleName("float");
        getView().getBreadcrumbContainer().add(h);
        Label l = new Label(" > ");
        l.setStyleName("float");
        getView().getBreadcrumbContainer().add(l);
        Hyperlink h1 = new Hyperlink();
        h1.setTargetHistoryToken(event.getNameToken());
        h1.setText(event.getTitle());
        h1.setStyleName("float");
        getView().getBreadcrumbContainer().add(h1);
       
      }});
  }
View Full Code Here

  public Renderable() {
  }

  @Override
  public Hyperlink getAuthorLink(){
    return new Hyperlink(displayName, NameTokens.author);
  }
View Full Code Here

    this.uri = uri;
    this.score = score;
  }
 
  public Hyperlink getAuthorLink(){
    Hyperlink link = new Hyperlink();
    link.setTargetHistoryToken(NameTokens.author+";q="+uri);
    link.setText(displayName);
    return link;
  }
View Full Code Here

        addStyleName(StaticResourceBundle.INSTANCE.coreCss().streamPluginsPanel());

        HashMap<String, String> params = new HashMap<String, String>();
        params.put("tab", "Plugins");
        params.put("action", "newPlugin");
        addPlugin = new Hyperlink("Add Plugin", Session.getInstance().generateUrl(new CreateUrlRequest(params)));

        panel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().gallery());
        panel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().galleryMaster());
        panel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().pluginsMaster());
        galleryAddOrEditContainer.addStyleName(StaticResourceBundle.INSTANCE.coreCss().settingsTab());
View Full Code Here

        Widget name;
        if (makeLinkable)
      {
    String nameUrl = Session.getInstance().generateUrl(new CreateUrlRequest(Page.GROUPS, group.getShortName()));
    name = new Hyperlink(group.getName(), nameUrl);
      }
        else
      {
    name = new Label(group.getName());
      }
View Full Code Here

        groupAbout.addStyleName(StaticResourceBundle.INSTANCE.coreCss().connectionItemInfo());

        String url;

        url = Session.getInstance().generateUrl(new CreateUrlRequest(Page.GROUPS, group.getShortName()));
        Hyperlink groupNameLink = new Hyperlink(group.getName(), url);
        groupNameLink.addStyleName(StaticResourceBundle.INSTANCE.coreCss().displayName());
        groupAbout.add(groupNameLink);

        if (null != group.getDescription())
        {
            Label about = new Label(group.getDescription());
            about.addStyleName(StaticResourceBundle.INSTANCE.coreCss().missionStatement());
            groupAbout.add(about);
        }

        FlowPanel groupMetaData = new FlowPanel();
        groupMetaData.addStyleName(StaticResourceBundle.INSTANCE.coreCss().connectionItemFollowers());

        groupMetaData.add(new HTML("Followers: <span class='" + StaticResourceBundle.INSTANCE.coreCss().light() + "'>"
                + group.getFollowersCount() + "</span>"));
        insertActionSeparator(groupMetaData);
        groupMetaData.add(new HTML("Added: <span class='" + StaticResourceBundle.INSTANCE.coreCss().light() + "'>"
                + new DateFormatter().timeAgo(group.getDateAdded(), true) + "</span>"));

        groupAbout.add(groupMetaData);

        if (!group.isPublic())
        {
            RequestAccessPanel reqAccess = new RequestAccessPanel(group.getShortName());
            groupAbout.add(reqAccess);
            groupNameLink.addStyleName(StaticResourceBundle.INSTANCE.coreCss().privateClass());
        }

        groupPanel.add(groupAbout);

        return groupPanel;
View Full Code Here

TOP

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

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.