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

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


      {
        return null;
      }
    }

    return new CSSValuePair(firstValue, secondValue);
  }
View Full Code Here


      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

        backgroundSpecification.setBackgroundRepeat
                (i, EMPTY_BACKGROUND_REPEAT);
      }
      else
      {
        final 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

  protected void addToResultList (final ArrayList values,
                                  final CSSValue firstPosition,
                                  final CSSValue secondPosition)
  {
    values.add(new CSSValuePair (firstPosition, secondPosition));
  }
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

                      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

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

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

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

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

    if (borderSpacingVal instanceof CSSValuePair)
    {
      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 (sizeVal instanceof CSSValuePair == false)
    {
      PageSize defaultVal = metaData.getDefaultPageSize();
      return defaultVal;
    }
    CSSValuePair valuePair = (CSSValuePair) sizeVal;
    final CSSValue firstValue = valuePair.getFirstValue();
    if (firstValue instanceof CSSNumericValue == false)
    {
      PageSize defaultVal = metaData.getDefaultPageSize();
      return defaultVal;
    }
    final CSSValue secondValue = valuePair.getSecondValue();
    if (secondValue instanceof CSSNumericValue == false)
    {
      PageSize defaultVal = metaData.getDefaultPageSize();
      return defaultVal;
    }
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.