For IntelliJ IDEA,
Android Studio or Eclipse



public int getGroupStartRow( final int group ) { if ( group < 0 || group >= groupStarts.size() ) { if ( groupStarts.isEmpty() ) { return 0; } final GroupStartRecord o = groupStarts.peek(); return o.getRow(); } final GroupStartRecord o = groupStarts.get( group ); return o.getRow(); } }
public BoxAlignContext closeContext() { final BoxAlignContext context = contexts.pop(); context.validate(); if ( contexts.isEmpty() ) { currentLine = null; } else { currentLine = contexts.peek(); } return context; } }
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 StyleRule getParentRule() { if ( parentRules.isEmpty() == false ) { return (StyleRule) parentRules.peek(); } return null; }
/** * Receives notification that a row of data is being processed. * * @param event * the event. */ public void itemsAdvanced( final ReportEvent event ) { if ( event.getLevel() == getDependencyLevel() ) { if ( processingStack == null || processingStack.isEmpty() ) { return; } final CrosstabSpecification state = processingStack.peek(); if ( state == null ) { return; } // this may throw an InvalidReportStateException that ends the report processing. state.add( getDataRow() ); } }
/** * Computes a set of column names starting with the deepest parent up to the member actually found on the axis. * * @param m */ public static void computeDeepColumnNames( Member m, final MemberAddingStrategy memberToNameMapping ) { final FastStack<Member> memberStack = new FastStack<Member>(); while ( m != null ) { memberStack.push( m ); m = m.getParentMember(); } while ( memberStack.isEmpty() == false ) { Member mx = memberStack.pop(); memberToNameMapping.add( mx ); } }
/** * Checks, whether the given namespace prefix is defined. * * @param prefix the namespace prefix. * @return true, if the prefix is defined, false otherwise. */ public boolean isNamespacePrefixDefined( final String prefix ) { if ( impliedNamespaces != null ) { if ( impliedNamespaces.containsValue( prefix ) ) { return true; } } if ( openTags.isEmpty() ) { return false; } final ElementLevel parent = (ElementLevel) openTags.peek(); return parent.getNamespaces().isPrefixDefined( prefix ); }
/** * Returns all namespaces as properties-collection. This reflects the currently defined namespaces, therefore calls to * writeOpenTag(..) might cause this method to return different collections. * * @return the defined namespaces. */ public Properties getNamespaces() { final Properties namespaces = new Properties(); if ( openTags.isEmpty() ) { if ( impliedNamespaces != null ) { //noinspection UseOfPropertiesAsHashtable namespaces.putAll( impliedNamespaces ); } return namespaces; } final ElementLevel parent = (ElementLevel) openTags.peek(); //noinspection UseOfPropertiesAsHashtable namespaces.putAll( parent.getNamespaces().getNamespaces() ); return namespaces; }
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() ); } }
/** * Hand control back to the previous handler. * * @param tagName the tagname. * @param uri the namespace uri of the current tag. * @throws SAXException if there is a problem with the parser. */ public void unwind( final String uri, final String tagName ) throws SAXException { // remove current handler from stack .. this.currentHandlers.pop(); if ( this.currentHandlers.isEmpty() && !this.outerScopes.isEmpty() ) { // if empty, but "recurse" had been called, then restore the old handler stack .. // but do not end the recursed element .. this.currentHandlers = this.outerScopes.pop(); } else if ( !this.currentHandlers.isEmpty() ) { // if there are some handlers open, close them too (these handlers must be delegates).. getCurrentHandler().endElement( uri, tagName ); } }
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() ) ); } }
/** * Clones the expression. The expression should be reinitialized after the cloning. * <P> * Expressions maintain no state, cloning is done at the beginning of the report processing to disconnect the * expression from any other object space. * * @return a clone of this expression. * @throws CloneNotSupportedException * this should never happen. */ public Object clone() throws CloneNotSupportedException { final CrosstabProcessorFunction cps = (CrosstabProcessorFunction) super.clone(); if ( processingStack == null || processingStack.isEmpty() ) { return cps; } cps.processingStack = processingStack.clone(); return cps; }
/** * Computes the current collection of defined namespaces. * * @return the namespaces declared at this writing position. */ protected DeclaredNamespaces computeNamespaces() { if ( openTags.isEmpty() ) { final DeclaredNamespaces namespaces = new DeclaredNamespaces(); if ( impliedNamespaces != null ) { return namespaces.add( impliedNamespaces ); } return namespaces; } final ElementLevel parent = (ElementLevel) openTags.peek(); return parent.getNamespaces(); }
/** * Checks, whether the given URI is defined as valid namespace. * * @param uri the uri of the namespace. * @return true, if there's a namespace defined, false otherwise. */ public boolean isNamespaceDefined( final String uri ) { if ( impliedNamespaces != null ) { if ( impliedNamespaces.containsKey( uri ) ) { return true; } } if ( openTags.isEmpty() ) { return false; } final ElementLevel parent = (ElementLevel) openTags.peek(); return parent.getNamespaces().isNamespaceDefined( uri ); }
/** * Computes a set of column names starting with the deepest parent up to the member actually found on the axis. * * @param m */ public static void computeDeepColumnNames( Member m, final MemberAddingStrategy memberToNameMapping ) { final FastStack<Member> memberStack = new FastStack<Member>(); while ( m != null ) { memberStack.push( m ); m = m.getParentMember(); } while ( memberStack.isEmpty() == false ) { Member mx = memberStack.pop(); memberToNameMapping.add( mx ); } }