Examples of AttributedString


Examples of com.sun.xml.ws.security.secext10.AttributedString

                    log.log(Level.SEVERE, LogStringsMessages.WSS_1424_INVALID_USERNAME_TOKEN());
                    throw new XWSSecurityException("Password for the username has not been set");
                }
            }
            //Setting iterations in UsernameToken;
            AttributedString as =  new AttributedString();
            String iterate = Integer.toString(iterations);
            as.setValue(iterate);
            unToken.setIteration(as);
          
            byte[] salt = null;
            if (unToken.getSalt() == null) {
                 //Setting Salt in UsernameToken ;
                salt = pdk.get16ByteSalt();               
                AttributedString aString = new AttributedString();
                aString.setValue(Base64.encode(salt));
                unToken.setSalt(aString);
            } else {
                //Retrieving the salt already there in unToken;
                String decodeString = unToken.getSalt().getValue();
                String  iter = unToken.getIteration().getValue();
View Full Code Here

Examples of java.text.AttributedString

            // expensive methode, because if wrapWidth is too small => layoutList could be very large!!

            String lines[] = str.split("\\n");
            TextLayout layout;
            for (String text : lines) {
                final AttributedString attStr = new AttributedString(text);
                //attStr.addAttribute(TextAttribute.FONT, new Font ("TimesRoman", Font.PLAIN, 12));
               
                final LineBreakMeasurer measurer =
                        new LineBreakMeasurer(attStr.getIterator(),
                        metrics.getFontRenderContext());


                while ((layout = measurer.nextLayout(wrapWidth)) != null) {
                    layoutList.add(layout);
View Full Code Here

Examples of java.text.AttributedString

        char[] text = string.toCharArray();
        if (sameBaselineUpTo(font, text, 0, text.length) == text.length) {
            fastInit(text, font, attributes, frc);
        } else {
            AttributedString as = attributes == null
                ? new AttributedString(string)
                : new AttributedString(string, attributes);
            as.addAttribute(TextAttribute.FONT, font);
            standardInit(as.getIterator(), text, frc);
        }
    }
View Full Code Here

Examples of java.text.AttributedString

        char[] text = string.toCharArray();
        Font font = singleFont(text, 0, text.length, attributes);
        if (font != null) {
            fastInit(text, font, attributes, frc);
        } else {
            AttributedString as = new AttributedString(string, attributes);
            standardInit(as.getIterator(), text, frc);
        }
    }
View Full Code Here

Examples of java.text.AttributedString

   */
  public AttributedString getAttributedString()
  {
    if (attributedString == null)
    {
      attributedString = new AttributedString(sbuffer.toString());

      for(int i = runs.size() - 1; i >= 0; i--)
      {
        Run run = (Run)runs.get(i);
        if (run.startIndex != run.endIndex && run.attributes != null)
View Full Code Here

Examples of java.text.AttributedString

   */
  public AttributedString getAwtAttributedString(boolean ignoreMissingFont)
  {
    if (awtAttributedString == null)
    {
      awtAttributedString = new AttributedString(sbuffer.toString());

      for(int i = runs.size() - 1; i >= 0; i--)
      {
        Run run = (Run)runs.get(i);
        if (run.startIndex != run.endIndex && run.attributes != null)
View Full Code Here

Examples of java.text.AttributedString

    AttributedCharacterIterator paragraph = null;
   
    if (lastParagraphText == null)
    {
      paragraph =
        new AttributedString(
          " ",
          new AttributedString(
            allParagraphs,
            lastParagraphStart,
            lastParagraphStart + 1
            ).getIterator().getAttributes()
          ).getIterator();
    }
    else
    {
      paragraph =
        new AttributedString(
          allParagraphs,
          lastParagraphStart,
          lastParagraphStart + lastParagraphText.length()
          ).getIterator();
    }
View Full Code Here

Examples of java.text.AttributedString

    )
  {
    //truncate the original line at char
    measuredState = prevMeasuredState.cloneState();
    AttributedCharacterIterator lineParagraph =
      new AttributedString(
        allParagraphs,
        measuredState.textOffset,
        paragraphOffset + paragraphText.length()
        ).getIterator();
    LineBreakMeasurer lineMeasurer =
View Full Code Here

Examples of java.text.AttributedString

    do
    {
      measuredState = prevMeasuredState.cloneState();

      String text = lineText.substring(0, linePosition) + truncateSuffx;
      AttributedString attributedText = new AttributedString(text);
     
      //set original attributes for the text part
      AttributedCharacterIterator lineAttributes =
        new AttributedString(
          allParagraphs,
          measuredState.textOffset,
          measuredState.textOffset + linePosition
          ).getIterator();
      setAttributes(attributedText, lineAttributes, 0);
     
      //set global attributes for the suffix part
      setAttributes(
        attributedText,
        globalAttributes,
        text.length() - truncateSuffx.length(),
        text.length()
        );
     
      AttributedCharacterIterator lineParagraph = attributedText.getIterator();
     
      BreakIterator breakIterator =
        isToTruncateAtChar()
        ? BreakIterator.getCharacterInstance()
        : BreakIterator.getLineInstance();
View Full Code Here

Examples of java.text.AttributedString

              // at second attempt we give up to avoid infinite loop
              nextTabStopHolder[0] = null;
              requireNextWordHolder[0] = false;
             
              //provide dummy maxFontSize because it is used for the line height of this empty line when attempting drawing below
               AttributedString tmpText =
                new AttributedString(
                  paragraph,
                  startIndex,
                  startIndex + 1
                  );
               LineBreakMeasurer lbm = new LineBreakMeasurer(tmpText.getIterator(), getFontRenderContext());
               TextLayout tlyt = lbm.nextLayout(100);
              maxAscent = tlyt.getAscent();
              maxDescent = tlyt.getDescent();
              maxLeading = tlyt.getLeading();
            }
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.