/** {@inheritDoc} */ protected void init() { super.init(); boxedFlag = false; }
/** {@inheritDoc} */ public void verbatim( boolean boxed ) { SinkEventAttributeSet att = new SinkEventAttributeSet(); if ( boxed ) { att.addAttribute( SinkEventAttributes.DECORATION, "boxed" ); } verbatim( att ); }
/** {@inheritDoc} */ protected void init() { super.init(); this.writer = new StringWriter(); this.headFlag = false; this.levelList = 0; this.listStyles.clear(); this.boldFlag = false; this.boldItalicOrMonodpacedFlag = false; }
public void traverse( Sink sink ) { sink.text( text, new SinkEventAttributeSet( SinkEventAttributes.DECORATION, "line-through" ) ); } }
/** * Builds a list of attributes. * * @param attributeId A unique id to identify the set of attributes. * This should correspond to the name of an attribute-set * defined in the configuration file. * @return A string that contains a list of attributes with * the values configured for the current builder. Returns the * empty string if attributeId is null or if attributeId * is not a valid identifier. */ public String getAttributeString( String attributeId ) { if ( attributeId == null ) { return ""; } reset(); addAttributes( attributeId ); return SinkUtils.getAttributeString( attributeSet ); }
private void handleAnchorStart( Sink sink, SinkEventAttributeSet attribs ) { final Object id = attribs.getAttribute( SimplifiedDocbookMarkup.ID_ATTRIBUTE ); if ( id != null ) { sink.anchor( id.toString(), attribs ); } }
public void close() { super.close(); init(); }
/** {@inheritDoc} */ protected void writeEndTag( Tag t ) { if ( this.tableCaptionXMLWriterStack.isEmpty() ) { super.writeEndTag( t ); } else { this.tableCaptionXMLWriterStack.getLast().endElement(); } }
public void traverse( Sink sink ) { sink.text( text, new SinkEventAttributeSet( SinkEventAttributes.VALIGN, "sup" ) ); } }
/** * Writes a toplink element. * * @param sink The sink to consume the event. */ private void writeTopLink( Sink sink ) { SinkEventAttributeSet atts = new SinkEventAttributeSet(); atts.addAttribute( SinkEventAttributeSet.ALIGN, "right" ); sink.paragraph( atts ); sink.link( "#top" ); sink.text( "[top]" ); sink.link_(); sink.paragraph_(); }
/** {@inheritDoc} */ protected void init() { super.init(); this.writer = new StringWriter(); this.headFlag = false; this.levelList = 0; this.listStyles.clear(); this.verbatimBoxedFlag = false; this.tableHeaderFlag = false; this.linkName = null; }
private void handleImageDataStart( Sink sink, SinkEventAttributeSet attribs ) throws XmlPullParserException { final Object fileref = attribs.getAttribute( SimplifiedDocbookMarkup.FILEREF_ATTRIBUTE ); if ( fileref == null ) { throw new XmlPullParserException( "Missing fileref attribute in imagedata!" ); } sink.figureGraphics( fileref.toString(), attribs ); }
public void traverse( Sink sink ) { sink.text( text, new SinkEventAttributeSet( SinkEventAttributes.VALIGN, "sub" ) ); } }
public void traverse( Sink sink ) { sink.text( text, new SinkEventAttributeSet( SinkEventAttributes.DECORATION, "underline" ) ); } }
/** * Writes a start tag, prepending EOL. * * @param tag The tag. * @param id An id to add. * @param name The name (value) of the id. */ protected void writeStartTag( Tag tag, String id, String name ) { writeEOL(); MutableAttributeSet att = new SinkEventAttributeSet( new String[] {id, name} ); writeStartTag( tag, att ); }
/** * Writes an empty tag, prepending EOL. * * @param tag The tag. * @param id An id to add. * @param name The name (value) of the id. */ protected void writeEmptyTag( Tag tag, String id, String name ) { MutableAttributeSet att = new SinkEventAttributeSet( new String[] {id, name} ); writeEOL(); writeSimpleTag( tag, att ); }
private static void sinkLink( Sink sink, String href ) { // The "'" argument in this JavaScript function would be escaped to "'" // sink.link( "javascript:toggleDisplay('" + toHtmlId( testCase.getFullName() ) + "');" ); sink.unknown( A.toString(), TAG_TYPE_START, new SinkEventAttributeSet( HREF, href ) ); }
/** * The default valign is <code>top</code>. * * {@inheritDoc} * @see javax.swing.text.html.HTML.Tag#TR */ public void tableRow() { MutableAttributeSet att = new SinkEventAttributeSet(); att.addAttribute( Attribute.VALIGN, "top" ); writeStartTag( TR, att ); setCellCount( 0 ); }
private static void sinkAnchor( Sink sink, String anchor ) { // Dollar '$' for nested classes is not valid character in sink.anchor() and therefore it is ignored // https://issues.apache.org/jira/browse/SUREFIRE-1443 sink.unknown( A.toString(), TAG_TYPE_START, new SinkEventAttributeSet( NAME, anchor ) ); sink.unknown( A.toString(), TAG_TYPE_END, null ); }
private void tableHeaderCell( String text, String title ) { if ( title != null ) { sink.tableHeaderCell( new SinkEventAttributeSet( SinkEventAttributes.TITLE, title ) ); } else { sink.tableHeaderCell(); } text( text ); sink.tableHeaderCell_(); }