protected void handleInheritedStyle( final String styleClass ) { if ( styleClass != null ) { final HashMap<String, ElementStyleSheet> report = (HashMap<String, ElementStyleSheet>) getRootHandler().getHelperObject( ReportParserUtil.HELPER_OBJ_LEGACY_STYLES ); if ( report != null ) { final ElementStyleSheet existingStyleSheet = report.get( styleClass ); if ( existingStyleSheet != null ) { element.getStyle().addDefault( existingStyleSheet ); } } } }
public void addDefault( final ElementStyleSheet sourceStyleSheet ) { super.addDefault( sourceStyleSheet ); setChangeTrackerHash( getChangeTrackerHash() * 31 + sourceStyleSheet.getChangeTrackerHash() ); setModificationCount( getModificationCount() * 31 + sourceStyleSheet.getModificationCount() ); }
/** * Starts parsing. * * @param attrs * the attributes. * @throws org.xml.sax.SAXException * if there is a parsing error. */ protected void startParsing( final PropertyAttributes attrs ) throws SAXException { final String name = attrs.getValue( getUri(), "name" ); if ( name == null ) { throw new ParseException( "Required attribute 'name' is missing.", getRootHandler().getDocumentLocator() ); } final ElementStyleSheet parent = styleSheetCollection.get( name ); if ( parent == null ) { throw new ParseException( "Specified parent stylesheet is not defined.", getRootHandler().getDocumentLocator() ); } styleSheet.addDefault( parent ); }