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

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


                      final LayoutElement currentNode,
                      final StyleKey key)
  {
    final PageSize ps = process.getOutputMetaData().getDefaultPageSize();
    final CSSValue page =
        new CSSValuePair(CSSNumericValue.createPtValue(ps.getWidth()),
            CSSNumericValue.createPtValue(ps.getHeight()));
    currentNode.getLayoutContext().setValue(PageStyleKeys.SIZE, page);
  }
View Full Code Here


        backgroundSpecification.setBackgroundRepeat
                (i, EMPTY_BACKGROUND_REPEAT);
      }
      else
      {
        final CSSValuePair bvalue = (CSSValuePair) item;
        backgroundSpecification.setBackgroundRepeat(i, bvalue);
      }
    }
  }
View Full Code Here

      final CSSValue item = valueList.getItem(i);
      if (item instanceof CSSValuePair == false)
      {
        continue;
      }
      final 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

    // 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

    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

  protected CSSValuePair createResultList(final CSSValue firstPosition,
                                          final CSSValue secondPosition)
  {
    if (firstPosition == TOP || firstPosition == BOTTOM)
    {
      return new CSSValuePair(secondPosition, firstPosition);
    }
    else if (secondPosition == LEFT || secondPosition == RIGHT)
    {
      return new CSSValuePair(secondPosition, firstPosition);
    }
    else
    {
      return new CSSValuePair(firstPosition, secondPosition);
    }
  }
View Full Code Here

        {
          counterValue = CSSValueFactory.parseFunction(value);
          value = value.getNextLexicalUnit();
        }
      }
      counterSpecs.add(new CSSValuePair
              (new CSSConstant(identifier), counterValue));
    }

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

  protected void addToResultList (final ArrayList values,
                                  final CSSValue firstPosition,
                                  final CSSValue secondPosition)
  {
    values.add(new CSSValuePair (firstPosition, secondPosition));
  }
View Full Code Here

      {
        return null;
      }
    }

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