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

📄 jeditorpane.html

📁 swing 教程,与大家分享一下,哈哈,希望大家多多指教
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<BLOCKQUOTE>
<DL>
<P>
Establishes the default bindings of type to name.  
 The class will be dynamically loaded later when actually
 needed, and can be safely changed before attempted uses
 to avoid loading unwanted classes.  The prototype 
 EditorKit will be loaded with Class.forName when
 registered with this method.
<P>
<TABLE WIDTH="87%" BORDER=1 CELLPADDING=3 CELLSPACING=0> <TR VALIGN=TOP BGCOLOR="#CCCCCC"> <TD><B>Parameter</B></TD> <TD><B>Description</B></TD> </TR>
<TR VALIGN=TOP> <TD><I> type</I></TD> <TD>the non-null content type</TD></TR>
<TR VALIGN=TOP> <TD><I> classname</I></TD> <TD>the class to load later</TD></TR>
</TABLE><P>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="registerEditorKitForContentType"><FONT COLOR="#00DD00">&middot;</FONT></A>
<A NAME="registerEditorKitForContentType(java.lang.String, java.lang.String, java.lang.ClassLoader)">registerEditorKitForContentType</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public static void registerEditorKitForContentType(<A HREF="java.lang.String.html">String</A> type, 
                                                      <A HREF="java.lang.String.html">String</A> classname, 
                                                      <A HREF="java.lang.ClassLoader.html">ClassLoader</A> loader) </PRE>
<BLOCKQUOTE>
<DL>
<P>
Establishes the default bindings of type to name.  
 The class will be dynamically loaded later when actually
 needed using the given ClassLoader, and can be safely changed 
 before attempted uses to avoid loading unwanted classes.
<P>
<TABLE WIDTH="87%" BORDER=1 CELLPADDING=3 CELLSPACING=0> <TR VALIGN=TOP BGCOLOR="#CCCCCC"> <TD><B>Parameter</B></TD> <TD><B>Description</B></TD> </TR>
<TR VALIGN=TOP> <TD><I> type</I></TD> <TD>the non-null content type</TD></TR>
<TR VALIGN=TOP> <TD><I> classname</I></TD> <TD>the class to load later</TD></TR>
<TR VALIGN=TOP> <TD><I> loader</I></TD> <TD>the ClassLoader to use to load the name</TD></TR>
</TABLE><P>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="getPreferredSize"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="getPreferredSize()">getPreferredSize</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public <A HREF="java.awt.Dimension.html">Dimension</A> getPreferredSize() </PRE>
<BLOCKQUOTE>
<DL>
<P>
The preferred size for JEditorPane is slightly altered
 from the preferred size of the superclass.  If the size
 of the viewport has become smaller than the minimum size
 of the component, the Scrollable definition for tracking
 width or height will turn to false.  The default viewport
 layout will give the preferred size, and that is not desired
 in the case where the scrollable is tracking.  In that case
 the <em>normal</em> preferred size is adjusted to the
 minimum size.  This allows things like html tables to
 shrink down to their minimum size and then be laid out at
 their minimum size, refusing to shrink any further.
<P>
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.JComponent.html#getPreferredSize()">getPreferredSize</A> in class <A HREF="javax.swing.JComponent.html">JComponent</A>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="isManagingFocus"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="isManagingFocus()">isManagingFocus</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public boolean isManagingFocus() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Turns off tab traversal once focus gained.
<P>
<DT> <B>Returns:</B>
<DD> true, to indicate that the focus is being managed
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.JComponent.html#isManagingFocus()">isManagingFocus</A> in class <A HREF="javax.swing.JComponent.html">JComponent</A>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="processComponentKeyEvent"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="processComponentKeyEvent(java.awt.event.KeyEvent)">processComponentKeyEvent</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   protected void processComponentKeyEvent(<A HREF="java.awt.event.KeyEvent.html">KeyEvent</A> e) </PRE>
<BLOCKQUOTE>
<DL>
<P>
Make sure that TAB and Shift-TAB events get consumed, so that
 awt doesn't attempt focus traversal.
