Package org.jfree.layouting.renderer.border

Examples of org.jfree.layouting.renderer.border.RenderLength


      // if height is not auto, but the width is, then use the declared height.
      else
      {
        // A percentage is now relative to the intrinsinc size.
        // And yes, I'm aware that this is not what the standard says ..
        final RenderLength blockContextWidth =
            node.getComputedLayoutProperties().getBlockContextWidth();
        height = node.getRequestedHeight().resolve(blockContextWidth.resolve(0));
      }
    }
    else
    {
      // width is not auto.
      // If the height is auto, we have to preserve the aspect ratio ..
      if (RenderLength.AUTO.equals(node.getRequestedHeight()))
      {
        if (contentSize.getWidth() > 0)
        {
          final RenderLength blockContextWidth =
              node.getComputedLayoutProperties().getBlockContextWidth();
          final long computedWidth =
              node.getRequestedWidth().resolve(blockContextWidth.resolve(0));
          // Requested height must be computed to preserve the aspect ratio.
          height = computedWidth * contentSize.getHeight()/contentSize.getWidth();
        }
        else
        {
          height = 0;
        }
      }
      else
      {
        // height is something fixed ..
        final RenderLength blockContextWidth =
            node.getComputedLayoutProperties().getBlockContextWidth();
        height = node.getRequestedHeight().resolve(blockContextWidth.resolve(0));
      }
    }
  }
View Full Code Here


    {
      return box.getBaselineDistance(ExtendedBaselineInfo.MATHEMATICAL) -
          box.getBaselineDistance(ExtendedBaselineInfo.ALPHABETHIC);
    }

    RenderLength baselineShiftResolved = node.getBaselineShiftResolved();
    if (baselineShiftResolved != null)
    {
      return baselineShiftResolved.resolve(lineHeight);
    }

    return 0;
  }
View Full Code Here

      final int baseline = TextUtility.translateAlignmentBaseline
          (alignmentAdjust, defaultBaseLine);
      return context.getBaselineDistance(baseline);
    }

    final RenderLength alLength = node.getAlignmentAdjustResolved();
    if (alLength != null)
    {
      /// this is not fully true. The line height depends on the context ..
      return alLength.resolve(lineHeight);
    }

    return context.getBaselineDistance(defaultBaseLine);
  }
View Full Code Here

TOP

Related Classes of org.jfree.layouting.renderer.border.RenderLength

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.