|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RegionHandler
Handles parse information, passed from TextParser. TextParser class generates calls of this class methods sequentially while parsing the text from top to bottom. All enterScheme and leaveScheme calls are properly enclosed, addRegion calls can inform about regions, overlapped with each other. All handler methods are called sequentially. It means, that if one of methods is called with some line number, all other calls (before endParsing event comes) can inform about events in the same, or lower line's numbers. This makes sequential tokens processing.
Method Summary | |
---|---|
void |
addRegion(int lno,
java.lang.String line,
int sx,
int ex,
Region region)
Informs handler about lexical region in line. |
void |
clearLine(int lno,
java.lang.String line)
Clear line event. |
void |
endParsing(int lno)
End of text parsing. |
void |
enterScheme(int lno,
java.lang.String line,
int sx,
int ex,
Region region,
java.lang.String scheme)
Informs handler about entering into specified scheme. |
Region |
getFilter()
Returns filter region, used by this handler. |
void |
leaveScheme(int lno,
java.lang.String line,
int sx,
int ex,
Region region,
java.lang.String scheme)
Informs handler about leaveing specified scheme. |
void |
startParsing(int lno)
Start of text parsing. |
Method Detail |
---|
Region getFilter()
void startParsing(int lno)
lno
- Start line numbervoid endParsing(int lno)
lno
- End line numbervoid clearLine(int lno, java.lang.String line)
lno
- Line numbervoid addRegion(int lno, java.lang.String line, int sx, int ex, Region region)
lno
- Current line numbersx
- Start X position of region in lineex
- End X position of region in lineregion
- Region informationvoid enterScheme(int lno, java.lang.String line, int sx, int ex, Region region, java.lang.String scheme)
region
is used to specify
scheme background region information.
If text is parsed not from the first line, this method is called
with fake parameters to compensate required scheme structure.
lno
- Current line numbersx
- Start X position of region in lineex
- End X position of region in lineregion
- Scheme Region information (background)scheme
- Additional Scheme informationvoid leaveScheme(int lno, java.lang.String line, int sx, int ex, Region region, java.lang.String scheme)
region
is used to specify
scheme background region information.
If text parse process ends, but current schemes stack is not balanced
(this can happends because of bad balanced structure of source text,
or partial text parse) this method is not called for unbalanced
levels.
lno
- Current line numbersx
- Start X position of region in lineex
- End X position of region in lineregion
- Scheme Region information (background)scheme
- Additional Scheme information
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |