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

📄 graph.rtextline.html

📁 java 作图的程序
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!--NewPage--><html><head><!-- Generated by javadoc on Wed Oct 23 13:30:49 EST 1996 --><a name="_top_"></a><title>  Class graph.RTextLine</title></head><body><pre><a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-graph.html">This Package</a>  <a href="graph.ParseFunction.html#_top_">Previous</a>  <a href="graph.ScanString.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre><hr><h1>  Class graph.RTextLine</h1><pre><a href="java.lang.Object.html#_top_">java.lang.Object</a>   |   +----<a href="graph.TextLine.html#_top_">graph.TextLine</a>           |           +----graph.RTextLine</pre><hr><dl>  <dt> public class <b>RTextLine</b>  <dt> extends <a href="graph.TextLine.html#_top_">TextLine</a></dl>This class is an extension of the TextLine Classthat allows text to be rotated. To rotate the text the Component.createImagemethod is used. This means that this class needs to knowthe component that will receive the text. If the component is notknown the text cannot be rotated and the class will fall back to theTextLine.draw method.<P>The text is rotated by running the image through an ImageFilter. This filtercan easily be modified to rotate text through an arbitrary angle butunless the text is large the integer mapping will blur the text. Also positioning of arbitrarily rotated text becomes problematic.<dl>  <dt> <b>Version:</b>  <dd> 1.5, 1996/10/23 03:13:45  <dt> <b>Author:</b>  <dd> Leigh Brookshaw</dl><hr><a name="index"></a><h2>  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index"></h2><dl>  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#angle"><b>angle</b></a>  <dd> Rotation Angle of text in degrees</dl><h2>  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index"></h2><dl>  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#RTextLine()"><b>RTextLine</b></a>()  <dd> Instantiate the class  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#RTextLine(java.awt.Component)"><b>RTextLine</b></a>(Component)  <dd> Instantiate the class.  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#RTextLine(java.awt.Font, java.awt.Color, int)"><b>RTextLine</b></a>(Font, Color, int)  <dd> Instantiate the class  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#RTextLine(java.awt.Font, java.awt.Color, int, int)"><b>RTextLine</b></a>(Font, Color, int, int)  <dd> Instantiate the class  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#RTextLine(java.lang.String)"><b>RTextLine</b></a>(String)  <dd> Instantiate the class.  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#RTextLine(java.lang.String, java.awt.Color)"><b>RTextLine</b></a>(String, Color)  <dd> Instantiate the class  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#RTextLine(java.lang.String, java.awt.Font)"><b>RTextLine</b></a>(String, Font)  <dd> Instantiate the class  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#RTextLine(java.lang.String, java.awt.Font, java.awt.Color, int)"><b>RTextLine</b></a>(String, Font, Color, int)  <dd> Instantiate the class</dl><h2>  <img src="images/method-index.gif" width=207 height=38 alt="Method Index"></h2><dl>  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#copyState(graph.RTextLine)"><b>copyState</b></a>(RTextLine)  <dd> Copy the state of the parsed Textline into the existingobject.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#draw(java.awt.Component, java.awt.Graphics, int, int)"><b>draw</b></a>(Component, Graphics, int, int)  <dd> Parse the text, rotate it then draw it to the screen.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#draw(java.awt.Graphics, int, int)"><b>draw</b></a>(Graphics, int, int)  <dd> Parse the text then draw it.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#draw(java.awt.Graphics, int, int, int)"><b>draw</b></a>(Graphics, int, int, int)  <dd> Parse the text then draw it.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getBottomEdge(java.awt.Graphics)"><b>getBottomEdge</b></a>(Graphics)  <dd> Return the bottom edge of the rotated text.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getBottomEdge(java.awt.Graphics, int)"><b>getBottomEdge</b></a>(Graphics, int)  <dd> Return the bottom edge of the rotated text.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getComponent()"><b>getComponent</b></a>()  <dd>   <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getLeftEdge(java.awt.Graphics)"><b>getLeftEdge</b></a>(Graphics)  <dd> Return the left edge of the rotated text.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getLeftEdge(java.awt.Graphics, int)"><b>getLeftEdge</b></a>(Graphics, int)  <dd> Return the left edge of the rotated text.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getRHeight(java.awt.Graphics)"><b>getRHeight</b></a>(Graphics)  <dd> The height of the text after it has been rotated.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getRightEdge(java.awt.Graphics)"><b>getRightEdge</b></a>(Graphics)  <dd> Return the right edge of the rotated text.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getRightEdge(java.awt.Graphics, int)"><b>getRightEdge</b></a>(Graphics, int)  <dd> Return the right edge of the rotated text.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getRotation()"><b>getRotation</b></a>()  <dd>   <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getRWidth(java.awt.Graphics)"><b>getRWidth</b></a>(Graphics)  <dd> The width of the text after it has been rotated.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getTopEdge(java.awt.Graphics)"><b>getTopEdge</b></a>(Graphics)  <dd> Return the top edge of the rotated text.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getTopEdge(java.awt.Graphics, int)"><b>getTopEdge</b></a>(Graphics, int)  <dd> Return the top edge of the rotated text.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#setDrawingComponent(java.awt.Component)"><b>setDrawingComponent</b></a>(Component)  <dd> Set the Component the text will be drawn into.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#setRotation(int)"><b>setRotation</b></a>(int)  <dd> Set the text rotation angle.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#setRotation(int, java.awt.Component)"><b>setRotation</b></a>(int, Component)  <dd> Set the Rotation and the Component that will be drawn into</dl><a name="variables"></a><h2>  <img src="images/variables.gif" width=153 height=38 alt="Variables"></h2><a name="angle"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>angle</b><pre>  protected int angle</pre><dl>  <dd> Rotation Angle of text in degrees</dl><a name="constructors"></a><h2>  <img src="images/constructors.gif" width=231 height=38 alt="Constructors"></h2><a name="RTextLine"></a><a name="RTextLine()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>RTextLine</b><pre>  public RTextLine()</pre><dl>  <dd> Instantiate the class</dl><a name="RTextLine(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>RTextLine</b><pre>  public RTextLine(<a href="java.lang.String.html#_top_">String</a> s)</pre><dl>  <dd> Instantiate the class.  <dl>    <dt> <b>Parameters:</b>    <dd> s - String to parse.  </dl></dl><a name="RTextLine(java.awt.Component)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>RTextLine</b><pre>  public RTextLine(<a href="java.awt.Component.html#_top_">Component</a> c)</pre><dl>  <dd> Instantiate the class.  <dl>    <dt> <b>Parameters:</b>    <dd> c - the Component the text will be drawn into.  </dl></dl><a name="RTextLine(java.lang.String, java.awt.Font)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>RTextLine</b><pre>  public RTextLine(<a href="java.lang.String.html#_top_">String</a> s,                   <a href="java.awt.Font.html#_top_">Font</a> f)</pre><dl>  <dd> Instantiate the class  <dl>    <dt> <b>Parameters:</b>    <dd> s - String to parse.    <dd> f - Font to use.  </dl></dl><a name="RTextLine(java.lang.String, java.awt.Font, java.awt.Color, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>RTextLine</b><pre>  public RTextLine(<a href="java.lang.String.html#_top_">String</a> s,                   <a href="java.awt.Font.html#_top_">Font</a> f,                   <a href="java.awt.Color.html#_top_">Color</a> c,                   int j)</pre><dl>  <dd> Instantiate the class  <dl>    <dt> <b>Parameters:</b>    <dd> s - String to parse.    <dd> f - Font to use.    <dd> c - Color to use    <dd> j - Justification  </dl></dl><a name="RTextLine(java.lang.String, java.awt.Color)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>RTextLine</b><pre>  public RTextLine(<a href="java.lang.String.html#_top_">String</a> s,                   <a href="java.awt.Color.html#_top_">Color</a> c)</pre><dl>  <dd> Instantiate the class  <dl>    <dt> <b>Parameters:</b>    <dd> s - String to parse.    <dd> c - Color to use  </dl></dl><a name="RTextLine(java.awt.Font, java.awt.Color, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>RTextLine</b><pre>  public RTextLine(<a href="java.awt.Font.html#_top_">Font</a> f,                   <a href="java.awt.Color.html#_top_">Color</a> c,                   int j,                   int a)</pre><dl>  <dd> Instantiate the class  <dl>    <dt> <b>Parameters:</b>    <dd> f - Font to use.    <dd> c - Color to use    <dd> j - Justification    <dd> a - Rotation angle in degrees  </dl></dl><a name="RTextLine(java.awt.Font, java.awt.Color, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>RTextLine</b><pre>  public RTextLine(<a href="java.awt.Font.html#_top_">Font</a> f,                   <a href="java.awt.Color.html#_top_">Color</a> c,                   int j)</pre><dl>  <dd> Instantiate the class  <dl>    <dt> <b>Parameters:</b>    <dd> f - Font to use.    <dd> c - Color to use    <dd> j - Justification  </dl></dl><a name="methods"></a><h2>  <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="copyState(graph.RTextLine)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>

⌨️ 快捷键说明

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