📄 jtextcomponent.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getScrollableUnitIncrement(java.awt.Rectangle, int, int)">getScrollableUnitIncrement</A></B>(<A HREF="../../../java/awt/Rectangle.html">Rectangle</A> visibleRect, int orientation, int direction)</CODE><BR> Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getSelectedText()">getSelectedText</A></B>()</CODE><BR> Returns the selected text contained in this TextComponent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getSelectedTextColor()">getSelectedTextColor</A></B>()</CODE><BR> Fetches the current color used to render the selected text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getSelectionColor()">getSelectionColor</A></B>()</CODE><BR> Fetches the current color used to render the selection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getSelectionEnd()">getSelectionEnd</A></B>()</CODE><BR> Returns the selected text's end position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getSelectionStart()">getSelectionStart</A></B>()</CODE><BR> Returns the selected text's start position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getText()">getText</A></B>()</CODE><BR> Returns the text contained in this TextComponent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getText(int, int)">getText</A></B>(int offs, int len)</CODE><BR> Fetches a portion of the text represented by the component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/plaf/TextUI.html">TextUI</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getUI()">getUI</A></B>()</CODE><BR> Fetches the user-interface factory for this text-oriented editor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#isEditable()">isEditable</A></B>()</CODE><BR> Returns the boolean indicating whether this TextComponent is editable or not.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#isFocusTraversable()">isFocusTraversable</A></B>()</CODE><BR> Returns true if the focus can be traversed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#loadKeymap(javax.swing.text.Keymap, javax.swing.text.JTextComponent.KeyBinding[], javax.swing.Action[])">loadKeymap</A></B>(<A HREF="../../../javax/swing/text/Keymap.html">Keymap</A> map, <A HREF="../../../javax/swing/text/JTextComponent.KeyBinding.html">JTextComponent.KeyBinding</A>[] bindings, <A HREF="../../../javax/swing/Action.html">Action</A>[] actions)</CODE><BR> Loads a keymap with a bunch of bindings.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Rectangle.html">Rectangle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#modelToView(int)">modelToView</A></B>(int pos)</CODE><BR> Converts the given location in the model to a place in the view coordinate system.</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="../../../javax/swing/text/JTextComponent.html#moveCaretPosition(int)">moveCaretPosition</A></B>(int pos)</CODE><BR> Moves the caret to a new position, leaving behind a mark defined by the last time setCaretPosition was called.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#paramString()">paramString</A></B>()</CODE><BR> Returns a string representation of this JTextComponent.</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="../../../javax/swing/text/JTextComponent.html#paste()">paste</A></B>()</CODE><BR> Transfers the contents of the system clipboard into the associated text model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#processInputMethodEvent(java.awt.event.InputMethodEvent)">processInputMethodEvent</A></B>(<A HREF="../../../java/awt/event/InputMethodEvent.html">InputMethodEvent</A> e)</CODE><BR> Processes input method events occurring on this component by dispatching them to any registered <code>InputMethodListener</code> objects.</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="../../../javax/swing/text/JTextComponent.html#read(java.io.Reader, java.lang.Object)">read</A></B>(<A HREF="../../../java/io/Reader.html">Reader</A> in, <A HREF="../../../java/lang/Object.html">Object</A> desc)</CODE><BR> Initializes from a stream.</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="../../../javax/swing/text/JTextComponent.html#removeCaretListener(javax.swing.event.CaretListener)">removeCaretListener</A></B>(<A HREF="../../../javax/swing/event/CaretListener.html">CaretListener</A> listener)</CODE><BR> Removes a caret listener.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../javax/swing/text/Keymap.html">Keymap</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#removeKeymap(java.lang.String)">removeKeymap</A></B>(<A HREF="../../../java/lang/String.html">String</A> nm)</CODE><BR> Removes a named keymap previously added to the document.</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="../../../javax/swing/text/JTextComponent.html#removeNotify()">removeNotify</A></B>()</CODE><BR> Notifies this component that it has been removed from its container.</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="../../../javax/swing/text/JTextComponent.html#replaceSelection(java.lang.String)">replaceSelection</A></B>(<A HREF="../../../java/lang/String.html">String</A> content)</CODE><BR> Replaces the currently selected content with new content
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -