Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent); unorderedList.write(writer);
Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent); unorderedList.write(writer);
/** * Write the Metawidget output using the given Writer. * * @param initialIndent * the initialIndent that will be applied to every line. 0 for no initial indent. -1 * for no subsequent indenting either */ public void write( Writer writer, int initialIndent ) { try { mPipeline.buildWidgets( inspect() ); Writer writerToUse = writer; if ( initialIndent >= 0 ) { writerToUse = new IndentedWriter( writer, initialIndent ); } super.write( writerToUse ); } catch ( Exception e ) { throw MetawidgetException.newException( e ); } }
private void writeEndTag( Writer writer ) throws IOException { if ( mTagName == null ) { return; } if ( writer instanceof IndentedWriter ) { ( (IndentedWriter) writer ).outdent(); } writer.append( "</" ); if ( mPrefix != null ) { writer.append( mPrefix ); writer.append( StringUtils.SEPARATOR_COLON_CHAR ); } writer.append( mTagName ); writer.append( ">" ); if ( writer instanceof IndentedWriter ) { writer.append( "\r\n" ); } } }
/** * Write the Metawidget output using the given Writer. * * @param initialIndent * the initialIndent that will be applied to every line. 0 for no initial indent. -1 * for no subsequent indenting either */ public void write( Writer writer, int initialIndent ) { try { mPipeline.buildWidgets( inspect() ); Writer writerToUse = writer; if ( initialIndent >= 0 ) { writerToUse = new IndentedWriter( writer, initialIndent ); } super.write( writerToUse ); } catch ( Exception e ) { throw MetawidgetException.newException( e ); } }
private void writeEndTag( Writer writer ) throws IOException { if ( mTagName == null ) { return; } if ( writer instanceof IndentedWriter ) { ( (IndentedWriter) writer ).outdent(); } writer.append( "</" ); if ( mPrefix != null ) { writer.append( mPrefix ); writer.append( StringUtils.SEPARATOR_COLON_CHAR ); } writer.append( mTagName ); writer.append( ">" ); if ( writer instanceof IndentedWriter ) { writer.append( "\r\n" ); } } }
@Override public void write( Writer writer, int initialIndent ) { super.write( writer, initialIndent ); // FreemarkerLayout will setTextContent directly if ( mTextContent != null ) { Writer writerToUse = writer; if ( initialIndent >= 0 ) { writerToUse = new IndentedWriter( writer, initialIndent ); } try { writerToUse.write( mTextContent ); } catch ( Exception e ) { throw MetawidgetException.newException( e ); } } }
@Override public void write( Writer writer, int initialIndent ) { super.write( writer, initialIndent ); // FreemarkerLayout will setTextContent directly if ( mTextContent != null ) { Writer writerToUse = writer; if ( initialIndent >= 0 ) { writerToUse = new IndentedWriter( writer, initialIndent ); } try { writerToUse.write( mTextContent ); } catch ( Exception e ) { throw MetawidgetException.newException( e ); } } }