org.eclipse.mylyn.wikitext.core.parser.markup.block
Class GlossaryBlock
java.lang.Object
org.eclipse.mylyn.wikitext.core.parser.markup.Processor
org.eclipse.mylyn.wikitext.core.parser.markup.Block
org.eclipse.mylyn.wikitext.core.parser.markup.block.GlossaryBlock
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- TextileGlossaryBlock
public abstract class GlossaryBlock
- extends Block
An abstract implementation of a glossary. Emits a definition list containing all terms
defined
in the document.
Subclasses need only define {BlockBlock.canStart(String, int)
.
- Author:
- David Green
Method Summary |
String |
getStyle()
the CSS style of the glossary block |
int |
processLineContent(String line,
int offset)
Process the given line of markup starting at the provided offset. |
void |
setClosed(boolean closed)
Cause the block to be closed. |
void |
setStyle(String style)
the CSS style of the glossary block |
blockLineNumber
protected int blockLineNumber
GlossaryBlock
public GlossaryBlock()
processLineContent
public int processLineContent(String line,
int offset)
- Description copied from class:
Block
- Process the given line of markup starting at the provided offset.
- Specified by:
processLineContent
in class Block
- Parameters:
line
- the markup line to processoffset
- the offset at which to start processing
- Returns:
- a non-negative integer to indicate that processing of the block completed before the end of the line, or
-1 if the entire line was processed.
getStyle
public String getStyle()
- the CSS style of the glossary block
- Returns:
- the style, or null if the style is not defined
setStyle
public void setStyle(String style)
- the CSS style of the glossary block
- Parameters:
style
- the style, or null if the style is not defined
setClosed
public void setClosed(boolean closed)
- Description copied from class:
Block
- Cause the block to be closed. If the block is going from the open to the closed state, then the block must cause
the closed state to be propagated to the
builder
if necessary.
- Overrides:
setClosed
in class Block
Copyright © 2011 FuseSource, Corp.. All Rights Reserved.