|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.xslthl.Highlighter net.sf.xslthl.highlighters.NumberHighlighter
public class NumberHighlighter
Recognizes numbers. Accepted parameters:
123kg
will not be seen as a number. This was the default before
version 2.1
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.xslthl.Highlighter |
---|
Highlighter.IgnoreCaseComparator |
Field Summary | |
---|---|
protected String |
decimalPoint
The decimal point |
protected String |
exponent
The character to use to start the exponent |
protected boolean |
ignoreCase
Ignore case when looking for exponent and flags |
protected boolean |
letterNoFollow
|
protected boolean |
pointStarts
If true a number can start with the decimal point |
protected String |
prefix
Required prefix |
protected List<String> |
suffix
Opional suffixes |
protected String |
thousandSep
Thousand seperator |
Fields inherited from class net.sf.xslthl.Highlighter |
---|
styleName, XMLname |
Constructor Summary | |
---|---|
NumberHighlighter()
|
Method Summary | |
---|---|
String |
getDefaultStyle()
The default style name |
boolean |
highlight(CharIter in,
List<Block> out)
Perform highlighting on the current token stream. |
void |
init(Params params)
Initializer |
protected boolean |
isDigit(char ch)
Return true if it is an ascii digit |
boolean |
startsWith(CharIter in)
return true if the current character is a possible match for this highlighter |
Methods inherited from class net.sf.xslthl.Highlighter |
---|
isNewLine, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String decimalPoint
protected String thousandSep
protected String exponent
protected List<String> suffix
protected String prefix
protected boolean ignoreCase
protected boolean pointStarts
protected boolean letterNoFollow
Constructor Detail |
---|
public NumberHighlighter()
Method Detail |
---|
public void init(Params params) throws HighlighterConfigurationException
Highlighter
init
in class Highlighter
HighlighterConfigurationException
protected boolean isDigit(char ch)
ch
-
public String getDefaultStyle()
Highlighter
getDefaultStyle
in class Highlighter
public boolean startsWith(CharIter in)
Highlighter
startsWith
in class Highlighter
public boolean highlight(CharIter in, List<Block> out)
Highlighter
highlight
in class Highlighter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |