/** * Done parsing. * * @throws SAXException * if there is a parsing error. */ @SuppressWarnings( "deprecation" ) protected void doneParsing() throws SAXException { super.doneParsing(); if ( dataSourceReadHandler != null ) { getElement().setDataSource( (DataSource) dataSourceReadHandler.getObject() ); } else if ( templateReadHandler != null ) { getElement().setDataSource( (DataSource) templateReadHandler.getObject() ); } } }
/** * Done parsing. * * @throws org.xml.sax.SAXException * if there is a parsing error. */ protected void doneParsing() throws SAXException { if ( dataSourceHandler != null ) { element.setDataSource( (DataSource) dataSourceHandler.getObject() ); } for ( int i = 0; i < styleExpressionHandlers.size(); i++ ) { final StyleExpressionHandler handler = (StyleExpressionHandler) styleExpressionHandlers.get( i ); final StyleKey key = handler.getKey(); if ( handler.getKey() != null ) { final Expression expression = handler.getExpression(); element.setStyleExpression( key, expression ); } } element.setAttribute( AttributeNames.Core.NAMESPACE, AttributeNames.Core.SOURCE, getRootHandler().getSource() ); }
public void testElementMethods() { final Element e = new Element(); assertTrue( e.isVisible() ); e.setVisible( false ); assertTrue( e.isVisible() == false ); e.setVisible( true ); assertTrue( e.isVisible() ); try { e.setDataSource( null ); fail(); } catch ( NullPointerException npe ) { // expected, ignored } e.toString(); }
dataSource.setNullValue( getNullString() ); element.setDataSource( dataSource );
dataSource.setNullValue( getNullString() ); element.setDataSource( dataSource );