📄 textui.html
字号:
<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="TextUI()"><!-- --></A><H3>TextUI</H3><PRE>public <B>TextUI</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="modelToView(javax.swing.text.JTextComponent, int)"><!-- --></A><H3>modelToView</H3><PRE>public abstract <A HREF="../../../java/awt/Rectangle.html">Rectangle</A> <B>modelToView</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t, int pos) throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Converts the given location in the model to a place in the view coordinate system.<DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the local location in the model to translate >= 0<DT><B>Returns:</B><DD>the coordinates as a rectangle<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></CODE> - if the given position does not represent a valid location in the associated document</DL></DD></DL><HR><A NAME="modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias)"><!-- --></A><H3>modelToView</H3><PRE>public abstract <A HREF="../../../java/awt/Rectangle.html">Rectangle</A> <B>modelToView</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t, int pos, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> bias) throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Converts the given location in the model to a place in the view coordinate system.<DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the local location in the model to translate >= 0<DT><B>Returns:</B><DD>the coordinates as a rectangle<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></CODE> - if the given position does not represent a valid location in the associated document</DL></DD></DL><HR><A NAME="viewToModel(javax.swing.text.JTextComponent, java.awt.Point)"><!-- --></A><H3>viewToModel</H3><PRE>public abstract int <B>viewToModel</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t, <A HREF="../../../java/awt/Point.html">Point</A> pt)</PRE><DL><DD>Converts the given place in the view coordinate system to the nearest representative location in the model.<DD><DL><DT><B>Parameters:</B><DD><CODE>pt</CODE> - the location in the view to translate. This should be in the same coordinate system as the mouse events.</DL></DD></DL><HR><A NAME="viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias[])"><!-- --></A><H3>viewToModel</H3><PRE>public abstract int <B>viewToModel</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t, <A HREF="../../../java/awt/Point.html">Point</A> pt, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>[] biasReturn)</PRE><DL><DD>Provides a mapping from the view coordinate space to the logical coordinate space of the model. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.<DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the X coordinate >= 0<DD><CODE>y</CODE> - the Y coordinate >= 0<DD><CODE>a</CODE> - the allocated region to render into<DT><B>Returns:</B><DD>the location within the model that best represents the given point in the view >= 0. The biasReturn argument will be filled in to indicate that the point given is closer to the next character in the model or the previous character in the model.</DL></DD></DL><HR><A NAME="getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias[])"><!-- --></A><H3>getNextVisualPositionFrom</H3><PRE>public abstract int <B>getNextVisualPositionFrom</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t, int pos, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> b, int direction, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>[] biasRet) throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Provides a way to determine the next visually represented model location that one might place a caret. Some views may not be visible, they might not be in the same order found in the model, or they just might not allow access to some of the locations in the model.<DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the position to convert >= 0<DD><CODE>a</CODE> - the allocated region to render into<DD><CODE>direction</CODE> - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.<DT><B>Returns:</B><DD>the location within the model that best represents the next location visual position.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></CODE> - <DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - for an invalid direction</DL></DD></DL><HR><A NAME="damageRange(javax.swing.text.JTextComponent, int, int)"><!-- --></A><H3>damageRange</H3><PRE>public abstract void <B>damageRange</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t, int p0, int p1)</PRE><DL><DD>Causes the portion of the view responsible for the given part of the model to be repainted.<DD><DL><DT><B>Parameters:</B><DD><CODE>p0</CODE> - the beginning of the range >= 0<DD><CODE>p1</CODE> - the end of the range >= p0</DL></DD></DL><HR><A NAME="damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias)"><!-- --></A><H3>damageRange</H3><PRE>public abstract void <B>damageRange</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t, int p0, int p1, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> firstBias, <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A> secondBias)</PRE><DL><DD>Causes the portion of the view responsible for the given part of the model to be repainted.<DD><DL><DT><B>Parameters:</B><DD><CODE>p0</CODE> - the beginning of the range >= 0<DD><CODE>p1</CODE> - the end of the range >= p0</DL></DD></DL><HR><A NAME="getEditorKit(javax.swing.text.JTextComponent)"><!-- --></A><H3>getEditorKit</H3><PRE>public abstract <A HREF="../../../javax/swing/text/EditorKit.html">EditorKit</A> <B>getEditorKit</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t)</PRE><DL><DD>Fetches the binding of services that set a policy for the type of document being edited. This contains things like the commands available, stream readers and writers, etc.<DD><DL><DT><B>Returns:</B><DD>the editor kit binding</DL></DD></DL><HR><A NAME="getRootView(javax.swing.text.JTextComponent)"><!-- --></A><H3>getRootView</H3><PRE>public abstract <A HREF="../../../javax/swing/text/View.html">View</A> <B>getRootView</B>(<A HREF="../../../javax/swing/text/JTextComponent.html">JTextComponent</A> t)</PRE><DL><DD>Fetches a View with the allocation of the associated text component (i.e. the root of the hierarchy) that can be traversed to determine how the model is being represented spatially.<DD><DL><DT><B>Returns:</B><DD>the view</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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="class-use/TextUI.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/swing/plaf/TableUI.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/swing/plaf/ToolBarUI.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="TextUI.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -