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

Examples of com.google.gwt.user.client.ui.Anchor.addStyleName()


    VerticalPanel panel = new VerticalPanel();
    panel.setWidth("100%");
    DOM.setStyleAttribute(panel.getElement(), "marginBottom", "15px");
   
    Anchor storyName = new Anchor(story.getTitle(), getStoryUrl(story));
    storyName.addStyleName("startPageStoryName");
   
    Label updateCount = getUpdateRecencyLabel(
        DateUtil.laterDate(updates.get(0).getTimestamp(), story.getLastChangeTimestamp()));
    updateCount.setWordWrap(false);
   
View Full Code Here


        Anchor a = new Anchor(text, href);
        if (id != null) {
            a.getElement().setId(id);
        }
        if (clazz != null) {
            a.addStyleName(clazz);
        }
        if (target != null) {
            a.setTarget(target);
        }
        return a;
View Full Code Here

    }

    public static Anchor a(String text, String clazz, ClickHandler... handlers) {
        Anchor a = new Anchor(text);
        if (clazz != null) {
            a.addStyleName(clazz);
        }
        for (ClickHandler handler : handlers) {
            a.addClickHandler(handler);
        }
        return a;
View Full Code Here

    DivPanel yelpAttribution = new DivPanel();
    yelpAttribution.addStyleName(_css.OneBusAwayYelpPanel());
    Anchor anchor = new Anchor(
        "<img src=\"http://static.px.yelp.com/static/20090202/i/new/developers/reviewsFromYelpRED.gif\"/>", true,
        "http://www.yelp.com/");
    anchor.addStyleName(_css.OneBusAwayYelpLink());
    yelpAttribution.add(anchor);

    _tablePanel.add(yelpAttribution);
  }
View Full Code Here

      DivWidget name = new DivWidget(entry.getName());
      name.addStyleName(_css.ActiveResultName());
      namePanel.add(name);
    } else {
      Anchor name = new Anchor(entry.getName(), entry.getUrl());
      name.addStyleName(_css.ActiveResultName());
      name.setTarget("_blank");
      namePanel.add(name);
    }

    DivWidget address = new DivWidget(getFormatedAddressForEntry(entry));
View Full Code Here

    DivPanel directionsPanel = new DivPanel();
    directionsPanel.addStyleName(_css.ActiveResultDirectionsPanel());
    panel.add(directionsPanel);

    Anchor directions = new Anchor("Get Directions Using Public Transit");
    directions.addStyleName(_css.ActiveResultDirections());
    directions.addClickHandler(new DirectionsHandler(entry));
    directionsPanel.add(directions);

    _currentDirectionWidgets.add(directions);
  }
View Full Code Here

        "(ex. \"3rd and pike\" or ");
    addressExampleLabel1.addStyleName(_css.SearchWidgetExampleLabel());
    addressPanel2.add(addressExampleLabel1);

    Anchor addressExampleLabel2 = new Anchor("use the map");
    addressExampleLabel2.addStyleName(_css.SearchWidgetExampleLabel());
    addressExampleLabel2.addClickHandler(new UseTheMapHandler());
    addressPanel2.add(addressExampleLabel2);

    SpanWidget addressExampleLabel3 = new SpanWidget(")");
    addressExampleLabel3.addStyleName(_css.SearchWidgetExampleLabel());
View Full Code Here

    for (Menu menu : Menu.values()) {
      Anchor menuItem = new Anchor();
      menuItem.setHTML(menu.description);
      menuItem.setHref(menu.url);
      menuItem.setWordWrap(false);
      menuItem.addStyleName("menuItems");
      playgroundUI.feedbackPanel.add(menuItem);
      playgroundUI.feedbackPanel.setCellWidth(menuItem, "100%");
    }
  }
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.