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

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


    this.globalY = globalY;
    this.pageContext = pageContext;

    final LayoutStyle areaDefinition =
        pageContext.getAreaDefinition(PageAreaType.CONTENT);
    final CSSValue pageValue = areaDefinition.getValue(PageStyleKeys.SIZE);
    final PageSize pageSize = PageGridUtility.lookupPageSize(pageValue, metaData);

    this.width = StrictGeomUtility.toInternalValue(pageSize.getWidth());
    this.height = StrictGeomUtility.toInternalValue(pageSize.getHeight());

    final CSSValue marginTopValue =
        areaDefinition.getValue(BoxStyleKeys.MARGIN_TOP);
    final CSSValue marginLeftValue =
        areaDefinition.getValue(BoxStyleKeys.MARGIN_LEFT);
    final CSSValue marginBottomValue =
        areaDefinition.getValue(BoxStyleKeys.MARGIN_BOTTOM);
    final CSSValue marginRightValue =
        areaDefinition.getValue(BoxStyleKeys.MARGIN_RIGHT);

    final long marginTop = computeWidth(marginTopValue, metaData).resolve(width);
    final long marginLeft  = computeWidth(marginLeftValue, metaData).resolve(width);
    final long marginBottom = computeWidth(marginBottomValue, metaData).resolve(width);
View Full Code Here


  public DefaultPageGrid(final PageContext pageContext,
                         final OutputProcessorMetaData metaData)
  {
    final LayoutStyle areaDefinition =
            pageContext.getAreaDefinition(PageAreaType.CONTENT);
    final CSSValue hspanValue = areaDefinition.getValue(PageStyleKeys.HORIZONTAL_PAGE_SPAN);
    final CSSValue vspanValue = areaDefinition.getValue(PageStyleKeys.VERTICAL_PAGE_SPAN);

    this.columns = Math.max (1, (int) CSSValueResolverUtility.getNumericValue
            (hspanValue, metaData.getHorizontalPageSpan()));
    this.rows = Math.max (1, (int) CSSValueResolverUtility.getNumericValue
            (vspanValue, metaData.getVerticalPageSpan()));
View Full Code Here

   */
  private void startCurrentElement()
      throws NormalizationException, IOException
  {
    final LayoutContext layoutContext = currentElement.getLayoutContext();
    final CSSValue displayRole = layoutContext.getValue(BoxStyleKeys.DISPLAY_ROLE);
    if (DisplayRole.NONE.equals(displayRole))
    {
      // ignore that element ..
      ignoreContext += 1;
//      Log.debug("Ignoring element (and all childs) of " +
View Full Code Here

  protected boolean generateBeforePseudoElements(final LayoutElement element)
      throws IOException, NormalizationException
  {
    final LayoutContext layoutContext = element.getLayoutContext();

    final CSSValue displayRole = layoutContext.getValue(BoxStyleKeys.DISPLAY_ROLE);
    if (DisplayRole.LIST_ITEM.equals(displayRole))
    {
      if (styleResolver.isPseudoElementStyleResolvable(element, "marker"))
      {
        startElementInternal(layoutContext.getNamespace(),
View Full Code Here

  private boolean generateOutsidePseudoElements(final LayoutElement element)
      throws IOException, NormalizationException
  {
    final LayoutContext layoutContext = element.getLayoutContext();

    final CSSValue value = layoutContext.getValue(ContentStyleKeys.MOVE_TO);
    if (MoveToValues.HERE.equals(value) == false)
    {
      // Some moved content.
      final String target;
      if (value == null)
      {
        target = null;
      }
      else if (value instanceof CSSStringValue)
      {
        final CSSStringValue sval = (CSSStringValue) value;
        target = sval.getValue();
      }
      else
      {
        target = value.getCSSText();
      }

      layoutContext.getContentSpecification().setMoveTarget(target);

      // we do not generate an alternate element, if there is no need to do so.
View Full Code Here

    final ContentToken[] strings = contentSpecification.getStrings();

    // todo: This might be invalid.

    final LayoutContext layoutContext = element.getLayoutContext();
    final CSSValue value = layoutContext.getValue(ContentStyleKeys.STRING_DEFINE);
    if (value == null)
    {
      return false;
    }
    if (value instanceof CSSValueList)
    {
      final CSSValueList list = (CSSValueList) value;
      if (list.getLength() == 0)
      {
        return false;
      }
      for (int i = 0; i < list.getLength(); i++)
      {
        final CSSValue val = list.getItem(i);
        if (val instanceof ContentsToken)
        {
          return true;
        }
      }
View Full Code Here

    if (ignoreContext == 1)
    {
      // check, what caused the trouble ..
      final LayoutContext layoutContext = currentElement.getLayoutContext();
      final CSSValue displayRole = layoutContext.getValue(BoxStyleKeys.DISPLAY_ROLE);
      if (DisplayRole.NONE.equals(displayRole))
      {
        // ok, no need to clean up.
        currentSilbling = currentElement;
        currentElement = currentElement.getParent();
View Full Code Here

      //this.initialBaselinePositions = (long[]) baselinePositions.clone();
      return delta;
    }

    // now here comes the tricky part
    final CSSValue verticalAlignment = null;//node.getVerticalAlignment();
    if (baselineInfo == null ||
        VerticalAlign.TOP.equals(verticalAlignment) ||
        VerticalAlign.BOTTOM.equals(verticalAlignment) ||
        VerticalAlign.MIDDLE.equals(verticalAlignment))
    {
View Full Code Here

    }

    breakState.add(new EndSequenceElement(inlineRenderBox));

    final ParagraphRenderBox paragraph = breakState.getParagraph();
    final CSSValue lastLineAlignment = paragraph.getLastLineAlignment();
    final CSSValue textAlignment = paragraph.getTextAlignment();
    // Todo: Start the layouting on primary sequence ...

    // This aligns all direct childs. Once that is finished, we have to
    // check, whether possibly existing inner-paragraphs are still valid
    // or whether moving them violated any of the inner-pagebreak constraints.
View Full Code Here

    final boolean[] importantFlags = elementRule.getImportantValues();
    final CSSValue[] values = elementRule.getStyleValues();
    final StyleKey[] keys = elementRule.getPropertyKeysAsArray();
    for (int i = 0; i < values.length; i++)
    {
      final CSSValue cssValue = values[i];
      if (cssValue != null)
      {
        final StyleKey propertyName = keys[i];
        setPropertyValue(propertyName, cssValue, importantFlags[i] && isImportant(propertyName));
      }
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.