Package javax.swing.text

Examples of javax.swing.text.MutableAttributeSet.addAttribute()


        MutableAttributeSet att = new SinkEventAttributeSet();

        if ( DoxiaUtils.isExternalLink( href  ) )
        {
            att.addAttribute( Attribute.CLASS, "externalLink" );
        }

        att.addAttribute( Attribute.HREF, HtmlTools.escapeHTML( href  ) );

        if ( target != null )
View Full Code Here


        if ( DoxiaUtils.isExternalLink( href  ) )
        {
            att.addAttribute( Attribute.CLASS, "externalLink" );
        }

        att.addAttribute( Attribute.HREF, HtmlTools.escapeHTML( href  ) );

        if ( target != null )
        {
            att.addAttribute( Attribute.TARGET, target );
        }
View Full Code Here

        att.addAttribute( Attribute.HREF, HtmlTools.escapeHTML( href  ) );

        if ( target != null )
        {
            att.addAttribute( Attribute.TARGET, target );
        }

        if ( attributes != null )
        {
            attributes.removeAttribute( Attribute.HREF.toString() );
View Full Code Here

    /** {@inheritDoc} */
    protected String getTableBlock( String cell, String caption )
    {
        // Using the same set ordering than the JVM
        MutableAttributeSet att = new SimpleAttributeSet();
        att.addAttribute( "frame", "none" );
        att.addAttribute( "rowsep", "0" );
        att.addAttribute( "colsep", "0" );

        return "<table" + SinkUtils.getAttributeString( att ) + "><title>" + caption
            + "</title>" + "<tgroup cols=\"1\"><colspec align=\"center\" />" + "<tbody><row><entry>"
View Full Code Here

    protected String getTableBlock( String cell, String caption )
    {
        // Using the same set ordering than the JVM
        MutableAttributeSet att = new SimpleAttributeSet();
        att.addAttribute( "frame", "none" );
        att.addAttribute( "rowsep", "0" );
        att.addAttribute( "colsep", "0" );

        return "<table" + SinkUtils.getAttributeString( att ) + "><title>" + caption
            + "</title>" + "<tgroup cols=\"1\"><colspec align=\"center\" />" + "<tbody><row><entry>"
            + cell  + "</entry>" + "</row>" + "</tbody></tgroup>" + "</table>";
View Full Code Here

    {
        // Using the same set ordering than the JVM
        MutableAttributeSet att = new SimpleAttributeSet();
        att.addAttribute( "frame", "none" );
        att.addAttribute( "rowsep", "0" );
        att.addAttribute( "colsep", "0" );

        return "<table" + SinkUtils.getAttributeString( att ) + "><title>" + caption
            + "</title>" + "<tgroup cols=\"1\"><colspec align=\"center\" />" + "<tbody><row><entry>"
            + cell  + "</entry>" + "</row>" + "</tbody></tgroup>" + "</table>";
    }
View Full Code Here

        write( "<!DOCTYPE html PUBLIC \"" + XHTML_TRANSITIONAL_PUBLIC_ID + "\" \"" + XHTML_TRANSITIONAL_SYSTEM_ID
            + "\">" );

        MutableAttributeSet atts = new SinkEventAttributeSet();
        atts.addAttribute( "xmlns", XHTML_NAMESPACE );

        if ( languageId != null )
        {
            atts.addAttribute( Attribute.LANG.toString(), languageId );
            atts.addAttribute( "xml:lang", languageId );
View Full Code Here

        MutableAttributeSet atts = new SinkEventAttributeSet();
        atts.addAttribute( "xmlns", XHTML_NAMESPACE );

        if ( languageId != null )
        {
            atts.addAttribute( Attribute.LANG.toString(), languageId );
            atts.addAttribute( "xml:lang", languageId );
        }

        writeStartTag( HTML, atts );
View Full Code Here

        atts.addAttribute( "xmlns", XHTML_NAMESPACE );

        if ( languageId != null )
        {
            atts.addAttribute( Attribute.LANG.toString(), languageId );
            atts.addAttribute( "xml:lang", languageId );
        }

        writeStartTag( HTML, atts );

        writeStartTag( HEAD );
View Full Code Here

    public void author_()
    {
        if ( getTextBuffer().length() > 0 )
        {
            MutableAttributeSet att = new SinkEventAttributeSet();
            att.addAttribute( Attribute.NAME, "author" );
            String text = HtmlTools.escapeHTML( getTextBuffer().toString() );
            // hack: un-escape numerical entities that have been escaped above
            // note that numerical entities should really be added as one unicode character in the first place
            text = StringUtils.replace( text, "&amp;#", "&#" );
            att.addAttribute( Attribute.CONTENT, text );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.