/** * Updates the current default namespace. * * @param nsuri the uri of the current namespace. */ protected final void pushDefaultNamespace( final String nsuri ) { namespaces.push( nsuri ); }
public RenderedCrosstabLayout startRenderedCrosstabLayout() { final RenderedCrosstabLayout layout = new RenderedCrosstabLayout(); renderedCrosstabLayouts.push( layout ); return layout; }
private void resetStates() { Arrays.fill( objects, null ); dcStack.clear(); dcStack.push( new MfDcState( this ) ); }
public void openContext( final RenderBox box ) { final BoxAlignContext context = new BoxAlignContext( box ); if ( currentLine != null ) { currentLine.addChild( context ); } contexts.push( context ); currentLine = context; }
private FastStack<String> stackName( FileName fullName ) { final FastStack<String> stack = new FastStack<String>(); while ( fullName != null ) { final String name = fullName.getBaseName().trim(); if ( !name.equals( "" ) ) { stack.push( name ); } fullName = fullName.getParent(); } return stack; }
/** * Receive notification of the beginning of a font face statement. * <p/> * The Parser will invoke this method at the beginning of every font face statement in the style sheet. there will be * a corresponding endFontFace() event for every startFontFace() event. * * @throws CSSException Any CSS exception, possibly wrapping another exception. */ public void startFontFace() throws CSSException { // font-face events are ignored for now. styleRule = new CSSFontFaceRule( styleSheet, getParentRule() ); parentRules.push( styleRule ); }
public void saveDCState() { final MfDcState currentState = getCurrentState(); dcStack.push( new MfDcState( currentState ) ); }
/** * Receive notification of the beginning of a media statement. * <p/> * The Parser will invoke this method at the beginning of every media statement in the style sheet. there will be a * corresponding endMedia() event for every startElement() event. * * @param media The intended destination media for style information. * @throws CSSException Any CSS exception, possibly wrapping another exception. */ public void startMedia( SACMediaList media ) throws CSSException { // ignore for now .. styleRule = new CSSMediaRule( styleSheet, getParentRule() ); parentRules.push( styleRule ); }
/** * Starts processing a document. * * @throws SAXException not in this implementation. */ public void startDocument() throws SAXException { this.outerScopes = new FastStack<FastStack<XmlReadHandler>>(); this.currentHandlers = new FastStack<XmlReadHandler>(); if ( rootHandler != null ) { // When dealing with the multiplexing beast, we cant define a // root handler unless we've seen the first element and all its // namespace declarations ... this.currentHandlers.push( this.rootHandler ); } }
/** * Receive notification of the beginning of a page statement. * <p/> * The Parser will invoke this method at the beginning of every page statement in the style sheet. there will be a * corresponding endPage() event for every startPage() event. * * @param name the name of the page (if any, null otherwise) * @param pseudo_page the pseudo page (if any, null otherwise) * @throws CSSException Any CSS exception, possibly wrapping another exception. */ public void startPage( String name, String pseudo_page ) throws CSSException { // Log.debug ("Page Rule: " + name + " / " + pseudo_page); // yes, we have to parse that. styleRule = new CSSPageRule( styleSheet, getParentRule(), name, pseudo_page ); parentRules.push( styleRule ); }
public void compute( final RenderBox box, final TextElementArray cell, final RTFImageCache imageCache ) { this.context.clear(); this.context.push( new StyleContext( cell, box.getStyleSheet(), metaData ) ); this.imageCache = imageCache; super.compute( box ); }
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(); } }
public void clip( final StrictBounds bounds ) { final Graphics2D g = getGraphics(); graphicsContexts.push( g ); graphics = (Graphics2D) g.create(); graphics.clip( StrictGeomUtility.createAWTRectangle( bounds ) ); }
public DefaultFlowController activateExpressions( final Expression[] expressions, final boolean preserveState ) throws ReportProcessingException { if ( expressions == null ) { throw new NullPointerException(); } final MasterDataRow dataRow = this.dataRow.derive(); final ExpressionDataRow edr = dataRow.getExpressionDataRow(); edr.pushExpressions( expressions, preserveState ); dataRow.resetDataSchema(); final DefaultFlowController fc = new DefaultFlowController( this, dataRow ); final Integer exCount = IntegerCache.getInteger( expressions.length ); fc.expressionsStack.push( exCount ); return fc; }
public void enterGroup() { currentGroupIndex += 1; groupCounts.set( currentGroupIndex, groupCounts.get( currentGroupIndex ) + 1 ); final GroupKey key = new GroupKey( groupCounts.toArray(), false ); keys.push( key ); // logger.debug("g.enterGroup(); // " + key); groupCounts.add( 0 ); }
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; }
public void enterGroup() { recorder.enterGroup(); currentGroupIndex += 1; final Group group = report.getGroup( currentGroupIndex ); groupStarts.push( new GroupStartRecord( getCurrentRow(), group.getName(), group.getGeneratedName() ) ); groupSequenceCounter.increment( currentGroupIndex ); groupSequenceCounter.set( currentGroupIndex + 1, 0 ); if ( groupStarts.size() != currentGroupIndex + 1 ) { throw new IllegalStateException(); } }
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; }