|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsyntaxhighlight.ParseResult
public class ParseResult
The parser parsed result. This class include the information needed to highlight the syntax. Information includes where the content located in the document (offset and length) and what style(s) should be applied on that segment of content.
| Field Summary | |
|---|---|
protected int |
length
The length of the content. |
protected int |
offset
The start position of the content. |
protected java.util.List<java.lang.String> |
styleKeys
The style keys of the content. |
| Constructor Summary | |
|---|---|
ParseResult(int offset,
int length,
java.util.List<java.lang.String> styleKeys)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
addStyleKey(java.lang.String styleKey)
The style keys of the content. |
void |
clearStyleKeys()
The style keys of the content. |
int |
getLength()
The length of the content. |
int |
getOffset()
The start position of the content. |
java.util.List<java.lang.String> |
getStyleKeys()
The style keys for this matched result, see syntaxhighlighter.theme. |
java.lang.String |
getStyleKeysString()
Get the style keys represented by one string key, see Theme.getStylesAttributeSet(String). |
boolean |
removeStyleKey(java.lang.String styleKey)
The style keys of the content. |
void |
setLength(int length)
The length of the content. |
void |
setOffset(int offset)
The start position of the content. |
void |
setStyleKeys(java.util.List<java.lang.String> styleKeys)
The style keys of the content. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int offset
protected int length
protected java.util.List<java.lang.String> styleKeys
| Constructor Detail |
|---|
public ParseResult(int offset,
int length,
java.util.List<java.lang.String> styleKeys)
offset - the start position of the contentlength - the length of the contentstyleKeys - the style keys of the content| Method Detail |
|---|
public int getOffset()
public void setOffset(int offset)
offset - the start position of the contentpublic int getLength()
public void setLength(int length)
length - the length of the contentpublic java.lang.String getStyleKeysString()
Theme.getStylesAttributeSet(String).
public void setStyleKeys(java.util.List<java.lang.String> styleKeys)
styleKeys - the style keys of the contentpublic boolean addStyleKey(java.lang.String styleKey)
styleKey - the style key
List.add(Object)public boolean removeStyleKey(java.lang.String styleKey)
styleKey - the style key
List.remove(Object)public void clearStyleKeys()
public java.util.List<java.lang.String> getStyleKeys()
syntaxhighlighter.theme.
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||