/** */ public MajorAxisParagraphBreakState() { this.contexts = new FastStack<BoxAlignContext>( 50 ); }
protected DefaultGroupingState() { this.currentGroup = -1; this.groupStarts = new FastStack<GroupStartRecord>(); }
public ParagraphLineBreakStep() { paragraphNesting = new FastStack<ParagraphLinebreaker>( 50 ); }
protected AbstractAlignmentProcessor() { this.contexts = new FastStack<RenderBox>( 50 ); this.pendingElements = new ArrayList<RenderNode>(); this.elementDimensions = AbstractAlignmentProcessor.EMPTY; this.elementPositions = AbstractAlignmentProcessor.EMPTY; }
public FastExcelTextExtractor( final ExcelColorProducer colorProducer, final ExcelFontFactory fontFactory, final CreationHelper creationHelper ) { this.colorProducer = colorProducer; this.formatBuffer = new ArrayList<RichTextFormat>(); this.fontFactory = fontFactory; this.creationHelper = creationHelper; this.formatBufferStack = new FastStack<RichTextFormat>(); }
public StyleSheetHandler() { this.namespaces = new HashMap(); this.parentRules = new FastStack(); }
public ExcelTextExtractor( final OutputProcessorMetaData metaData, final ExcelColorProducer colorProducer, final CreationHelper creationHelper, final ExcelFontFactory fontFactory ) { super( metaData ); this.creationHelper = creationHelper; this.fontFactory = fontFactory; if ( colorProducer == null ) { throw new NullPointerException(); } this.colorProducer = colorProducer; this.formatBuffer = new ArrayList<RichTextFormat>(); this.formatBufferStack = new FastStack<RichTextFormat>(); }
/** * 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 ); } }
public RTFTextExtractor( final RTFOutputProcessorMetaData metaData ) { super( metaData ); this.metaData = metaData; this.handleImages = metaData.isFeatureSupported( RTFOutputProcessorMetaData.IMAGES_ENABLED ); context = new FastStack<StyleContext>( 50 ); }
public DefaultGroupSizeRecorder() { counts = new HashMap<GroupKey, Integer>(); groupCounts = new IntList( 100 ); groupCounts.add( 0 ); currentGroupIndex = -1; keys = new FastStack<GroupKey>(); }
public LogicalPageDrawable() { this.graphicsContexts = new FastStack<Graphics2D>(); this.borderRenderer = new BorderRenderer(); this.codePointBuffer = new CodePointBuffer( 400 ); this.boxArea = new Rectangle2D.Double(); this.drawPageBackground = true; }
/** * Creates an unnamed function. Make sure the name of the function is set using {@link #setName} before the function * is added to the report's function collection. */ public DefaultOutputFunction() { this.subReportFooterTracker = new ArrayList<InstanceID>(); this.repeatingFooterValidator = new RepeatingFooterValidator(); this.pagebreakHandler = new DefaultLayoutPagebreakHandler(); this.inlineSubreports = new ArrayList<InlineSubreportMarker>(); this.outputHandlers = new FastStack<GroupOutputHandler>(); this.renderedCrosstabLayouts = new FastStack<RenderedCrosstabLayout>(); this.groupOutputHandlerFactory = new RenderedCrosstabOutputHandlerFactory(); this.elementChangeChecker = new ElementChangeChecker(); }
public DefaultFlowController( final ProcessingContext reportContext, final DataSchemaDefinition schemaDefinition, final ReportParameterValues parameters, final PerformanceMonitorContext performanceMonitorContext ) throws ReportDataFactoryException { ArgumentNullException.validate( "performanceMonitorContext", performanceMonitorContext ); if ( reportContext == null ) { throw new NullPointerException(); } if ( parameters == null ) { throw new NullPointerException(); } if ( schemaDefinition == null ) { throw new NullPointerException(); } this.performanceMonitorContext = performanceMonitorContext; this.reportContext = reportContext; this.exportDescriptor = reportContext.getExportDescriptor(); this.expressionsStack = new FastStack<Integer>( 10 ); this.dataContextStack = new FastStack<ReportDataContext>( 10 ); this.advanceRequested = false; this.parameters = parameters; this.dataRow = createDataRow( reportContext, schemaDefinition, parameters ); }
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; }
/** * Start a new handler stack and delegate to another handler. * * @param handler the handler. * @param uri the namespace uri of the current tag. * @param tagName the tag name. * @param attrs the attributes. * @throws SAXException if there is a problem with the parser. */ public void recurse( final XmlReadHandler handler, final String uri, final String tagName, final Attributes attrs ) throws SAXException { if ( handler == null ) { throw new NullPointerException(); } this.outerScopes.push( this.currentHandlers ); this.currentHandlers = new FastStack<XmlReadHandler>(); this.currentHandlers.push( handler ); handler.startElement( uri, tagName, attrs ); }
protected String[] computeFileNames( FileName file ) { final FastStack<String> stack = new FastStack<String>(); while ( file != null ) { String name; try { name = URLDecoder.decode( file.getBaseName().trim().replaceAll( "\\+", "%2B" ), "UTF-8" ); } catch ( UnsupportedEncodingException e ) { name = file.getBaseName().trim(); } if ( !"".equals( name ) ) { 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 ] = stack.pop(); } return result; }
/** * Initialize metafile for reading from the given input stream. * * @param imageWidth the target width of the image or -1 for automatic mode. * @param imageHeight the target height of the image or -1 for automatic mode. * @param in the stream from where to read. * @throws IOException if any other error occured. */ public WmfFile( final InputStream in, final int imageWidth, final int imageHeight ) throws IOException { this.in = in; this.imageWidth = imageWidth; this.imageHeight = imageHeight; records = new ArrayList(); dcStack = new FastStack( 100 ); palette = new MfPalette(); readHeader(); parseRecords(); resetStates(); }
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 void findNonAuto() { while ( result != null ) { if ( result.getNodeType() != LayoutNodeTypes.TYPE_BOX_AUTOLAYOUT ) { break; } final RenderBox box = (RenderBox) result; final RenderNode firstChild = box.getFirstChild(); if ( firstChild != null ) { if ( boxes == null ) { boxes = new FastStack<RenderBox>(); } boxes.push( box ); result = firstChild; } else { result = result.getNext(); if ( result == null && boxes != null ) { while ( boxes.isEmpty() == false ) { final RenderBox parent = boxes.pop(); result = parent.getNext(); if ( result != null ) { break; } } // at this point, result is only null if the stack is empty and we reached the end of the search. } } } }
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() ); } }