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

📄 glyphview.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<HR><A NAME="getText(int, int)"><!-- --></A><H3>getText</H3><PRE>public <A HREF="../../../javax/swing/text/Segment.html">Segment</A> <B>getText</B>(int&nbsp;p0,                       int&nbsp;p1)</PRE><DL><DD>Fetch a reference to the text that occupies the given range.  This is normally used by the GlyphPainter to determine what characters it should render glyphs for.<DD><DL></DL></DD></DL><HR><A NAME="getBackground()"><!-- --></A><H3>getBackground</H3><PRE>public <A HREF="../../../java/awt/Color.html">Color</A> <B>getBackground</B>()</PRE><DL><DD>Fetch the background color to use to render the glyphs.  If there is no background color, null should be returned.  This is implemented to call  <code>StyledDocument.getBackground</code> if the associated document is a styled document, otherwise it returns null.<DD><DL></DL></DD></DL><HR><A NAME="getForeground()"><!-- --></A><H3>getForeground</H3><PRE>public <A HREF="../../../java/awt/Color.html">Color</A> <B>getForeground</B>()</PRE><DL><DD>Fetch the foreground color to use to render the glyphs.  If there is no foreground color, null should be returned.  This is implemented to call <code>StyledDocument.getBackground</code> if the associated document is a StyledDocument.  If the associated document is not a StyledDocument, the associated components foreground color is used.  If there is no associated component, null  is returned.<DD><DL></DL></DD></DL><HR><A NAME="getFont()"><!-- --></A><H3>getFont</H3><PRE>public <A HREF="../../../java/awt/Font.html">Font</A> <B>getFont</B>()</PRE><DL><DD>Fetch the font that the glyphs should be based upon.  This is implemented to call <code>StyledDocument.getFont</code> if the associated document is a StyledDocument.  If the associated document is not a StyledDocument, the associated components font is used.  If there is no associated component, null  is returned.<DD><DL></DL></DD></DL><HR><A NAME="isUnderline()"><!-- --></A><H3>isUnderline</H3><PRE>public boolean <B>isUnderline</B>()</PRE><DL><DD>Determine if the glyphs should be underlined.  If true, an underline should be drawn through the baseline.<DD><DL></DL></DD></DL><HR><A NAME="isStrikeThrough()"><!-- --></A><H3>isStrikeThrough</H3><PRE>public boolean <B>isStrikeThrough</B>()</PRE><DL><DD>Determine if the glyphs should have a strikethrough line.  If true, a line should be drawn through the center of the glyphs.<DD><DL></DL></DD></DL><HR><A NAME="isSubscript()"><!-- --></A><H3>isSubscript</H3><PRE>public boolean <B>isSubscript</B>()</PRE><DL><DD>Determine if the glyphs should be rendered as superscript.<DD><DL></DL></DD></DL><HR><A NAME="isSuperscript()"><!-- --></A><H3>isSuperscript</H3><PRE>public boolean <B>isSuperscript</B>()</PRE><DL><DD>Determine if the glyphs should be rendered as subscript.<DD><DL></DL></DD></DL><HR><A NAME="getTabExpander()"><!-- --></A><H3>getTabExpander</H3><PRE>public <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A> <B>getTabExpander</B>()</PRE><DL><DD>Fetch the TabExpander to use if tabs are present in this view.<DD><DL></DL></DD></DL><HR><A NAME="checkPainter()"><!-- --></A><H3>checkPainter</H3><PRE>protected void <B>checkPainter</B>()</PRE><DL><DD>Check to see that a glyph painter exists.  If a painter doesn't exist, a default glyph painter will be installed.<DD><DL></DL></DD></DL><HR><A NAME="getTabbedSpan(float, javax.swing.text.TabExpander)"><!-- --></A><H3>getTabbedSpan</H3><PRE>public float <B>getTabbedSpan</B>(float&nbsp;x,                           <A HREF="../../../javax/swing/text/TabExpander.html">TabExpander</A>&nbsp;e)</PRE><DL><DD>Determines the desired span when using the given  tab expansion implementation.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/TabableView.html#getTabbedSpan(float, javax.swing.text.TabExpander)">getTabbedSpan</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/TabableView.html">TabableView</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - the position the view would be located  at for the purpose of tab expansion >= 0.<DD><CODE>e</CODE> - how to expand the tabs when encountered.<DT><B>Returns:</B><DD>the desired span >= 0<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/TabableView.html#getTabbedSpan(float, javax.swing.text.TabExpander)"><CODE>TabableView.getTabbedSpan(float, javax.swing.text.TabExpander)</CODE></A></DL></DD></DL><HR><A NAME="getPartialSpan(int, int)"><!-- --></A><H3>getPartialSpan</H3><PRE>public float <B>getPartialSpan</B>(int&nbsp;p0,                            int&nbsp;p1)</PRE><DL><DD>Determines the span along the same axis as tab  expansion for a portion of the view.  This is intended for use by the TabExpander for cases where the tab expansion involves aligning the portion of text that doesn't have whitespace  relative to the tab stop.  There is therefore an assumption that the range given does not contain tabs. <p> This method can be called while servicing the getTabbedSpan or getPreferredSize.  It has to arrange for its own text buffer to make the measurements.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../javax/swing/text/TabableView.html#getPartialSpan(int, int)">getPartialSpan</A></CODE> in interface <CODE><A HREF="../../../javax/swing/text/TabableView.html">TabableView</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p0</CODE> - the starting document offset >= 0<DD><CODE>p1</CODE> - the ending document offset >= p0<DT><B>Returns:</B><DD>the span >= 0</DL></DD></DL><HR><A NAME="getStartOffset()"><!-- --></A><H3>getStartOffset</H3><PRE>public int <B>getStartOffset</B>()</PRE><DL><DD>Fetches the portion of the model that this view is responsible for.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getStartOffset()">getStartOffset</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the starting offset into the model<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#getStartOffset()"><CODE>View.getStartOffset()</CODE></A></DL></DD></DL><HR><A NAME="getEndOffset()"><!-- --></A><H3>getEndOffset</H3><PRE>public int <B>getEndOffset</B>()</PRE><DL><DD>Fetches the portion of the model that this view is responsible for.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getEndOffset()">getEndOffset</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the ending offset into the model<DT><B>See Also: </B><DD><A HREF="../../../javax/swing/text/View.html#getEndOffset()"><CODE>View.getEndOffset()</CODE></A></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 a portion of a text style run.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#paint(java.awt.Graphics, java.awt.Shape)">paint</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the rendering surface to use<DD><CODE>a</CODE> - the allocated region to render into</DL></DD></DL><HR><A NAME="getPreferredSpan(int)"><!-- --></A><H3>getPreferredSpan</H3><PRE>public float <B>getPreferredSpan</B>(int&nbsp;axis)</PRE><DL><DD>Determines the preferred span for this view along an axis.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getPreferredSpan(int)">getPreferredSpan</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - may be either View.X_AXIS or View.Y_AXIS</DL></DD></DL><HR><A NAME="getAlignment(int)"><!-- --></A><H3>getAlignment</H3><PRE>public float <B>getAlignment</B>(int&nbsp;axis)</PRE><DL><DD>Determines the desired alignment for this view along an axis.  For the label, the alignment is along the font baseline for the y axis, and the superclasses alignment along the x axis.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/swing/text/View.html#getAlignment(int)">getAlignment</A></CODE> in class <CODE><A HREF="../../../javax/swing/text/View.html">View</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - may be either View.X_AXIS or View.Y_AXIS</DL></DD></DL><HR><A NAME="modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)"><!-- --></A><H3>modelToView</H3><PRE>public <A HREF="../../../java/awt/Shape.html">Shape</A> <B>modelToView</B>(int&nbsp;pos,                         <A HREF="../../../java/awt/Shape.html">Shape</A>&nbsp;a,                         <A HREF="../../../javax/swing/text/Position.Bias.html">Position.Bias</A>&nbsp;b)                  throws <A HREF="../../../javax/swing/text/BadLocationException.html">BadLocationException</A></PRE><DL><DD>Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.<DD><DL>

⌨️ 快捷键说明

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