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

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


    setMetaAttribute(LOCALIZATION_ATTR, new DefaultLocalizationContext());
  }

  public CSSValue getStringPolicy(final String name)
  {
    final CSSValue cssValue = (CSSValue) stringPolicy.get(name);
    if (cssValue == null)
    {
      return PagePolicy.LAST;
    }
    return cssValue;
View Full Code Here


    stringPolicy.put(name, policy);
  }

  public CSSValue getCounterPolicy(final String name)
  {
    final CSSValue cssValue = (CSSValue) counterPolicy.get(name);
    if (cssValue == null)
    {
      return PagePolicy.LAST;
    }
    return cssValue;
View Full Code Here

    final CSSValue[] params = function.getParameters();
    if (params.length < 2)
    {
      throw new FunctionEvaluationException("Illegal parameter count");
    }
    final CSSValue rawValue = FunctionUtilities.resolveParameter(layoutProcess, element, params[0]);
    final String typeValue = FunctionUtilities.resolveString(layoutProcess, element, params[1]);
    final LocalizationContext localizationContext =
            DocumentContextUtility.getLocalizationContext
                    (layoutProcess.getDocumentContext());
    final LayoutContext layoutContext = element.getLayoutContext();
View Full Code Here

    final CSSValue[] params = function.getParameters();
    if (params.length != 1)
    {
      throw new FunctionEvaluationException();
    }
    final CSSValue value = FunctionUtilities.resolveParameter(layoutProcess, element, params[0]);
    if (value instanceof CSSResourceValue)
    {
      final CSSResourceValue cssResourceValue =
              (CSSResourceValue) value;
      final Resource resource = cssResourceValue.getValue();
View Full Code Here

      // position: running(header); New headers replace old ones.
      // how to differentiate that (so that style-definitions are not that
      // complicated.

      // For now, we keep it simple. running(header) means go to header
      final CSSValue value = context.getValue(PositioningStyleKeys.POSITION);
      if (value instanceof CSSFunctionValue)
      {
        final CSSFunctionValue fnvalue = (CSSFunctionValue) value;
        final CSSValue[] parameters = fnvalue.getParameters();
        if (parameters.length > 0)
        {
          // Todo: Oh, thats so primitive ...
          final CSSValue targetValue = parameters[0];
          startHeaderFlow(targetValue.getCSSText(), context);
          return;
        }
      }

      // The receiving element would define the content property as
View Full Code Here

    if (wobs.isError())
    {
      return null;
    }

    final CSSValue widthVal = context.getValue(BoxStyleKeys.WIDTH);
    final RenderLength width = DefaultBoxDefinitionFactory.computeWidth
        (widthVal, context, layoutProcess.getOutputMetaData(), true, false);

    final CSSValue heightVal = context.getValue(BoxStyleKeys.HEIGHT);
    final RenderLength height = DefaultBoxDefinitionFactory.computeWidth
        (heightVal, context, layoutProcess.getOutputMetaData(), true, false);
    final StrictDimension dims = StrictGeomUtility.createDimension
        (image.getWidth(null), image.getHeight(null));
    final CSSValue valign =
        context.getValue(LineStyleKeys.VERTICAL_ALIGN);
    return new RenderableReplacedContent(image, source, dims, width, height, valign);
  }
View Full Code Here

    {
      dims.setWidth(StrictGeomUtility.toInternalValue(preferredSize.getWidth()));
      dims.setHeight(StrictGeomUtility.toInternalValue(preferredSize.getHeight()));
    }

    final CSSValue widthVal = context.getValue(BoxStyleKeys.WIDTH);
    final RenderLength width = DefaultBoxDefinitionFactory.computeWidth
        (widthVal, context, layoutProcess.getOutputMetaData(), true, false);

    final CSSValue heightVal = context.getValue(BoxStyleKeys.HEIGHT);
    final RenderLength height = DefaultBoxDefinitionFactory.computeWidth
        (heightVal, context, layoutProcess.getOutputMetaData(), true, false);

    final CSSValue valign =
        context.getValue(LineStyleKeys.VERTICAL_ALIGN);
    return new RenderableReplacedContent(image, source, dims, width, height, valign);
  }
View Full Code Here

    if (parameters.length < 1)
    {
      return localizationContext.getDateFormat(locale);
    }

    final CSSValue formatValue = parameters[0];
    if (formatValue instanceof CSSStringValue == false)
    {
      return localizationContext.getDateFormat(locale);
    }
View Full Code Here

                                                final OutputProcessorMetaData metaData)
  {
    final Border border = borderFactory.createBorder(boxContext, metaData);
    final DefaultBoxDefinition boxDefinition = new DefaultBoxDefinition();
    boxDefinition.setBorder(border);
    final CSSValue value = boxContext.getValue(BorderStyleKeys.BACKGROUND_COLOR);
    if (value instanceof CSSColorValue)
    {
      boxDefinition.setBackgroundColor((CSSColorValue) value);
    }
    else
View Full Code Here

                                                 final OutputProcessorMetaData metaData)
  {
    final Border border = borderFactory.createBorder(boxContext, metaData);
    final DefaultBoxDefinition boxDefinition = new DefaultBoxDefinition();
    boxDefinition.setBorder(border);
    final CSSValue value = boxContext.getValue(BorderStyleKeys.BACKGROUND_COLOR);
    if (value instanceof CSSColorValue)
    {
      boxDefinition.setBackgroundColor((CSSColorValue) value);
    }
    else
View Full Code Here

TOP

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

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.