Package net.java.textilej.parser

Examples of net.java.textilej.parser.Attributes


    @Override
    public void emitPhrase() {
      String text = group(1);
      if (text != null && text.length() > 0) {
        builder.beginSpan(SpanType.MONOSPACE, new Attributes(null,"monospaced",null,null));
        parserServices.emitText(text);
        builder.endSpan();
      }
    }
View Full Code Here


    // TODO no options supported
  }

  @Override
  protected void openBlock() {
    builder.beginBlock(BlockType.QUOTE, new Attributes());
    builder.characters("\n");
  }
View Full Code Here

    } else if (tag.getTagName().equals("note")) {
      blockType = BlockType.NOTE;
    } else {
      throw new IllegalStateException(tag.getTagName());
    }
    Attributes attributes = new Attributes();
    if (title != null && title.length() > 0) {
      attributes.setTitle(title);
    }
    builder.beginBlock(blockType,attributes);
  }
View Full Code Here

    // TODO no options supported
  }

  @Override
  protected void openBlock() {
    builder.beginBlock(BlockType.PREFORMATTED, new Attributes());
    builder.beginBlock(BlockType.CODE, new Attributes());
    builder.characters("\n");
  }
View Full Code Here

      }
    }
    applyAttributes(attributes);
   
    if (attributes.getTitle() != null) {
      beginBlock(BlockType.PARAGRAPH, new Attributes());
      beginSpan(SpanType.BOLD, new Attributes());
      characters(attributes.getTitle());
      endSpan();
      endBlock();
    }
  }
View Full Code Here

  }
 
  @Override
  public void beginBlock(BlockType type, Attributes attributes) {
    if (headingLevel == 0) {
      beginHeading(1,new Attributes());
      endHeading();
    }

    String elementName;
    String[] elementNames = null;
View Full Code Here

  @Override
  public void imageLink(String href, final String imageUrl) {
    link(href,new ContentEmitter() {
      public void emit() {
        emitImage(new Attributes(),imageUrl,true);
      }
    });
  }
View Full Code Here

   
    String text = matcher.group(2);
   
    String id = matcher.group(3);
   
    Attributes attributes = new Attributes();
    attributes.setId(id);
   
    builder.beginHeading(level,attributes);
    builder.characters(text);
    builder.endHeading();
   
View Full Code Here

    ListState listState = this.listState.peek();
    if (listState.openItem) {
      builder.endBlock();
    }
    listState.openItem = true;
    builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
   
    dialect.emitMarkupLine(getParser(),state,line, offset);
   
    return -1;
  }
View Full Code Here

  }
 
  @Override
  public void beginBlock(BlockType type, Attributes attributes) {
    if (headingLevel == 0) {
      beginHeading(1,new Attributes());
      endHeading();
    }

    String elementName;
    String[] elementNames = null;
View Full Code Here

TOP

Related Classes of net.java.textilej.parser.Attributes

Copyright © 2018 www.massapicom. 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.