<P>
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.text.JTextComponent.html#processComponentKeyEvent(java.awt.event.KeyEvent)">processComponentKeyEvent</A> in class <A HREF="javax.swing.text.JTextComponent.html">JTextComponent</A>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="setText"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="setText(java.lang.String)">setText</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public void setText(<A HREF="java.lang.String.html">String</A> t) </PRE>
<BLOCKQUOTE>
<DL>
<P>
Sets the text of this TextComponent to the specified content,
 which is expected to be in the format of the content type of
 this editor.  For example, if the type is set to <code>text/html</code>
 the string should be specified in terms of html.  This is implemented
 to call <code>JTextComponent.read</code> with a 
 <code>StringReader</code>[
 <p>
 This method is thread safe, although most Swing methods
 are not. Please see 
 <A HREF="http://java.sun.com/products/jfc/swingdoc-archive/threads.html">Threads
 and Swing</A> for more information.
<P>
<TABLE WIDTH="87%" BORDER=1 CELLPADDING=3 CELLSPACING=0> <TR VALIGN=TOP BGCOLOR="#CCCCCC"> <TD><B>Parameter</B></TD> <TD><B>Description</B></TD> </TR>
<TR VALIGN=TOP> <TD><I> t</I></TD> <TD>the new text to be set</TD></TR>
</TABLE><P>
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.text.JTextComponent.html#setText(java.lang.String)">setText</A> in class <A HREF="javax.swing.text.JTextComponent.html">JTextComponent</A>
</DL>
<P> <B>See Also:</B>
<A HREF="#getText">getText</A></BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="getText"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="getText()">getText</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public <A HREF="java.lang.String.html">String</A> getText() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns the text contained in this TextComponent in terms of the
 content type of this editor.  If an exception is thrown while
 attempting to retrieve the text, null will be returned.  This
 is implemented to call <code>JTextComponent.write</code> with
 a <code>StringWriter</code>.
<P>
<DT> <B>Returns:</B>
<DD> the text
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.text.JTextComponent.html#getText()">getText</A> in class <A HREF="javax.swing.text.JTextComponent.html">JTextComponent</A>
</DL>
<P> <B>See Also:</B>
<A HREF="#setText">setText</A></BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="getScrollableTracksViewportWidth"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="getScrollableTracksViewportWidth()">getScrollableTracksViewportWidth</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public boolean getScrollableTracksViewportWidth() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns true if a viewport should always force the width of this 
 Scrollable to match the width of the viewport.
<P>
<DT> <B>Returns:</B>
<DD> true if a viewport should force the Scrollables width to
 match its own.
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.text.JTextComponent.html#getScrollableTracksViewportWidth()">getScrollableTracksViewportWidth</A> in class <A HREF="javax.swing.text.JTextComponent.html">JTextComponent</A>
<DT><B>Implements:</B>
<DD><A HREF="javax.swing.Scrollable.html#getScrollableTracksViewportWidth()">getScrollableTracksViewportWidth</A> in interface <A HREF="javax.swing.Scrollable.html">Scrollable</A>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="getScrollableTracksViewportHeight"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="getScrollableTracksViewportHeight()">getScrollableTracksViewportHeight</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public boolean getScrollableTracksViewportHeight() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns true if a viewport should always force the height of this 
 Scrollable to match the height of the viewport.
<P>
<DT> <B>Returns:</B>
<DD> true if a viewport should force the Scrollables height to
 match its own.
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.text.JTextComponent.html#getScrollableTracksViewportHeight()">getScrollableTracksViewportHeight</A> in class <A HREF="javax.swing.text.JTextComponent.html">JTextComponent</A>
<DT><B>Implements:</B>
<DD><A HREF="javax.swing.Scrollable.html#getScrollableTracksViewportHeight()">getScrollableTracksViewportHeight</A> in interface <A HREF="javax.swing.Scrollable.html">Scrollable</A>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="paramString"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="paramString()">paramString</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   protected <A HREF="java.lang.String.html">String</A> paramString() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Returns a string representation of this JEditorPane. This method 
 is intended to be used only for debugging purposes, and the 
 content and format of the returned string may vary between      
 implementations. The returned string may be empty but may not 
 be <code>null</code>.
 <P>
 Overriding paramString() to provide information about the
 specific new aspects of the JFC components.
<P>
<DT> <B>Returns:</B>
<DD> a string representation of this JEditorPane.
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.text.JTextComponent.html#paramString()">paramString</A> in class <A HREF="javax.swing.text.JTextComponent.html">JTextComponent</A>
</DL>
</BLOCKQUOTE> <BR>

<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=0> <TR> <TD WIDTH=80%>
<BR><H3><A NAME="getAccessibleContext"><FONT COLOR="#FF0000">&middot;</FONT></A>
<A NAME="getAccessibleContext()">getAccessibleContext</A> </H3>
</TD> <TD ALIGN=right WIDTH=20%> <FONT SIZE="-2"><A HREF="#_Summary_">Summary</A> &nbsp;|&nbsp; <A HREF=#_top_>Top</A></FONT> </TD> </TR> </TABLE>
<PRE>
   public <A HREF="javax.accessibility.AccessibleContext.html">AccessibleContext</A> getAccessibleContext() </PRE>
<BLOCKQUOTE>
<DL>
<P>
Get the AccessibleContext associated with this JEditorPane.  A new
 context is created if necessary.
<P>
<DT> <B>Returns:</B>
<DD> the AccessibleContext of this JEditorPane
<DT><B>Overrides:</B>
<DD><A HREF="javax.swing.text.JTextComponent.html#getAccessibleContext()">getAccessibleContext</A> in class <A HREF="javax.swing.text.JTextComponent.html">JTextComponent</A>
<DT><B>Implements:</B>
<DD><A HREF="javax.accessibility.Accessible.html#getAccessibleContext()">getAccessibleContext</A> in interface <A HREF="javax.accessibility.Accessible.html">Accessible</A>
</DL>
</BLOCKQUOTE> <BR>


<HR SIZE=1 ALIGN=left WIDTH="98%">
<PRE>
<A HREF="Packages.html">All Packages</A>  <A HREF="Package-javax.swing.html">This Package</A>  <A HREF="Tree.html">Class Hierarchy</A>  <A HREF="Search.html">Class Search</A>  <A HREF="AllNames.html">Index</A>
</PRE>
<FONT FACE="Arial,Helvetica" SIZE=-2>
Freshly brewed Java API Documentation automatically generated with <A HREF="http://www.ualberta.ca/~tgee/polardoc">polardoc</A> Version 1.0.7
<BR>
</FONT>
</BODY>
</HTML>

⌨️ 快捷键说明

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