Package com.google.wave.api

Examples of com.google.wave.api.Blip.range()


        String user = event.getModifiedBy();
        UserInfo userInfo = util.getUserInfo(user);
        if (userInfo == null) {
          appendAuthSubGadget(blip, user);
        } else {
          BlipContentRefs blipContentRefs = blip.range(annotation.getRange().getStart(), annotation
              .getRange().getEnd());
          blipContentRefs.annotate(this.HIGHLIGHT_ANNOTATION_NAME, "done");

          Set<String> participants = new HashSet<String>();
          participants.add(event.getModifiedBy());
View Full Code Here


      String name = annotation.getName();
      String value = annotation.getValue();
      if (name.equals("stocky") && value.equals("_new_")) {
        int startIndex = annotation.getRange().getStart();

        BlipContentRefs blipContentRefs = blip.range(annotation.getRange().getStart(), annotation
            .getRange().getEnd());
        blipContentRefs.annotate("stocky", "_done_");

        String annotatedContent = blipContentRefs.value().getText();
        LOG.info("annotatedContent = " + annotatedContent);
View Full Code Here

        // Replace the content with new and delete the "stocky" annotation.
        String price = String.format("$%.2f", util.getStockPrice(symbol));
        String newContent = String.format("%s[%s] ", symbol, price);
        blipContentRefs = blipContentRefs.replace(newContent);

        BlipContentRefs symbolContentRef = blip.range(startIndex, startIndex + symbol.length());
        symbolContentRef.annotate("style/color", "rgb(50,205,50)");
        symbolContentRef.annotate("style/fontWeight", "bold");

        BlipContentRefs priceContentRef = blip.range(startIndex + symbol.length() + 1, startIndex
            + symbol.length() + 1 + price.length());
View Full Code Here

        BlipContentRefs symbolContentRef = blip.range(startIndex, startIndex + symbol.length());
        symbolContentRef.annotate("style/color", "rgb(50,205,50)");
        symbolContentRef.annotate("style/fontWeight", "bold");

        BlipContentRefs priceContentRef = blip.range(startIndex + symbol.length() + 1, startIndex
            + symbol.length() + 1 + price.length());
        priceContentRef.annotate("style/color", "rgb(50,205,50)");
        priceContentRef.annotate("style/fontSize", "0.8em");
        priceContentRef.annotate("style/color", "rgb(255,0,0)");
      }
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.