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

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


                         final LayoutContext context)
  {
    super(0, 0, true);
    this.definition = definition;

    final CSSValue value = context.getValue(TableStyleKeys.COL_SPAN);
    this.colspan = (int) CSSValueResolverUtility.getNumericValue(value, 1);
  }
View Full Code Here


  }

  public void appyStyle(final LayoutContext context, final OutputProcessorMetaData metaData)
  {
    super.appyStyle(context, metaData);
    final CSSValue value = context.getValue(TableStyleKeys.COL_SPAN);
    this.colspan = (int) CSSValueResolverUtility.getNumericValue(value, 1);
  }
View Full Code Here

  public void appyStyle(final LayoutContext context, final OutputProcessorMetaData metaData)
  {
    super.appyStyle(context, metaData);
    // This one is a special value here ...

    final CSSValue csValue = context.getValue(TableStyleKeys.COL_SPAN);
    this.colSpan = (int) CSSValueResolverUtility.getNumericValue(csValue, 1);

    final CSSValue rsValue = context.getValue(TableStyleKeys.ROW_SPAN);
    this.rowSpan = (int) CSSValueResolverUtility.getNumericValue(rsValue, 1);
  }
View Full Code Here

  public void appyStyle(final LayoutContext layoutContext,
                        final OutputProcessorMetaData metaData)
  {
    super.appyStyle(layoutContext, metaData);
    final CSSValue emptyCellsVal = layoutContext.getValue
            (TableStyleKeys.EMPTY_CELLS);
    tableInfo.setDisplayEmptyCells(EmptyCells.SHOW.equals(emptyCellsVal));

    final CSSValue borderModel =
            layoutContext.getValue(TableStyleKeys.BORDER_COLLAPSE);
    tableInfo.setCollapsingBorderModel(BorderCollapse.COLLAPSE.equals(borderModel));

    final CSSValue layoutModel =
            layoutContext.getValue(TableStyleKeys.TABLE_LAYOUT);
    tableInfo.setAutoLayout (TableLayout.AUTO.equals(layoutModel));

    final CSSValue borderSpacingVal =
            layoutContext.getValue(TableStyleKeys.BORDER_SPACING);

    if (borderSpacingVal instanceof CSSValuePair)
    {
      final CSSValuePair borderSpacingPair = (CSSValuePair) borderSpacingVal;
View Full Code Here

    final FontSpecification fontSpecification = context.getFontSpecification();
    final FontMetrics fontMetrics = metaData.getFontMetrics(fontSpecification);
    staticBoxLayoutProperties.setNominalBaselineInfo
        (TextUtility.createBaselineInfo('x', fontMetrics));

    final CSSValue widowsValue = context.getValue(PageStyleKeys.WIDOWS);
    staticBoxLayoutProperties.setWidows(Math.max(1, (int)
        CSSValueResolverUtility.getNumericValue(widowsValue, 0)));

    final CSSValue orphansValue = context.getValue(PageStyleKeys.ORPHANS);
    staticBoxLayoutProperties.setOrphans(Math.max(1, (int)
        CSSValueResolverUtility.getNumericValue(orphansValue, 0)));

    final CSSValue pageBreak = context.getValue(PageStyleKeys.PAGE_BREAK_INSIDE);
    staticBoxLayoutProperties.setAvoidPagebreakInside
        (PageBreak.AVOID.equals(pageBreak));
  }
View Full Code Here

  }

  public void appyStyle(final LayoutContext context, final OutputProcessorMetaData metaData)
  {
    super.appyStyle(context, metaData);
    final CSSValue position =
            context.getValue(ListStyleKeys.LIST_STYLE_POSITION);
    this.outside = ListStylePosition.OUTSIDE.equals(position);
  }
View Full Code Here

      {
        return FunctionUtilities.loadResource(layoutProcess, strVal);
      }
      else if ("color".equals(type))
      {
        final CSSValue colorValue = ColorUtil.parseColor(strVal);
        if (colorValue == null)
        {
          throw new FunctionEvaluationException();
        }
        return colorValue;
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)
    {
      return value;
    }
    if (value instanceof CSSStringValue == false)
View Full Code Here

  public static String resolveString(final LayoutProcess layoutProcess,
                                 final LayoutElement layoutElement,
                                 final CSSValue value)
          throws FunctionEvaluationException
  {
    final CSSValue notAFunctionAnymore =
            resolveParameter(layoutProcess, layoutElement, value);
    if (notAFunctionAnymore instanceof CSSStringValue)
    {
      final CSSStringValue strVal = (CSSStringValue) notAFunctionAnymore;
      return strVal.getValue();
    }

    // Falling back to the Value itself ..

    final String retval = notAFunctionAnymore.getCSSText();
    if (retval == null)
    {
      throw new FunctionEvaluationException
              ("Value " + notAFunctionAnymore + " is invalid");
    }
View Full Code Here

      return;
    }

    if (key != null)
    {
      final CSSValue cssValue = createValue(key, value);
      if (cssValue != null)
      {
        rule.setPropertyValue(key, cssValue);
        rule.setImportant(key, important);
        //Log.debug ("Got value " + key.getName() + " = " + cssValue + "(" + cssValue.getClass() + ") - (important = " + important + ")");
        return;
      }
    }

    final CSSCompoundValueReadHandler module =
            (CSSCompoundValueReadHandler) compoundHandlers.get(normalizedName);
    if (module == null)
    {
      if (key == null)
      {
        logger.info("Unknown style-key: Neither compound handlers nor single-value handers are registered for " + normalizedName);
        return;
      }

      logger.warn("Unparsable value: Got no valid result for " + normalizedName + " (" + value + ')');
      return; // ignore this rule ..
    }
    final Map map = module.createValues(value);
    if (map == null)
    {
      return;
    }
    final Iterator iterator = map.entrySet().iterator();
    while (iterator.hasNext())
    {
      final Map.Entry entry = (Map.Entry) iterator.next();
      final StyleKey entryKey = (StyleKey) entry.getKey();
      final CSSValue mapCssValue = (CSSValue) entry.getValue();

      rule.setPropertyValue(entryKey, mapCssValue);
      rule.setImportant(entryKey, important);
      //Log.debug ("Got value " + entryKey.getName() + " = " + mapCssValue + "(" + mapCssValue.getClass() + ") - (important = " + important + ")");
    }
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.