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

📄 wrappedplainview.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
WrappedPlainView</H3><PRE>public <B>WrappedPlainView</B>(<A HREF="../../../javax/swing/text/Element.html">Element</A>&nbsp;elem)</PRE><DL><DD>Creates a new WrappedPlainView.  Lines will be wrapped on character boundaries.<DD><DL><DT><B>Parameters:</B><DD><CODE>elem</CODE> - the element underlying the view</DL></DD></DL><HR><A NAME="WrappedPlainView(javax.swing.text.Element, boolean)"><!-- --></A><H3>WrappedPlainView</H3><PRE>public <B>WrappedPlainView</B>(<A HREF="../../../javax/swing/text/Element.html">Element</A>&nbsp;elem,                        boolean&nbsp;wordWrap)</PRE><DL><DD>Creates a new WrappedPlainView.  Lines can be wrapped on either character or word boundaries depending upon the setting of the wordWrap parameter.<DD><DL><DT><B>Parameters:</B><DD><CODE>elem</CODE> - the element underlying the view<DD><CODE>wordWrap</CODE> - should lines be wrapped on word boundaries?</DL></DD></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="getTabSize()"><!-- --></A><H3>getTabSize</H3><PRE>protected int <B>getTabSize</B>()</PRE><DL><DD>Returns the tab size set for the document, defaulting to 8.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the tab size</DL></DD></DL><HR><A NAME="drawLine(int, int, java.awt.Graphics, int, int)"><!-- --></A><H3>drawLine</H3><PRE>protected void <B>drawLine</B>(int&nbsp;p0,                        int&nbsp;p1,                        <A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,                        int&nbsp;x,                        int&nbsp;y)</PRE><DL><DD>Renders a line of text, suppressing whitespace at the end and expanding any tabs.  This is implemented to make calls to the methods <code>drawUnselectedText</code> and  <code>drawSelectedText</code> so that the way selected and  unselected text are rendered can be customized.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p0</CODE> - the starting document location to use >= 0<DD><CODE>p1</CODE> - the ending document location to use >= p1<DD><CODE>g</CODE> - the graphics context<DD><CODE>x</CODE> - the starting X position >= 0<DD><CODE>y</CODE> - the starting Y position >= 0<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/WrappedPlainView.html#drawUnselectedText(java.awt.Graphics, int, int, int, int)"><CODE>drawUnselectedText(java.awt.Graphics, int, int, int, int)</CODE></A>, <A HREF="../../../javax/swing/text/WrappedPlainView.html#drawSelectedText(java.awt.Graphics, int, int, int, int)"><CODE>drawSelectedText(java.awt.Graphics, int, int, int, int)</CODE></A></DL></DD></DL><HR><A NAME="drawUnselectedText(java.awt.Graphics, int, int, int, int)"><!-- --></A><H3>drawUnselectedText</H3><PRE>protected int <B>drawUnselectedText</B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,                                 int&nbsp;x,                                 int&nbsp;y,                                 int&nbsp;p0,                                 int&nbsp;p1)                          throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Renders the given range in the model as normal unselected text.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics context<DD><CODE>x</CODE> - the starting X coordinate >= 0<DD><CODE>y</CODE> - the starting Y coordinate >= 0<DD><CODE>p0</CODE> - the beginning position in the model >= 0<DD><CODE>p1</CODE> - the ending position in the model >= p0<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></CODE> - if the range is invalid</DL></DD></DL><HR><A NAME="drawSelectedText(java.awt.Graphics, int, int, int, int)"><!-- --></A><H3>drawSelectedText</H3><PRE>protected int <B>drawSelectedText</B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,                               int&nbsp;x,                               int&nbsp;y,                               int&nbsp;p0,                               int&nbsp;p1)                        throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Renders the given range in the model as selected text.  This is implemented to render the text in the color specified in the hosting component.  It assumes the highlighter will render the selected background.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics context<DD><CODE>x</CODE> - the starting X coordinate >= 0<DD><CODE>y</CODE> - the starting Y coordinate >= 0<DD><CODE>p0</CODE> - the beginning position in the model >= 0<DD><CODE>p1</CODE> - the ending position in the model >= p0<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></CODE> - if the range is invalid</DL></DD></DL><HR><A NAME="getLineBuffer()"><!-- --></A><H3>getLineBuffer</H3><PRE>protected final <A HREF="../../../javax/swing/text/Segment.html">Segment</A> <B>getLineBuffer</B>()</PRE><DL><DD>Gives access to a buffer that can be used to fetch  text from the associated document.<DD><DL></DL></DD></DL><HR><A NAME="calculateBreakPosition(int, int)"><!-- --></A><H3>calculateBreakPosition</H3><PRE>protected int <B>calculateBreakPosition</B>(int&nbsp;p0,                                     int&nbsp;p1)</PRE><DL><DD>This is called by the nested wrapped line views to determine the break location.  This can be reimplemented to alter the breaking behavior. It will either break at word or character boundaries depending upon the break argument given at construction.<DD><DL></DL></DD></DL><HR><A NAME="loadChildren(javax.swing.text.ViewFactory)"><!-- --></A><H3>loadChildren</H3><PRE>protected void <B>loadChildren</B>(<A HREF="../../../javax/swing/text/ViewFactory.html">ViewFactory</A>&nbsp;f)</PRE><DL><DD>Loads all of the children to initialize the view. This is called by the <code>setParent</code> method. Subclasses can reimplement this to initialize their child views in a different manner.  The default implementation creates a child view for each  child element.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/CompositeView.html#loadChildren(javax.swing.text.ViewFactory)">loadChildren</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/CompositeView.html">CompositeView</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>f</CODE> - the view factory</DL></DD></DL><HR><A NAME="nextTabStop(float, int)"><!-- --></A><H3>nextTabStop</H3><PRE>public float <B>nextTabStop</B>(float&nbsp;x,                         int&nbsp;tabOffset)</PRE><DL><DD>Returns the next tab stop position after a given reference position. This implementation does not support things like centering so it ignores the tabOffset argument.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/TabExpander.html#nextTabStop(float, int)">nextTabStop</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the current position >= 0<DD><CODE>tabOffset</CODE> - the position within the text stream   that the tab occurred at >= 0.<DT><B>Returns:</B><DD>the tab stop, measured in points >= 0</DL></DD></DL><HR><A NAME="paint(java.awt.Graphics, java.awt.Shape)"><!-- --></A><H3>paint</H3><PRE>public void <B>paint</B>(<A HREF="../../../java/awt/Graphics.html">Graphics</A>&nbsp;g,                  <A HREF="../../../java/awt/Shape.html">Shape</A>&nbsp;a)</PRE><DL><DD>Renders using the given rendering surface and area 

⌨️ 快捷键说明

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