📄 jtextcomponent.html
字号:
</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#addInputMethodListener(java.awt.event.InputMethodListener)">addInputMethodListener</A></B>(<A HREF="../../../java/awt/event/InputMethodListener.html">InputMethodListener</A> l)</CODE><BR> Adds the specified input method listener to receive input method events from this component.</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#addKeymap(java.lang.String, javax.swing.text.Keymap)">addKeymap</A></B>(<A HREF="../../../java/lang/String.html">String</A> nm, <A HREF="../../../javax/swing/text/Keymap.html">Keymap</A> parent)</CODE><BR> Adds a new keymap into the keymap hierarchy.</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#copy()">copy</A></B>()</CODE><BR> Transfers the currently selected range in the associated text model to the system clipboard, leaving the contents in the text model.</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#cut()">cut</A></B>()</CODE><BR> Transfers the currently selected range in the associated text model to the system clipboard, removing the contents from the 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#fireCaretUpdate(javax.swing.event.CaretEvent)">fireCaretUpdate</A></B>(<A HREF="../../../javax/swing/event/CaretEvent.html">CaretEvent</A> e)</CODE><BR> Notifies all listeners that have registered interest for notification on this event type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/accessibility/AccessibleContext.html">AccessibleContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getAccessibleContext()">getAccessibleContext</A></B>()</CODE><BR> Gets the AccessibleContext associated with this JTextComponent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/Action.html">Action</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getActions()">getActions</A></B>()</CODE><BR> Fetches the command list for the editor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/text/Caret.html">Caret</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getCaret()">getCaret</A></B>()</CODE><BR> Fetches the caret that allows text-oriented navigation over the view.</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#getCaretColor()">getCaretColor</A></B>()</CODE><BR> Fetches the current color used to render the caret.</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#getCaretPosition()">getCaretPosition</A></B>()</CODE><BR> Returns the position of the text insertion caret for the text component.</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#getDisabledTextColor()">getDisabledTextColor</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="../../../javax/swing/text/Document.html">Document</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getDocument()">getDocument</A></B>()</CODE><BR> Fetches the model associated with the editor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> char</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getFocusAccelerator()">getFocusAccelerator</A></B>()</CODE><BR> Returns the key accelerator that will cause the receiving text component to get the focus.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/text/Highlighter.html">Highlighter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getHighlighter()">getHighlighter</A></B>()</CODE><BR> Fetches the object responsible for making highlights.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/im/InputMethodRequests.html">InputMethodRequests</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getInputMethodRequests()">getInputMethodRequests</A></B>()</CODE><BR> Gets the input method request handler which supports requests from input methods for this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/swing/text/Keymap.html">Keymap</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getKeymap()">getKeymap</A></B>()</CODE><BR> Fetches the keymap currently active in this text component.</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#getKeymap(java.lang.String)">getKeymap</A></B>(<A HREF="../../../java/lang/String.html">String</A> nm)</CODE><BR> Fetches 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> <A HREF="../../../java/awt/Insets.html">Insets</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getMargin()">getMargin</A></B>()</CODE><BR> Returns the margin between the text component's border and its text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/swing/text/JTextComponent.html#getPreferredScrollableViewportSize()">getPreferredScrollableViewportSize</A></B>()</CODE><BR> Returns the preferred size of the viewport for a view component.</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#getScrollableBlockIncrement(java.awt.Rectangle, int, int)">getScrollableBlockIncrement</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 block of rows or columns, depending on the value of orientation.</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#getScrollableTracksViewportHeight()">getScrollableTracksViewportHeight</A></B>()</CODE><BR> Return true if a viewport should always force the height of this Scrollable to match the height of the viewport.</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#getScrollableTracksViewportWidth()">getScrollableTracksViewportWidth</A></B>()</CODE><BR> Return true if a viewport should always force the width of this Scrollable to match the width of the viewport.</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -