tokenmarker.html

来自「数据挖掘方面最新软件」· HTML 代码 · 共 617 行 · 第 1/2 页

HTML
617
字号
<!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_13) on Mon Jul 14 01:35:56 CEST 2008 --><TITLE>TokenMarker (RapidMiner Class Documentation)</TITLE><META NAME="keywords" CONTENT="com.rapidminer.gui.tools.syntax.TokenMarker class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="TokenMarker (RapidMiner Class Documentation)";}</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TokenMarker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../../com/rapidminer/gui/tools/syntax/Token.html" title="class in com.rapidminer.gui.tools.syntax"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.LineInfo.html" title="class in com.rapidminer.gui.tools.syntax"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html?com/rapidminer/gui/tools/syntax/TokenMarker.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TokenMarker.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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">com.rapidminer.gui.tools.syntax</FONT><BR>Class TokenMarker</H2><PRE>java.lang.Object  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.rapidminer.gui.tools.syntax.TokenMarker</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../com/rapidminer/gui/tools/syntax/BatchFileTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">BatchFileTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/CTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">CTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/HTMLTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">HTMLTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/MakefileTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">MakefileTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/PatchTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">PatchTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/PerlTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">PerlTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/PHPTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">PHPTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/PropsTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">PropsTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/PythonTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">PythonTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/ShellScriptTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">ShellScriptTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/SQLTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">SQLTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/TeXTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">TeXTokenMarker</A>, <A HREF="../../../../../com/rapidminer/gui/tools/syntax/XMLTokenMarker.html" title="class in com.rapidminer.gui.tools.syntax">XMLTokenMarker</A></DD></DL><HR><DL><DT><PRE>public abstract class <B>TokenMarker</B><DT>extends java.lang.Object</DL></PRE><P>A token marker that splits lines of text into tokens. Each token carries a length field and an indentification tag that can be mapped to a color for painting that token. <p>  For performance reasons, the linked list of tokens is reused after each line is tokenized. Therefore, the return value of <code>markTokens</code> should only be used for immediate painting. Notably, it cannot be cached.<P><P><DL><DT><B>Version:</B></DT>  <DD>$Id: TokenMarker.java,v 1.3 2008/05/09 19:22:56 ingomierswa Exp $</DD><DT><B>Author:</B></DT>  <DD>Slava Pestov, Ingo Mierswa</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_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>Nested Class Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.LineInfo.html" title="class in com.rapidminer.gui.tools.syntax">TokenMarker.LineInfo</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inner class for storing information about tokenized lines.</TD></TR></TABLE>&nbsp;<!-- =========== FIELD SUMMARY =========== --><A NAME="field_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>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../../com/rapidminer/gui/tools/syntax/Token.html" title="class in com.rapidminer.gui.tools.syntax">Token</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#firstToken">firstToken</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The first token in the list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#lastLine">lastLine</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The last tokenized line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../../com/rapidminer/gui/tools/syntax/Token.html" title="class in com.rapidminer.gui.tools.syntax">Token</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#lastToken">lastToken</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The last token in the list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#length">length</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The number of lines in the model being tokenized.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.LineInfo.html" title="class in com.rapidminer.gui.tools.syntax">TokenMarker.LineInfo</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#lineInfo">lineInfo</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An array for storing information about lines.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#nextLineRequested">nextLineRequested</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the next line should be painted.</TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_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>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#TokenMarker()">TokenMarker</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new <code>TokenMarker</code>.</TD></TR></TABLE>&nbsp;<!-- ========== 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>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#addToken(int, byte)">addToken</A></B>(int&nbsp;length,         byte&nbsp;id)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a token to the token list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#deleteLines(int, int)">deleteLines</A></B>(int&nbsp;index,            int&nbsp;lines)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Informs the token marker that line have been deleted from the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#ensureCapacity(int)">ensureCapacity</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensures that the <code>lineInfo</code> array can contain the specified index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#getLineCount()">getLineCount</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of lines in this token marker.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#insertLines(int, int)">insertLines</A></B>(int&nbsp;index,            int&nbsp;lines)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Informs the token marker that lines have been inserted into the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#isNextLineRequested()">isNextLineRequested</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the next line should be repainted.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../com/rapidminer/gui/tools/syntax/Token.html" title="class in com.rapidminer.gui.tools.syntax">Token</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#markTokens(javax.swing.text.Segment, int)">markTokens</A></B>(javax.swing.text.Segment&nbsp;line,           int&nbsp;lineIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A wrapper for the lower-level <code>markTokensImpl</code> method that is called to split a line up into tokens.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract &nbsp;byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#markTokensImpl(byte, javax.swing.text.Segment, int)">markTokensImpl</A></B>(byte&nbsp;token,               javax.swing.text.Segment&nbsp;line,               int&nbsp;lineIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An abstract method that splits a line up into tokens.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/rapidminer/gui/tools/syntax/TokenMarker.html#supportsMultilineTokens()">supportsMultilineTokens</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns if the token marker supports tokens that span multiple lines.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?