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

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


      ps = process.getOutputMetaData().getDefaultPageSize();
    }
    // if it is stll null, then the output target is not valid.
    // We will crash in that case ..
    final CSSValue page =
        new CSSValuePair(CSSNumericValue.createPtValue(ps.getWidth()),
            CSSNumericValue.createPtValue(ps.getHeight()));
    layoutContext.setValue(PageStyleKeys.SIZE, page);
  }
View Full Code Here


    if (value instanceof CSSValuePair == false)
    {
      return EmptyBorderCorner.getInstance();
    }

    final CSSValuePair vp = (CSSValuePair) value;
    final CSSValue first = vp.getFirstValue();
    final CSSValue second = vp.getSecondValue();

    final RenderLength width = RenderLength.convertToInternal(first, layoutContext, metaData);
    final RenderLength height = RenderLength.convertToInternal(second, layoutContext, metaData);
    if (width.getValue() > 0 && height.getValue() > 0)
    {
View Full Code Here

  {
    if (backgroundRepeats == null)
    {
      return EMPTY_BACKGROUND_REPEAT;
    }
    final CSSValuePair retval = (CSSValuePair)
            backgroundRepeats.get(i % backgroundRepeats.size());
    if (retval == null)
    {
      return EMPTY_BACKGROUND_REPEAT;
    }
View Full Code Here

  {
    if (backgroundPositions == null)
    {
      return null;
    }
    final CSSValuePair retval = (CSSValuePair)
            backgroundPositions.get(i % backgroundPositions.size());
    if (retval == null)
    {
      return null;
    }
View Full Code Here

    if (sizeVal instanceof CSSValuePair == false)
    {
      final PageSize defaultVal = metaData.getDefaultPageSize();
      return defaultVal;
    }
    final CSSValuePair valuePair = (CSSValuePair) sizeVal;
    final CSSValue firstValue = valuePair.getFirstValue();
    if (firstValue instanceof CSSNumericValue == false)
    {
      final PageSize defaultVal = metaData.getDefaultPageSize();
      return defaultVal;
    }
    final CSSValue secondValue = valuePair.getSecondValue();
    if (secondValue instanceof CSSNumericValue == false)
    {
      final PageSize defaultVal = metaData.getDefaultPageSize();
      return defaultVal;
    }
View Full Code Here

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

    if (borderSpacingVal instanceof CSSValuePair)
    {
      final CSSValuePair borderSpacingPair = (CSSValuePair) borderSpacingVal;
      tableInfo.setRowSpacing (DefaultBoxDefinitionFactory.computeWidth
              (borderSpacingPair.getFirstValue(),
                  layoutContext, metaData, false, false));
      tableInfo.setBorderSpacing (DefaultBoxDefinitionFactory.computeWidth
              (borderSpacingPair.getSecondValue(),
                  layoutContext, metaData, false, false));
    }
    else
    {
      tableInfo.setBorderSpacing(RenderLength.EMPTY);
View Full Code Here

    if (sizeValue instanceof CSSValuePair == false)
    {
      // not a valid thing ..
      return null;
    }
    final CSSValuePair sizePair = (CSSValuePair) sizeValue;
    final CSSValue firstValue = sizePair.getFirstValue();
    final CSSValue secondValue = sizePair.getSecondValue();
    final double width = CSSValueResolverUtility.convertLengthToDouble(firstValue);
    final double height = CSSValueResolverUtility.convertLengthToDouble(secondValue);
    if (width == 0 || height == 0)
    {
      return null;
View Full Code Here

      }
      return new CSSValueList(retValus);
    }
    else if (value instanceof CSSValuePair)
    {
      final CSSValuePair pair = (CSSValuePair) value;
      return new CSSValuePair
              (resolveValue(pair.getFirstValue(), element),
                      resolveValue(pair.getSecondValue(), element));
    }
    else
    {
      return value;
    }
View Full Code Here

      return false;
    }

    if (value instanceof CSSValuePair)
    {
      final CSSValuePair pair = (CSSValuePair) value;
      if (containsAttrFunction(pair.getFirstValue()))
      {
        return true;
      }
      if (containsAttrFunction(pair.getSecondValue()))
      {
        return true;
      }
      return false;
    }
View Full Code Here

            return null;
          }
        }
      }

      values.add(new CSSValuePair(horizontal, vertical));
      value = CSSValueFactory.parseComma(value);
    }

    return new CSSValueList(values);
  }
View Full Code Here

TOP

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

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.