Package org.apache.fop.layoutmgr

Examples of org.apache.fop.layoutmgr.BlockLevelEventProducer


            int contentIPD = getTable().getInlineProgressionDimension().getOptimum(this)
                    .getLength().getValue(this);
            updateContentAreaIPDwithOverconstrainedAdjust(contentIPD);
        } else {
            if (!getTable().isAutoLayout()) {
                BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
                        getTable().getUserAgent().getEventBroadcaster());
                eventProducer.tableFixedAutoWidthNotSupported(this, getTable().getLocator());
            }
            updateContentAreaIPDwithOverconstrainedAdjust();
        }
        int sumOfColumns = columns.getSumOfColumnWidths(this);
        if (!autoLayout && sumOfColumns > getContentAreaIPD()) {
            log.debug(FONode.decorateWithContextInfo(
                    "The sum of all column widths is larger than the specified table width.",
                    getTable()));
            updateContentAreaIPDwithOverconstrainedAdjust(sumOfColumns);
        }
        int availableIPD = referenceIPD - getIPIndents();
        if (getContentAreaIPD() > availableIPD) {
            BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
                    getTable().getUserAgent().getEventBroadcaster());
            eventProducer.objectTooWide(this, getTable().getName(),
                    getContentAreaIPD(), context.getRefIPD(),
                    getTable().getLocator());
        }

        /* initialize unit to determine computed values
View Full Code Here


     private void testGetNextSimplePageMasterExhausted(boolean canResume) throws Exception {

         SimplePageMaster spm = mock(SimplePageMaster.class);
         SubSequenceSpecifier mockSinglePageMasterReference
                 = mock(SubSequenceSpecifier.class);
         BlockLevelEventProducer mockBlockLevelEventProducer = mock(BlockLevelEventProducer.class);

         // subject under test
         PageSequenceMaster pageSequenceMaster = createPageSequenceMaster(
                 mockBlockLevelEventProducer);
         pageSequenceMaster.addSubsequenceSpecifier(mockSinglePageMasterReference);
View Full Code Here

          //  of the page sequence
          SimplePageMaster mockEmptySPM = mock(SimplePageMaster.class);
          Region mockRegion = mock(Region.class);
          SinglePageMasterReference mockSinglePageMasterReference
                  = mock(SinglePageMasterReference.class);
          BlockLevelEventProducer mockBlockLevelEventProducer = mock(BlockLevelEventProducer.class);

          LayoutMasterSet mockLayoutMasterSet = mock(LayoutMasterSet.class);
          //The layout master set should return the empty page master
          when(mockLayoutMasterSet.getSimplePageMaster(anyString())).thenReturn(mockEmptySPM);
          when(mockEmptySPM.getRegion(anyInt())).thenReturn(mockRegion);
View Full Code Here

            int contentIPD = getTable().getInlineProgressionDimension().getOptimum(this)
                    .getLength().getValue(this);
            updateContentAreaIPDwithOverconstrainedAdjust(contentIPD);
        } else {
            if (!getTable().isAutoLayout()) {
                BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
                        getTable().getUserAgent().getEventBroadcaster());
                eventProducer.tableFixedAutoWidthNotSupported(this, getTable().getLocator());
            }
            updateContentAreaIPDwithOverconstrainedAdjust();
        }
        int sumOfColumns = columns.getSumOfColumnWidths(this);
        if (!autoLayout && sumOfColumns > getContentAreaIPD()) {
            log.debug(FONode.decorateWithContextInfo(
                    "The sum of all column widths is larger than the specified table width.",
                    getTable()));
            updateContentAreaIPDwithOverconstrainedAdjust(sumOfColumns);
        }
        int availableIPD = referenceIPD - getIPIndents();
        if (getContentAreaIPD() > availableIPD) {
            BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
                    getTable().getUserAgent().getEventBroadcaster());
            eventProducer.objectTooWide(this, getTable().getName(),
                    getContentAreaIPD(), context.getRefIPD(),
                    getTable().getLocator());
        }

        /* initialize unit to determine computed values
View Full Code Here

                                                    boolean isBlankPage)
                                                      throws PageProductionException {
        if (currentSubSequence == null) {
            currentSubSequence = getNextSubSequence();
            if (currentSubSequence == null) {
                BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
                        getUserAgent().getEventBroadcaster());
                eventProducer.missingSubsequencesInPageSequenceMaster(this,
                        masterName, getLocator());
            }
        }
        String pageMasterName = currentSubSequence
            .getNextPageMasterName(isOddPage, isFirstPage, isLastPage, isBlankPage);
        boolean canRecover = true;
        while (pageMasterName == null) {
            SubSequenceSpecifier nextSubSequence = getNextSubSequence();
            if (nextSubSequence == null) {
                BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
                        getUserAgent().getEventBroadcaster());
                eventProducer.pageSequenceMasterExhausted(this,
                        masterName, canRecover, getLocator());
                currentSubSequence.reset();
                canRecover = false;
            } else {
                currentSubSequence = nextSubSequence;
            }
            pageMasterName = currentSubSequence
                .getNextPageMasterName(isOddPage, isFirstPage, isLastPage, isBlankPage);
        }
        SimplePageMaster pageMaster = this.layoutMasterSet
            .getSimplePageMaster(pageMasterName);
        if (pageMaster == null) {
            BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider.get(
                    getUserAgent().getEventBroadcaster());
            eventProducer.noMatchingPageMaster(this,
                    masterName, pageMasterName, getLocator());
        }
        return pageMaster;
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.layoutmgr.BlockLevelEventProducer

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.