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

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


      }
      return new CSSValueList(retValus);
    }
    else if (value instanceof CSSValuePair)
    {
      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)
    {
      CSSValuePair pair = (CSSValuePair) value;
      if (containsAttrFunction(pair.getFirstValue()))
      {
        return true;
      }
      if (containsAttrFunction(pair.getSecondValue()))
      {
        return true;
      }
      return false;
    }
View Full Code Here

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

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

    // We will crash in that case ..

    CSSValue page =

        new CSSValuePair(CSSNumericValue.createPtValue(ps.getWidth()),

            CSSNumericValue.createPtValue(ps.getHeight()));

    layoutContext.setValue(PageStyleKeys.SIZE, page);
View Full Code Here

    if (sizeValue instanceof CSSValuePair == false)
    {
      // not a valid thing ..
      return null;
    }
    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

    // this might be invalid ...
    if (BlockProgression.TB.equals(blockProgression))
    {
      if (rightToLeft)
      {
        layoutContext.setValue(key, new CSSValuePair(RIGHT_BOTTOM, LEFT_TOP));
      }
      else
      {
        layoutContext.setValue(key, new CSSValuePair(LEFT_TOP, LEFT_TOP));
      }
    }
    else if (BlockProgression.RL.equals(blockProgression))
    {
      if (rightToLeft)
      {
        layoutContext.setValue(key, new CSSValuePair(LEFT_TOP, LEFT_TOP));
      }
      else
      {
        layoutContext.setValue(key, new CSSValuePair(RIGHT_BOTTOM, LEFT_TOP));
      }
    }
    else if (BlockProgression.LR.equals(blockProgression))
    {
      if (rightToLeft)
      {
        layoutContext.setValue(key, new CSSValuePair(RIGHT_BOTTOM, RIGHT_BOTTOM));
      }
      else
      {
        layoutContext.setValue(key, new CSSValuePair(LEFT_TOP, LEFT_TOP));
      }
    }
  }
View Full Code Here

        continue;

      }

      CSSValuePair counter = (CSSValuePair) item;

      final CSSValue counterName = counter.getFirstValue();

      if (counterName instanceof CSSConstant == false)

      {

        continue;

      }



      final CSSValue counterValue = counter.getSecondValue();

      final int counterIntValue = parseCounterValue(counterValue, element);

      element.incrementCounter(counterName.getCSSText(), counterIntValue);
View Full Code Here

      else

      {

        CSSValuePair bvalue = (CSSValuePair) item;

        backgroundSpecification.setBackgroundRepeat(i, bvalue);

      }
View Full Code Here

      }

      if (pageOrientation == PageFormat.LANDSCAPE ||
          pageOrientation == PageFormat.REVERSE_LANDSCAPE)
      {
        return new CSSValuePair(CSSNumericValue.createPtValue(ps.getHeight()),
                CSSNumericValue.createPtValue(ps.getWidth()));
      }
      else
      {
        return new CSSValuePair(CSSNumericValue.createPtValue(ps.getWidth()),
                CSSNumericValue.createPtValue(ps.getHeight()));
      }
    }
    else
    {
      final CSSNumericValue horizontalWidth = (CSSNumericValue) parseWidth(value);
      if (horizontalWidth == null)
      {
        return null;
      }

      value = value.getNextLexicalUnit();

      final CSSNumericValue verticalWidth;
      if (value == null)
      {
        verticalWidth = horizontalWidth;
      }
      else
      {
        verticalWidth = (CSSNumericValue) parseWidth(value);
        if (verticalWidth == null)
        {
          return null;
        }
      }

      return new CSSValuePair (horizontalWidth, verticalWidth);
    }
  }
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.