⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basictextui.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</DL><HR><A NAME="modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias)"><!-- --></A><H3>modelToView</H3><PRE>public <A HREF="../../../../java/awt/Rectangle.html">Rectangle</A> <B>modelToView</B>(<A HREF="../../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;tc,                             int&nbsp;pos,                             <A HREF="../../../../javax/swing/text/Position.Bias.html">Position.Bias</A>&nbsp;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. The component must have a non-zero positive size for  this translation to be computed.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/TextUI.html#modelToView(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias)">modelToView</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tc</CODE> - the text component for which this UI is installed<DD><CODE>pos</CODE> - the local location in the model to translate >= 0<DT><B>Returns:</B><DD>the coordinates as a rectangle, null if the model is not painted<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<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/plaf/TextUI.html#modelToView(javax.swing.text.JTextComponent, int)"><CODE>TextUI.modelToView(javax.swing.text.JTextComponent, int)</CODE></A></DL></DD></DL><HR><A NAME="viewToModel(javax.swing.text.JTextComponent, java.awt.Point)"><!-- --></A><H3>viewToModel</H3><PRE>public int <B>viewToModel</B>(<A HREF="../../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;tc,                       <A HREF="../../../../java/awt/Point.html">Point</A>&nbsp;pt)</PRE><DL><DD>Converts the given place in the view coordinate system to the nearest representative location in the model. The component must have a non-zero positive size for  this translation to be computed.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/TextUI.html#viewToModel(javax.swing.text.JTextComponent, java.awt.Point)">viewToModel</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tc</CODE> - the text component for which this UI is installed<DD><CODE>pt</CODE> - the location in the view to translate.  This  should be in the same coordinate system as the mouse events.<DT><B>Returns:</B><DD>the offset from the start of the document >= 0,   -1 if not painted<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/plaf/TextUI.html#viewToModel(javax.swing.text.JTextComponent, java.awt.Point)"><CODE>TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)</CODE></A></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 int <B>viewToModel</B>(<A HREF="../../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;tc,                       <A HREF="../../../../java/awt/Point.html">Point</A>&nbsp;pt,                       <A HREF="../../../../javax/swing/text/Position.Bias.html">Position.Bias</A>[]&nbsp;biasReturn)</PRE><DL><DD>Converts the given place in the view coordinate system to the nearest representative location in the model. The component must have a non-zero positive size for  this translation to be computed.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/TextUI.html#viewToModel(javax.swing.text.JTextComponent, java.awt.Point, javax.swing.text.Position.Bias[])">viewToModel</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tc</CODE> - the text component for which this UI is installed<DD><CODE>pt</CODE> - the location in the view to translate.  This  should be in the same coordinate system as the mouse events.<DT><B>Returns:</B><DD>the offset from the start of the document >= 0,   -1 if the component doesn't yet have a positive size.<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/plaf/TextUI.html#viewToModel(javax.swing.text.JTextComponent, java.awt.Point)"><CODE>TextUI.viewToModel(javax.swing.text.JTextComponent, java.awt.Point)</CODE></A></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 int <B>getNextVisualPositionFrom</B>(<A HREF="../../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;t,                                     int&nbsp;pos,                                     <A HREF="../../../../javax/swing/text/Position.Bias.html">Position.Bias</A>&nbsp;b,                                     int&nbsp;direction,                                     <A HREF="../../../../javax/swing/text/Position.Bias.html">Position.Bias</A>[]&nbsp;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>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/TextUI.html#getNextVisualPositionFrom(javax.swing.text.JTextComponent, int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias[])">getNextVisualPositionFrom</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></DL></DD><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> - &nbsp;<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 void <B>damageRange</B>(<A HREF="../../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;tc,                        int&nbsp;p0,                        int&nbsp;p1)</PRE><DL><DD>Causes the portion of the view responsible for the given part of the model to be repainted.  Does nothing if the view is not currently painted.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/TextUI.html#damageRange(javax.swing.text.JTextComponent, int, int)">damageRange</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tc</CODE> - the text component for which this UI is installed<DD><CODE>p0</CODE> - the beginning of the range >= 0<DD><CODE>p1</CODE> - the end of the range >= p0<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/plaf/TextUI.html#damageRange(javax.swing.text.JTextComponent, int, int)"><CODE>TextUI.damageRange(javax.swing.text.JTextComponent, int, int)</CODE></A></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 void <B>damageRange</B>(<A HREF="../../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;t,                        int&nbsp;p0,                        int&nbsp;p1,                        <A HREF="../../../../javax/swing/text/Position.Bias.html">Position.Bias</A>&nbsp;p0Bias,                        <A HREF="../../../../javax/swing/text/Position.Bias.html">Position.Bias</A>&nbsp;p1Bias)</PRE><DL><DD>Causes the portion of the view responsible for the  given part of the model to be repainted.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/TextUI.html#damageRange(javax.swing.text.JTextComponent, int, int, javax.swing.text.Position.Bias, javax.swing.text.Position.Bias)">damageRange</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></DL></DD><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 <A HREF="../../../../javax/swing/text/EditorKit.html">EditorKit</A> <B>getEditorKit</B>(<A HREF="../../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;tc)</PRE><DL><DD>Fetches the EditorKit for the UI.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/TextUI.html#getEditorKit(javax.swing.text.JTextComponent)">getEditorKit</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tc</CODE> - the text component for which this UI is installed<DT><B>Returns:</B><DD>the editor capabilities<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/plaf/TextUI.html#getEditorKit(javax.swing.text.JTextComponent)"><CODE>TextUI.getEditorKit(javax.swing.text.JTextComponent)</CODE></A></DL></DD></DL><HR><A NAME="getRootView(javax.swing.text.JTextComponent)"><!-- --></A><H3>getRootView</H3><PRE>public <A HREF="../../../../javax/swing/text/View.html">View</A> <B>getRootView</B>(<A HREF="../../../../javax/swing/text/JTextComponent.html">JTextComponent</A>&nbsp;tc)</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. <p> <font color=red><b>NOTE:</b>The View hierarchy can be traversed from the root view, and other things can be done as well.  Things done in this way cannot be protected like simple method calls through the TextUI. Therefore, proper operation in the presence of concurrency must be arranged by any logic that calls this method! </font><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../javax/swing/plaf/TextUI.html#getRootView(javax.swing.text.JTextComponent)">getRootView</A></CODE> in class <CODE><A HREF="../../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>tc</CODE> - the text component for which this UI is installed<DT><B>Returns:</B><DD>the view<DT><B>See Also: </B><DD><A HREF="../../../../javax/swing/plaf/TextUI.html#getRootView(javax.swing.text.JTextComponent)"><CODE>TextUI.getRootView(javax.swing.text.JTextComponent)</CODE></A></DL></DD></DL><HR><A NAME="create(javax.swing.text.Element)"><!-- --></A><H3>create</H3><PRE>public <A HREF="../../../../javax/swing/text/View.html">View</A> <B>create</B>(<A HREF="../../../../javax/swing/text/Element.html">Element</A>&nbsp;elem)</PRE><DL><DD>Creates a view for an element. If a subclass wishes to directly implement the factory producing the view(s), it should reimplement this  method.  By default it simply returns null indicating it is unable to represent the element.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../../javax/swing/text/ViewFactory.html#create(javax.swing.text.Element)">create</A></CODE> in interface <CODE><A HREF="../../../../javax/swing/text/ViewFactory.html">ViewFactory</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>elem</CODE> - the element<DT><B>Returns:</B><DD>the view</DL></DD></DL><HR><A NAME="create(javax.swing.text.Element, int, int)"><!-- --></A><H3>create</H3><PRE>public <A HREF="../../../../javax/swing/text/View.html">View</A> <B>create</B>(<A HREF="../../../../javax/swing/text/Element.html">Element</A>&nbsp;elem,                   int&nbsp;p0,                   int&nbsp;p1)</PRE><DL><DD>Creates a view for an element. If a subclass wishes to directly implement the factory producing the view(s), it should reimplement this  method.  By default it simply returns null indicating it is unable to represent the part of the element.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>elem</CODE> - the element<DD><CODE>p0</CODE> - the starting offset >= 0<DD><CODE>p1</CODE> - the ending offset >= p0<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>&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/BasicTextUI.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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../javax/swing/plaf/basic/BasicTextPaneUI.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../javax/swing/plaf/basic/BasicTextUI.BasicCaret.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>  &nbsp;&nbsp;<A HREF="BasicTextUI.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;FIELD&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;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + -