Package org.jfree.layouting.renderer.text

Examples of org.jfree.layouting.renderer.text.DefaultRenderableTextFactory$DefaultRenderableTextFactoryState


    if (logicalPageBox.isNormalFlowActive() == false)
    {
      // this is the first (the normal) flow. A document always starts
      // with a start-document and then a start-flow event.
      logicalPageBox.setNormalFlowActive(true);
      final DefaultRenderableTextFactory textFactory = new DefaultRenderableTextFactory(layoutProcess);
      textFactory.startText();

      final FlowContext flowContext = new FlowContext
          (textFactory, logicalPageBox.getNormalFlow());

      flowContexts.push(flowContext);
    }
    else
    {
      // now check, what flow you are. A flow-top?
      // position: running(header); New headers replace old ones.
      // how to differentiate that (so that style-definitions are not that
      // complicated.

      // For now, we keep it simple. running(header) means go to header
      final CSSValue value = context.getValue(PositioningStyleKeys.POSITION);
      if (value instanceof CSSFunctionValue)
      {
        final CSSFunctionValue fnvalue = (CSSFunctionValue) value;
        final CSSValue[] parameters = fnvalue.getParameters();
        if (parameters.length > 0)
        {
          // Todo: Oh, thats so primitive ...
          final CSSValue targetValue = parameters[0];
          startHeaderFlow(targetValue.getCSSText(), context);
          return;
        }
      }

      // The receiving element would define the content property as
      // 'content: elements(header)'

      // an ordinary flow?
      final BoxDefinition contentRoot =
          boxDefinitionFactory.createBlockBoxDefinition
              (context, layoutProcess.getOutputMetaData());

      final NormalFlowRenderBox newFlow = new NormalFlowRenderBox(contentRoot);
      newFlow.appyStyle(context, layoutProcess.getOutputMetaData());
      newFlow.setPageContext(pageContext.getPageContext());

      final RenderBox currentBox = getInsertationPoint();
      currentBox.addChild(newFlow.getPlaceHolder());
      currentBox.getNormalFlow().addFlow(newFlow);

      final DefaultRenderableTextFactory textFactory =
          new DefaultRenderableTextFactory(layoutProcess);
      textFactory.startText();

      final FlowContext flowContext = new FlowContext
          (textFactory, newFlow);

      flowContexts.push(flowContext);
View Full Code Here


      final PageAreaRenderBox footerArea = logicalPageBox.getFooterArea();
      footerArea.clear();
      footerArea.addChild(newFlow);
    }

    final DefaultRenderableTextFactory textFactory =
        new DefaultRenderableTextFactory(layoutProcess);
    textFactory.startText();

    final FlowContext flowContext = new FlowContext
        (textFactory, newFlow);

    flowContexts.push(flowContext);
View Full Code Here

    if (logicalPageBox.isNormalFlowActive() == false)
    {
      // this is the first (the normal) flow. A document always starts
      // with a start-document and then a start-flow event.
      logicalPageBox.setNormalFlowActive(true);
      final DefaultRenderableTextFactory textFactory = new DefaultRenderableTextFactory(layoutProcess);
      textFactory.startText();

      final FlowContext flowContext = new FlowContext
          (textFactory, logicalPageBox.getNormalFlow());

      flowContexts.push(flowContext);
    }
    else
    {
      // now check, what flow you are. A flow-top?
      // position: running(header); New headers replace old ones.
      // how to differentiate that (so that style-definitions are not that
      // complicated.

      // For now, we keep it simple. running(header) means go to header
      final CSSValue value = context.getValue(PositioningStyleKeys.POSITION);
      if (value instanceof CSSFunctionValue)
      {
        final CSSFunctionValue fnvalue = (CSSFunctionValue) value;
        final CSSValue[] parameters = fnvalue.getParameters();
        if (parameters.length > 0)
        {
          // Todo: Oh, thats so primitive ...
          final CSSValue targetValue = parameters[0];
          startHeaderFlow(targetValue.getCSSText(), context);
          return;
        }
      }

      // The receiving element would define the content property as
      // 'content: elements(header)'

      // an ordinary flow?
      final BoxDefinition contentRoot =
          boxDefinitionFactory.createBlockBoxDefinition
              (context, layoutProcess.getOutputMetaData());

      final NormalFlowRenderBox newFlow = new NormalFlowRenderBox(contentRoot);
      newFlow.appyStyle(context, layoutProcess.getOutputMetaData());
      newFlow.setPageContext(pageContext.getPageContext());

      final RenderBox currentBox = getInsertationPoint();
      currentBox.addChild(newFlow.getPlaceHolder());
      currentBox.getNormalFlow().addFlow(newFlow);

      final DefaultRenderableTextFactory textFactory =
          new DefaultRenderableTextFactory(layoutProcess);
      textFactory.startText();

      final FlowContext flowContext = new FlowContext
          (textFactory, newFlow);

      flowContexts.push(flowContext);
View Full Code Here

      final PageAreaRenderBox footerArea = logicalPageBox.getFooterArea();
      footerArea.clear();
      footerArea.addChild(newFlow);
    }

    final DefaultRenderableTextFactory textFactory =
        new DefaultRenderableTextFactory(layoutProcess);
    textFactory.startText();

    final FlowContext flowContext = new FlowContext
        (textFactory, newFlow);

    flowContexts.push(flowContext);
View Full Code Here

    if (logicalPageBox.isNormalFlowActive() == false)
    {
      // this is the first (the normal) flow. A document always starts
      // with a start-document and then a start-flow event.
      logicalPageBox.setNormalFlowActive(true);
      final DefaultRenderableTextFactory textFactory = new DefaultRenderableTextFactory(layoutProcess);
      textFactory.startText();

      FlowContext flowContext = new FlowContext
          (textFactory, logicalPageBox.getNormalFlow());

      flowContexts.push(flowContext);
    }
    else
    {
      // now check, what flow you are. A flow-top?
      // position: running(header); New headers replace old ones.
      // how to differentiate that (so that style-definitions are not that
      // complicated.

      // For now, we keep it simple. running(header) means go to header
      final CSSValue value = context.getValue(PositioningStyleKeys.POSITION);
      if (value instanceof CSSFunctionValue)
      {
        CSSFunctionValue fnvalue = (CSSFunctionValue) value;
        final CSSValue[] parameters = fnvalue.getParameters();
        if (parameters.length > 0)
        {
          // Todo: Oh, thats so primitive ...
          final CSSValue targetValue = parameters[0];
          startHeaderFlow(targetValue.getCSSText(), context);
          return;
        }
      }

      // The receiving element would define the content property as
      // 'content: elements(header)'

      // an ordinary flow?
      final BoxDefinition contentRoot =
          boxDefinitionFactory.createBlockBoxDefinition
              (context, layoutProcess.getOutputMetaData());

      NormalFlowRenderBox newFlow = new NormalFlowRenderBox(contentRoot);
      newFlow.appyStyle(context, layoutProcess.getOutputMetaData());
      newFlow.setPageContext(pageContext.getPageContext());

      RenderBox currentBox = getInsertationPoint();
      currentBox.addChild(newFlow.getPlaceHolder());
      currentBox.getNormalFlow().addFlow(newFlow);

      final DefaultRenderableTextFactory textFactory =
          new DefaultRenderableTextFactory(layoutProcess);
      textFactory.startText();

      FlowContext flowContext = new FlowContext
          (textFactory, newFlow);

      flowContexts.push(flowContext);
View Full Code Here

      final PageAreaRenderBox footerArea = logicalPageBox.getFooterArea();
      footerArea.clear();
      footerArea.addChild(newFlow);
    }

    final DefaultRenderableTextFactory textFactory =
        new DefaultRenderableTextFactory(layoutProcess);
    textFactory.startText();

    FlowContext flowContext = new FlowContext
        (textFactory, newFlow);

    flowContexts.push(flowContext);
View Full Code Here

TOP

Related Classes of org.jfree.layouting.renderer.text.DefaultRenderableTextFactory$DefaultRenderableTextFactoryState

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.