<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0) on Wed Nov 22 10:48:22 MSK 2006 --> <TITLE> RegionHandler </TITLE> <META NAME="keywords" CONTENT="net.sf.colorer.RegionHandler interface"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="RegionHandler"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer"><B>PREV CLASS</B></A> <A HREF="../../../net/sf/colorer/Scheme.html" title="class in net.sf.colorer"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?net/sf/colorer/RegionHandler.html" target="_top"><B>FRAMES</B></A> <A HREF="RegionHandler.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> net.sf.colorer</FONT> <BR> Interface RegionHandler</H2> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/sf/colorer/editor/Outliner.html" title="class in net.sf.colorer.editor">Outliner</A>, <A HREF="../../../net/sf/colorer/eclipse/outline/ParseTreeOutliner.html" title="class in net.sf.colorer.eclipse.outline">ParseTreeOutliner</A>, <A HREF="../../../net/sf/colorer/eclipse/outline/WorkbenchOutliner.html" title="class in net.sf.colorer.eclipse.outline">WorkbenchOutliner</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>RegionHandler</B></DL> </PRE> <P> 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. <P> <P> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../net/sf/colorer/RegionHandler.html#addRegion(int, java.lang.String, int, int, net.sf.colorer.Region)">addRegion</A></B>(int lno, java.lang.String line, int sx, int ex, <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer">Region</A> region)</CODE> <BR> Informs handler about lexical region in line.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../net/sf/colorer/RegionHandler.html#clearLine(int, java.lang.String)">clearLine</A></B>(int lno, java.lang.String line)</CODE> <BR> Clear line event.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../net/sf/colorer/RegionHandler.html#endParsing(int)">endParsing</A></B>(int lno)</CODE> <BR> End of text parsing.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../net/sf/colorer/RegionHandler.html#enterScheme(int, java.lang.String, int, int, net.sf.colorer.Region, java.lang.String)">enterScheme</A></B>(int lno, java.lang.String line, int sx, int ex, <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer">Region</A> region, java.lang.String scheme)</CODE> <BR> Informs handler about entering into specified scheme.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer">Region</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../net/sf/colorer/RegionHandler.html#getFilter()">getFilter</A></B>()</CODE> <BR> Returns filter region, used by this handler.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../net/sf/colorer/RegionHandler.html#leaveScheme(int, java.lang.String, int, int, net.sf.colorer.Region, java.lang.String)">leaveScheme</A></B>(int lno, java.lang.String line, int sx, int ex, <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer">Region</A> region, java.lang.String scheme)</CODE> <BR> Informs handler about leaveing specified scheme.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../net/sf/colorer/RegionHandler.html#startParsing(int)">startParsing</A></B>(int lno)</CODE> <BR> Start of text parsing.</TD> </TR> </TABLE> <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getFilter()"><!-- --></A><H3> getFilter</H3> <PRE> <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer">Region</A> <B>getFilter</B>()</PRE> <DL> <DD>Returns filter region, used by this handler. This region is used internally to filter parser stream and speedup JNI switches. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="startParsing(int)"><!-- --></A><H3> startParsing</H3> <PRE> void <B>startParsing</B>(int lno)</PRE> <DL> <DD>Start of text parsing. Called only once, when TextParser starts parsing of the specified block of text. All other event messages comes between this call and endParsing call. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>lno</CODE> - Start line number</DL> </DD> </DL> <HR> <A NAME="endParsing(int)"><!-- --></A><H3> endParsing</H3> <PRE> void <B>endParsing</B>(int lno)</PRE> <DL> <DD>End of text parsing. Called only once, when TextParser stops parsing of the specified block of text. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>lno</CODE> - End line number</DL> </DD> </DL> <HR> <A NAME="clearLine(int, java.lang.String)"><!-- --></A><H3> clearLine</H3> <PRE> void <B>clearLine</B>(int lno, java.lang.String line)</PRE> <DL> <DD>Clear line event. Called once for each parsed text line, when TextParser starts to parse specified line of text. This method is called before any of the region information passed, and used often to clear internal handler structure of this line before adding new one. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>lno</CODE> - Line number</DL> </DD> </DL> <HR> <A NAME="addRegion(int, java.lang.String, int, int, net.sf.colorer.Region)"><!-- --></A><H3> addRegion</H3> <PRE> void <B>addRegion</B>(int lno, java.lang.String line, int sx, int ex, <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer">Region</A> region)</PRE> <DL> <DD>Informs handler about lexical region in line. This is a basic method, wich transfer information from parser to application. Positions of different passed regions can be overlapped. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>lno</CODE> - Current line number<DD><CODE>sx</CODE> - Start X position of region in line<DD><CODE>ex</CODE> - End X position of region in line<DD><CODE>region</CODE> - Region information</DL> </DD> </DL> <HR> <A NAME="enterScheme(int, java.lang.String, int, int, net.sf.colorer.Region, java.lang.String)"><!-- --></A><H3> enterScheme</H3> <PRE> void <B>enterScheme</B>(int lno, java.lang.String line, int sx, int ex, <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer">Region</A> region, java.lang.String scheme)</PRE> <DL> <DD>Informs handler about entering into specified scheme. Parameter <code>region</code> 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. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>lno</CODE> - Current line number<DD><CODE>sx</CODE> - Start X position of region in line<DD><CODE>ex</CODE> - End X position of region in line<DD><CODE>region</CODE> - Scheme Region information (background)<DD><CODE>scheme</CODE> - Additional Scheme information</DL> </DD> </DL> <HR> <A NAME="leaveScheme(int, java.lang.String, int, int, net.sf.colorer.Region, java.lang.String)"><!-- --></A><H3> leaveScheme</H3> <PRE> void <B>leaveScheme</B>(int lno, java.lang.String line, int sx, int ex, <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer">Region</A> region, java.lang.String scheme)</PRE> <DL> <DD>Informs handler about leaveing specified scheme. Parameter <code>region</code> 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 <b>not</b> called for unbalanced levels. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>lno</CODE> - Current line number<DD><CODE>sx</CODE> - Start X position of region in line<DD><CODE>ex</CODE> - End X position of region in line<DD><CODE>region</CODE> - Scheme Region information (background)<DD><CODE>scheme</CODE> - Additional Scheme information</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../net/sf/colorer/Region.html" title="class in net.sf.colorer"><B>PREV CLASS</B></A> <A HREF="../../../net/sf/colorer/Scheme.html" title="class in net.sf.colorer"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?net/sf/colorer/RegionHandler.html" target="_top"><B>FRAMES</B></A> <A HREF="RegionHandler.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright © 2003 Cail Lomecb. All Rights Reserved.</i> </BODY> </HTML>