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

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


  protected CSSValue lookupValue(final LexicalUnit value)
  {
    if (value.getLexicalUnitType() == LexicalUnit.SAC_STRING_VALUE)
    {
      return new CSSStringValue(CSSStringType.STRING, value.getStringValue());
    }
    return super.lookupValue(value);
  }
View Full Code Here


    final CSSValue value = layoutContext.getValue(PageStyleKeys.SIZE);

    String name = null;
    if (value instanceof CSSStringValue)
    {
      final CSSStringValue sval = (CSSStringValue) value;
      name = sval.getValue();
    }
    else if (value instanceof CSSConstant)
    {
      name = value.toString();
    }
View Full Code Here

          // Ignore, although this is not ok.
          Log.warn ("Invalid state after setting predefined font family.");
        }
        else if (item instanceof CSSStringValue)
        {
          final CSSStringValue sval = (CSSStringValue) item;
          final String fontName = sval.getValue();
          fs.setFontFamily(fontName);
          if (process.getOutputMetaData().isValid(fs))
          {
            return;
          }
View Full Code Here

    {
      final CSSValue item = list.getItem(i);

      if (CSSValueResolverUtility.isURI(item))
      {
        final CSSStringValue svalue = (CSSStringValue) item;
        try
        {
          final ResourceKey sourceURL = process.getResourceManager().deriveKey
                  (baseURL, svalue.getValue());
          // todo: We have to rethink the image feeding ..
//          backgroundSpecification.setBackgroundImage
//                  (i, new URLLayoutImageData(sourceURL, svalue.getValue()));
        }
        catch (ResourceKeyCreationException e)
View Full Code Here

                      final LayoutElement currentNode,
                      final StyleKey key)
  {
    final LayoutContext layoutContext = currentNode.getLayoutContext();
    final CSSValue value = layoutContext.getValue(key);
    CSSStringValue lineEllipsis = null;
    CSSStringValue blockEllipsis = null;
    if (value instanceof CSSValueList)
    {
      final 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, "..");
    }

    layoutContext.setValue(TextStyleKeys.X_BLOCK_TEXT_OVERFLOW_ELLIPSIS, blockEllipsis);
    layoutContext.setValue(TextStyleKeys.X_LINE_TEXT_OVERFLOW_ELLIPSIS, lineEllipsis);
  }
View Full Code Here


    final double number;
    if (rawValue instanceof CSSStringValue)
    {
      final CSSStringValue strVal = (CSSStringValue) rawValue;
      try
      {
        CSSNumericValue nval = FunctionUtilities.parseNumberValue(strVal.getValue());
        number = nval.getValue();
      }
      catch(FunctionEvaluationException fee)
      {
        return new StaticTextToken (strVal.getValue());
      }
    }
    else if (rawValue instanceof CSSNumericValue)
    {
      CSSNumericValue nval = (CSSNumericValue) rawValue;
View Full Code Here

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

    if (formatValue instanceof CSSStringValue == false)
    {
      return localizationContext.getDateFormat(locale);
    }

    CSSStringValue sval = (CSSStringValue) formatValue;
    DateFormat format = localizationContext.getDateFormat
            (sval.getValue(), locale);
    if (format != null)
    {
      return format;
    }
    return localizationContext.getDateFormat(locale);
View Full Code Here

      {
        target = null;
      }
      else if (value instanceof CSSStringValue)
      {
        CSSStringValue sval = (CSSStringValue) value;
        target = sval.getValue();
      }
      else
      {
        target = value.getCSSText();
      }
View Full Code Here

    if (value instanceof CSSStringValue)

    {

      CSSStringValue sval = (CSSStringValue) value;

      name = sval.getValue();

    }

    else if (value instanceof CSSConstant)
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.