/** * Receive notification of the end of a font face statement. * * @throws CSSException Any CSS exception, possibly wrapping another exception. */ public void endFontFace() throws CSSException { parentRules.pop(); }
public void endRenderedCrosstabLayout() { renderedCrosstabLayouts.pop(); }
public void clearClipping() { graphics.dispose(); graphics = graphicsContexts.pop(); }
public void leaveGroup() { // logger.debug("g.leaveGroup()"); final Integer i = groupCounts.pop(); GroupKey k = keys.pop(); counts.put( k, i ); currentGroupIndex -= 1; }
/** * Receive notification of the end of a media statement. * * @param media The intended destination media for style information. * @throws CSSException Any CSS exception, possibly wrapping another exception. */ public void endMedia( SACMediaList media ) throws CSSException { parentRules.pop(); styleSheet.addRule( styleRule ); styleRule = null; }
/** * Receive notification of the end of a media statement. * * @param name The intended destination medium for style information. * @param pseudo_page the pseudo page (if any, null otherwise) * @throws CSSException Any CSS exception, possibly wrapping another exception. */ public void endPage( String name, String pseudo_page ) throws CSSException { parentRules.pop(); styleSheet.addRule( styleRule ); styleRule = null; }
public void leaveGroup() { recorder.leaveGroup(); if ( groupStarts.size() != currentGroupIndex + 1 ) { throw new IllegalStateException(); } currentGroupIndex -= 1; groupStarts.pop(); }
/** * Restores a state. The stateCount specifies the number of states to discard to find the correct one. * * @param stateCount the state count. */ public void restoreDCState( final int stateCount ) { if ( ( stateCount > 0 ) == false ) { throw new IllegalArgumentException(); } // this is contrary to Caolans description of the WMF file format, but // Batik also ignores the stateCount parameter. dcStack.pop(); getCurrentState().restoredState(); }
public BoxAlignContext closeContext() { final BoxAlignContext context = contexts.pop(); context.validate(); if ( contexts.isEmpty() ) { currentLine = null; } else { currentLine = contexts.peek(); } return context; } }
public DefaultFlowController deactivateExpressions() { final Integer counter = this.expressionsStack.peek(); final int counterRaw = counter.intValue(); if ( counterRaw == 0 ) { final DefaultFlowController fc = new DefaultFlowController( this, dataRow ); fc.expressionsStack.pop(); return fc; } final MasterDataRow dataRow = this.dataRow.derive(); final ExpressionDataRow edr = dataRow.getExpressionDataRow(); final DefaultFlowController fc = new DefaultFlowController( this, dataRow ); fc.expressionsStack.pop(); edr.popExpressions( counterRaw ); dataRow.resetDataSchema(); return fc; }
public DefaultFlowController performReturnFromSubreport() { // first, we undo the call "performSubreportQuery" and unwrap the report-data (and its corresponding stack entry) final MasterDataRow innerDrFromQuery = dataRow.deriveWithReturnFromQuery(); final DefaultFlowController fc = new DefaultFlowController( this, innerDrFromQuery ); fc.advanceRequested = fc.dataContextStack.pop().isAdvanceRequested(); // second, we undo the call "performInitSubreport" and unwrap the parameter-data (and its corresponding stack entry) final DefaultFlowController fc2 = new DefaultFlowController( fc, dataRow.getParentDataRow().derive() ); fc2.advanceRequested = fc2.dataContextStack.pop().isAdvanceRequested(); return fc2; }
protected void inspectEndSection( final ReportElement box, final boolean inlineSection ) { formatBufferStack.pop(); if ( formatBufferStack.isEmpty() ) { return; } RichTextFormat rtf = formatBufferStack.peek(); final RichTextFormat lastRtf = formatBuffer.get( formatBuffer.size() - 1 ); if ( lastRtf.getFont().equals( rtf.getFont() ) == false ) { formatBuffer.add( new RichTextFormat( getTextLength(), rtf.getFont() ) ); } } }
protected void finishInlineBox( final InlineRenderBox box ) { formatBufferStack.pop(); if ( formatBufferStack.isEmpty() ) { return; } RichTextFormat rtf = formatBufferStack.peek(); final RichTextFormat lastRtf = formatBuffer.get( formatBuffer.size() - 1 ); if ( lastRtf.getFont().equals( rtf.getFont() ) == false ) { formatBuffer.add( new RichTextFormat( getTextLength(), rtf.getFont() ) ); } }
private void performBreak() { if ( breakState instanceof FullLinebreaker == false ) { final FullLinebreaker fullBreaker = breakState.startComplexLayout(); paragraphNesting.pop(); paragraphNesting.push( fullBreaker ); breakState = fullBreaker; fullBreaker.performBreak(); } else { final FullLinebreaker fullBreaker = (FullLinebreaker) breakState; fullBreaker.performBreak(); } }
protected String[] computeFileNames( FileName file ) { final FastStack stack = new FastStack(); while ( file != null ) { final String name = file.getBaseName(); stack.push( name ); file = file.getParent(); } final int size = stack.size(); final String[] result = new String[ size ]; for ( int i = 0; i < result.length; i++ ) { result[ i ] = (String) stack.pop(); } return result; }
private RepositoryFileTreeDto searchTreeNode( FastStack<String> fullName, RepositoryFileTreeDto treeNode ) { // no more name parts to search, found file in subtree if ( fullName.size() == 0 ) { return treeNode; } // search recursively for each name part in subtree final String fileOrDirName = fullName.peek(); final List<RepositoryFileTreeDto> children = treeNode.getChildren(); for ( final RepositoryFileTreeDto child : children ) { final String childName = child.getFile().getName(); if ( fileOrDirName.equals( childName ) ) { fullName.pop(); return searchTreeNode( fullName, child ); } } // didn't find file return null; }
public DefaultFlowController performReturnFromQuery() { final ReportDataRow reportDataRow = dataRow.getReportDataRow(); if ( reportDataRow == null ) { return this; } // We dont close the report data, as some previously saved states may // still reference it. (The caching report data factory takes care of // that later.) final MasterDataRow innerDr = dataRow.deriveWithReturnFromQuery(); final DefaultFlowController fc = new DefaultFlowController( this, innerDr ); final ReportDataContext context = fc.dataContextStack.pop(); fc.dataRow = dataRow.getParentDataRow(); fc.dataRow = fc.dataRow.derive(); fc.advanceRequested = context.isAdvanceRequested(); innerDr.resetDataSchema(); return fc; }
public void resolveParent( final ReportElement element, final ElementStyleSheet resolverTarget ) { if ( designTime == false ) { final Section parentSection = element.getParentSection(); if ( parentSection == null ) { return; } final SimpleStyleSheet computedStyle = parentSection.getComputedStyle(); resolverTarget.addInherited( computedStyle ); } final FastStack<Section> parentSections = new FastStack<Section>(); ReportElement e = element; while ( e.getParentSection() != null ) { final Section section = e.getParentSection(); parentSections.push( section ); e = section; } while ( parentSections.isEmpty() == false ) { final Section section = parentSections.pop(); resolverTarget.addInherited( section.getStyle() ); } }
protected void processParagraphChilds( final ParagraphRenderBox box ) { context.push( new StyleContext( new Paragraph(), box.getStyleSheet(), metaData ) ); clearText(); super.processParagraphChilds( box ); final StyleContext currentContext = getCurrentContext(); if ( getTextLength() > 0 ) { currentContext.add( getText() ); clearText(); } context.pop(); getCurrentContext().add( currentContext.getTarget() ); }
protected boolean startInlineBox( final InlineRenderBox box ) { if ( box.getStaticBoxLayoutProperties().isVisible() == false ) { return false; } // Compare the text style .. final StyleContext currentContext = getCurrentContext(); final StyleContext boxContext = new StyleContext( currentContext.getTarget(), box.getStyleSheet(), metaData ); if ( currentContext.equals( boxContext ) == false ) { if ( getTextLength() > 0 ) { final String text = getText(); currentContext.add( text ); clearText(); } this.context.pop(); this.context.push( boxContext ); } return true; }