Package org.jfree.layouting.input.style.values

Examples of org.jfree.layouting.input.style.values.CSSStringValue


        else if (item instanceof CSSStringValue)

        {

          final CSSStringValue sval = (CSSStringValue) item;

          final String fontName = sval.getValue();

          fs.setFontFamily(fontName);

          if (process.getOutputMetaData().isValid(fs))
View Full Code Here


        {

          layoutContext.setValue(ContentStyleKeys.MOVE_TO,

              new CSSStringValue(CSSStringType.STRING, "footnotes"));

          return;

        }



        // For '::alternate' pseudo-elements, if the superior parent uses

        // the 'endnote' counter in its 'content' property then the computed

        // value of 'move-to' is 'endnotes'.

        if (isCounterUsed(currentNode.getParent(), "endnote"))

        {

          layoutContext.setValue(ContentStyleKeys.MOVE_TO,

              new CSSStringValue(CSSStringType.STRING, "endnotes"));

          return;

        }



        // For '::alternate' pseudo-elements, if the superior parent uses

        // the 'section-note' counter in its 'content' property then the

        // computed value of 'move-to' is 'section-notes'.

        if (isCounterUsed(currentNode.getParent(), "section-note"))

        {

          layoutContext.setValue(ContentStyleKeys.MOVE_TO,

              new CSSStringValue(CSSStringType.STRING, "section-notes"));

          return;

        }
View Full Code Here

    final LayoutContext layoutContext = currentNode.getLayoutContext();

    final CSSValue value = layoutContext.getValue(key);

    CSSStringValue lineEllipsis = null;

    CSSStringValue blockEllipsis = null;

    if (value instanceof CSSValueList)

    {

      CSSValueList vlist = (CSSValueList) value;

      if (vlist.getLength() == 2)

      {

        lineEllipsis = filterString(vlist.getItem(0));

        blockEllipsis = filterString(vlist.getItem(1));

      }

      else if (vlist.getLength() == 1)

      {

        lineEllipsis = filterString(vlist.getItem(0));

        blockEllipsis = filterString(vlist.getItem(0));

      }

    }

    if (lineEllipsis == null)

    {

      lineEllipsis = new CSSStringValue(CSSStringType.STRING, "..");

    }

    if (blockEllipsis == null)

    {

      blockEllipsis = new CSSStringValue(CSSStringType.STRING, "..");

    }


View Full Code Here

      }



      final CSSStringValue openQuote = (CSSStringValue) openValue;

      final CSSStringValue closeQuote = (CSSStringValue) closeValue;

      quotes.add(new QuotesPair(openQuote.getValue(), closeQuote.getValue()));

    }


View Full Code Here

          final Resource resource = cssResourceValue.getValue();
          return new ResourceContentToken(resource);
        }
        else if (cssValue instanceof CSSStringValue)
        {
          final CSSStringValue sval = (CSSStringValue) cssValue;
          return new StaticTextToken (sval.getValue());
        }
        else
        {
          return new StaticTextToken (cssValue.getCSSText());
        }
View Full Code Here

      {
        contentList.add(new CSSConstant(parameters.getStringValue()));
      }
      else if (parameters.getLexicalUnitType() == LexicalUnit.SAC_STRING_VALUE)
      {
        contentList.add(new CSSStringValue(CSSStringType.STRING,
                parameters.getStringValue()));
      }
      else if (CSSValueFactory.isNumericValue(parameters))
      {
        final CSSNumericValue numericValue =
                CSSValueFactory.createNumericValue(parameters);
        if (numericValue == null)
        {
          return null;
        }
        contentList.add(numericValue);
      }
      else if (CSSValueFactory.isLengthValue(parameters))
      {
        final CSSNumericValue lengthValue =
                CSSValueFactory.createLengthValue(parameters);
        if (lengthValue == null)
        {
          return null;
        }
        contentList.add(lengthValue);
      }
      else if (parameters.getLexicalUnitType() == LexicalUnit.SAC_ATTR)
      {
        final CSSAttrFunction attrFn =
                CSSValueFactory.parseAttrFunction(parameters);
        if (attrFn == null)
        {
          return null;
        }
        contentList.add(attrFn);
      }
      else if (parameters.getLexicalUnitType() == LexicalUnit.SAC_URI)
      {
        final CSSStringValue uriValue = CSSValueFactory.createUriValue(
                parameters);
        if (uriValue == null)
        {
          return null;
        }
View Full Code Here

    {
      return null;
    }

    final String uri = value.getStringValue();
    return new CSSStringValue(CSSStringType.URI, uri);
  }
View Full Code Here

  {
    final CSSNumericValue nval;
    if (value instanceof CSSStringValue)
    {
      // I shouldn't do this, but ..
      final CSSStringValue strVal = (CSSStringValue) value;
      nval = FunctionUtilities.parseNumberValue(strVal.getValue());
    }
    else if (value instanceof CSSNumericValue == false)
    {
      throw new FunctionEvaluationException("Expected a number");
    }
View Full Code Here

  {
    final CSSNumericValue nval;
    if (value instanceof CSSStringValue)
    {
      // I shouldn't do this, but ..
      final CSSStringValue strVal = (CSSStringValue) value;
      nval = FunctionUtilities.parseNumberValue(strVal.getValue());
    }
    else if (value instanceof CSSNumericValue == false)
    {
      throw new FunctionEvaluationException("Expected a number");
    }
View Full Code Here

    if (value instanceof CSSStringValue == false)
    {
      throw new FunctionEvaluationException
              ("Not even remotely an URI: " + value);
    }
    final CSSStringValue strval = (CSSStringValue) value;
    return FunctionUtilities.loadResource(layoutProcess, strval.getValue());
  }
View Full Code Here

TOP

Related Classes of org.jfree.layouting.input.style.values.CSSStringValue

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.