AttrStringUtils.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_05) on Thu Jul 31 14:50:41 CEST 2014 -->
  6. <title>AttrStringUtils (JFreeChart Class Library (version 1.0.19-fx))</title>
  7. <meta name="date" content="2014-07-31">
  8. <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="AttrStringUtils (JFreeChart Class Library (version 1.0.19-fx))";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9};
  22. var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../overview-summary.html">Overview</a></li>
  41. <li><a href="package-summary.html">Package</a></li>
  42. <li class="navBarCell1Rev">Class</li>
  43. <li><a href="class-use/AttrStringUtils.html">Use</a></li>
  44. <li><a href="package-tree.html">Tree</a></li>
  45. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  46. <li><a href="../../../../index-files/index-1.html">Index</a></li>
  47. <li><a href="../../../../help-doc.html">Help</a></li>
  48. </ul>
  49. </div>
  50. <div class="subNav">
  51. <ul class="navList">
  52. <li>Prev&nbsp;Class</li>
  53. <li><a href="../../../../org/jfree/chart/util/CloneUtils.html" title="class in org.jfree.chart.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  54. </ul>
  55. <ul class="navList">
  56. <li><a href="../../../../index.html?org/jfree/chart/util/AttrStringUtils.html" target="_top">Frames</a></li>
  57. <li><a href="AttrStringUtils.html" target="_top">No&nbsp;Frames</a></li>
  58. </ul>
  59. <ul class="navList" id="allclasses_navbar_top">
  60. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  61. </ul>
  62. <div>
  63. <script type="text/javascript"><!--
  64. allClassesLink = document.getElementById("allclasses_navbar_top");
  65. if(window==top) {
  66. allClassesLink.style.display = "block";
  67. }
  68. else {
  69. allClassesLink.style.display = "none";
  70. }
  71. //-->
  72. </script>
  73. </div>
  74. <div>
  75. <ul class="subNavList">
  76. <li>Summary:&nbsp;</li>
  77. <li>Nested&nbsp;|&nbsp;</li>
  78. <li>Field&nbsp;|&nbsp;</li>
  79. <li>Constr&nbsp;|&nbsp;</li>
  80. <li><a href="#method.summary">Method</a></li>
  81. </ul>
  82. <ul class="subNavList">
  83. <li>Detail:&nbsp;</li>
  84. <li>Field&nbsp;|&nbsp;</li>
  85. <li>Constr&nbsp;|&nbsp;</li>
  86. <li><a href="#method.detail">Method</a></li>
  87. </ul>
  88. </div>
  89. <a name="skip.navbar.top">
  90. <!-- -->
  91. </a></div>
  92. <!-- ========= END OF TOP NAVBAR ========= -->
  93. <!-- ======== START OF CLASS DATA ======== -->
  94. <div class="header">
  95. <div class="subTitle">org.jfree.chart.util</div>
  96. <h2 title="Class AttrStringUtils" class="title">Class AttrStringUtils</h2>
  97. </div>
  98. <div class="contentContainer">
  99. <ul class="inheritance">
  100. <li>java.lang.Object</li>
  101. <li>
  102. <ul class="inheritance">
  103. <li>org.jfree.chart.util.AttrStringUtils</li>
  104. </ul>
  105. </li>
  106. </ul>
  107. <div class="description">
  108. <ul class="blockList">
  109. <li class="blockList">
  110. <hr>
  111. <br>
  112. <pre>public class <a href="../../../../src-html/org/jfree/chart/util/AttrStringUtils.html#line.56">AttrStringUtils</a>
  113. extends java.lang.Object</pre>
  114. <div class="block">Some <code>AttributedString</code> utilities.</div>
  115. <dl>
  116. <dt><span class="simpleTagLabel">Since:</span></dt>
  117. <dd>1.0.16</dd>
  118. </dl>
  119. </li>
  120. </ul>
  121. </div>
  122. <div class="summary">
  123. <ul class="blockList">
  124. <li class="blockList">
  125. <!-- ========== METHOD SUMMARY =========== -->
  126. <ul class="blockList">
  127. <li class="blockList"><a name="method.summary">
  128. <!-- -->
  129. </a>
  130. <h3>Method Summary</h3>
  131. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  132. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  133. <tr>
  134. <th class="colFirst" scope="col">Modifier and Type</th>
  135. <th class="colLast" scope="col">Method and Description</th>
  136. </tr>
  137. <tr id="i0" class="altColor">
  138. <td class="colFirst"><code>static void</code></td>
  139. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/jfree/chart/util/AttrStringUtils.html#drawRotatedString-java.text.AttributedString-java.awt.Graphics2D-double-float-float-">drawRotatedString</a></span>(java.text.AttributedString&nbsp;text,
  140. java.awt.Graphics2D&nbsp;g2,
  141. double&nbsp;angle,
  142. float&nbsp;x,
  143. float&nbsp;y)</code>
  144. <div class="block">Draws the attributed string at <code>(x, y)</code>, rotated by the
  145. specified angle about <code>(x, y)</code>.</div>
  146. </td>
  147. </tr>
  148. <tr id="i1" class="rowColor">
  149. <td class="colFirst"><code>static void</code></td>
  150. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/jfree/chart/util/AttrStringUtils.html#drawRotatedString-java.text.AttributedString-java.awt.Graphics2D-float-float-double-float-float-">drawRotatedString</a></span>(java.text.AttributedString&nbsp;text,
  151. java.awt.Graphics2D&nbsp;g2,
  152. float&nbsp;textX,
  153. float&nbsp;textY,
  154. double&nbsp;angle,
  155. float&nbsp;rotateX,
  156. float&nbsp;rotateY)</code>
  157. <div class="block">Draws the attributed string at <code>(textX, textY)</code>, rotated by
  158. the specified angle about <code>(rotateX, rotateY)</code>.</div>
  159. </td>
  160. </tr>
  161. <tr id="i2" class="altColor">
  162. <td class="colFirst"><code>static void</code></td>
  163. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/jfree/chart/util/AttrStringUtils.html#drawRotatedString-java.text.AttributedString-java.awt.Graphics2D-float-float-org.jfree.ui.TextAnchor-double-float-float-">drawRotatedString</a></span>(java.text.AttributedString&nbsp;text,
  164. java.awt.Graphics2D&nbsp;g2,
  165. float&nbsp;x,
  166. float&nbsp;y,
  167. org.jfree.ui.TextAnchor&nbsp;textAnchor,
  168. double&nbsp;angle,
  169. float&nbsp;rotationX,
  170. float&nbsp;rotationY)</code>
  171. <div class="block">Draws the string anchored to <code>(x, y)</code>, rotated by the
  172. specified angle about <code>(rotationX, rotationY)</code>.</div>
  173. </td>
  174. </tr>
  175. <tr id="i3" class="rowColor">
  176. <td class="colFirst"><code>static void</code></td>
  177. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/jfree/chart/util/AttrStringUtils.html#drawRotatedString-java.text.AttributedString-java.awt.Graphics2D-float-float-org.jfree.ui.TextAnchor-double-org.jfree.ui.TextAnchor-">drawRotatedString</a></span>(java.text.AttributedString&nbsp;text,
  178. java.awt.Graphics2D&nbsp;g2,
  179. float&nbsp;x,
  180. float&nbsp;y,
  181. org.jfree.ui.TextAnchor&nbsp;textAnchor,
  182. double&nbsp;angle,
  183. org.jfree.ui.TextAnchor&nbsp;rotationAnchor)</code>
  184. <div class="block">Draws a rotated string.</div>
  185. </td>
  186. </tr>
  187. <tr id="i4" class="altColor">
  188. <td class="colFirst"><code>static java.awt.geom.Rectangle2D</code></td>
  189. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/jfree/chart/util/AttrStringUtils.html#getTextBounds-java.text.AttributedString-java.awt.Graphics2D-">getTextBounds</a></span>(java.text.AttributedString&nbsp;text,
  190. java.awt.Graphics2D&nbsp;g2)</code>
  191. <div class="block">Returns the bounds for the attributed string.</div>
  192. </td>
  193. </tr>
  194. </table>
  195. <ul class="blockList">
  196. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  197. <!-- -->
  198. </a>
  199. <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
  200. <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
  201. </ul>
  202. </li>
  203. </ul>
  204. </li>
  205. </ul>
  206. </div>
  207. <div class="details">
  208. <ul class="blockList">
  209. <li class="blockList">
  210. <!-- ============ METHOD DETAIL ========== -->
  211. <ul class="blockList">
  212. <li class="blockList"><a name="method.detail">
  213. <!-- -->
  214. </a>
  215. <h3>Method Detail</h3>
  216. <a name="getTextBounds-java.text.AttributedString-java.awt.Graphics2D-">
  217. <!-- -->
  218. </a>
  219. <ul class="blockList">
  220. <li class="blockList">
  221. <h4>getTextBounds</h4>
  222. <pre>public static&nbsp;java.awt.geom.Rectangle2D&nbsp;<a href="../../../../src-html/org/jfree/chart/util/AttrStringUtils.html#line.72">getTextBounds</a>(java.text.AttributedString&nbsp;text,
  223. java.awt.Graphics2D&nbsp;g2)</pre>
  224. <div class="block">Returns the bounds for the attributed string.</div>
  225. <dl>
  226. <dt><span class="paramLabel">Parameters:</span></dt>
  227. <dd><code>text</code> - the attributed string (<code>null</code> not permitted).</dd>
  228. <dd><code>g2</code> - the graphics target (<code>null</code> not permitted).</dd>
  229. <dt><span class="returnLabel">Returns:</span></dt>
  230. <dd>The bounds (never <code>null</code>).</dd>
  231. <dt><span class="simpleTagLabel">Since:</span></dt>
  232. <dd>1.0.18</dd>
  233. </dl>
  234. </li>
  235. </ul>
  236. <a name="drawRotatedString-java.text.AttributedString-java.awt.Graphics2D-double-float-float-">
  237. <!-- -->
  238. </a>
  239. <ul class="blockList">
  240. <li class="blockList">
  241. <h4>drawRotatedString</h4>
  242. <pre>public static&nbsp;void&nbsp;<a href="../../../../src-html/org/jfree/chart/util/AttrStringUtils.html#line.91">drawRotatedString</a>(java.text.AttributedString&nbsp;text,
  243. java.awt.Graphics2D&nbsp;g2,
  244. double&nbsp;angle,
  245. float&nbsp;x,
  246. float&nbsp;y)</pre>
  247. <div class="block">Draws the attributed string at <code>(x, y)</code>, rotated by the
  248. specified angle about <code>(x, y)</code>.</div>
  249. <dl>
  250. <dt><span class="paramLabel">Parameters:</span></dt>
  251. <dd><code>text</code> - the attributed string (<code>null</code> not permitted).</dd>
  252. <dd><code>g2</code> - the graphics output target.</dd>
  253. <dd><code>angle</code> - the angle.</dd>
  254. <dd><code>x</code> - the x-coordinate.</dd>
  255. <dd><code>y</code> - the y-coordinate.</dd>
  256. <dt><span class="simpleTagLabel">Since:</span></dt>
  257. <dd>1.0.16</dd>
  258. </dl>
  259. </li>
  260. </ul>
  261. <a name="drawRotatedString-java.text.AttributedString-java.awt.Graphics2D-float-float-double-float-float-">
  262. <!-- -->
  263. </a>
  264. <ul class="blockList">
  265. <li class="blockList">
  266. <h4>drawRotatedString</h4>
  267. <pre>public static&nbsp;void&nbsp;<a href="../../../../src-html/org/jfree/chart/util/AttrStringUtils.html#line.110">drawRotatedString</a>(java.text.AttributedString&nbsp;text,
  268. java.awt.Graphics2D&nbsp;g2,
  269. float&nbsp;textX,
  270. float&nbsp;textY,
  271. double&nbsp;angle,
  272. float&nbsp;rotateX,
  273. float&nbsp;rotateY)</pre>
  274. <div class="block">Draws the attributed string at <code>(textX, textY)</code>, rotated by
  275. the specified angle about <code>(rotateX, rotateY)</code>.</div>
  276. <dl>
  277. <dt><span class="paramLabel">Parameters:</span></dt>
  278. <dd><code>text</code> - the attributed string (<code>null</code> not permitted).</dd>
  279. <dd><code>g2</code> - the graphics output target.</dd>
  280. <dd><code>textX</code> - the x-coordinate for the text.</dd>
  281. <dd><code>textY</code> - the y-coordinate for the text.</dd>
  282. <dd><code>angle</code> - the rotation angle (in radians).</dd>
  283. <dd><code>rotateX</code> - the x-coordinate for the rotation point.</dd>
  284. <dd><code>rotateY</code> - the y-coordinate for the rotation point.</dd>
  285. <dt><span class="simpleTagLabel">Since:</span></dt>
  286. <dd>1.0.16</dd>
  287. </dl>
  288. </li>
  289. </ul>
  290. <a name="drawRotatedString-java.text.AttributedString-java.awt.Graphics2D-float-float-org.jfree.ui.TextAnchor-double-float-float-">
  291. <!-- -->
  292. </a>
  293. <ul class="blockList">
  294. <li class="blockList">
  295. <h4>drawRotatedString</h4>
  296. <pre>public static&nbsp;void&nbsp;<a href="../../../../src-html/org/jfree/chart/util/AttrStringUtils.html#line.141">drawRotatedString</a>(java.text.AttributedString&nbsp;text,
  297. java.awt.Graphics2D&nbsp;g2,
  298. float&nbsp;x,
  299. float&nbsp;y,
  300. org.jfree.ui.TextAnchor&nbsp;textAnchor,
  301. double&nbsp;angle,
  302. float&nbsp;rotationX,
  303. float&nbsp;rotationY)</pre>
  304. <div class="block">Draws the string anchored to <code>(x, y)</code>, rotated by the
  305. specified angle about <code>(rotationX, rotationY)</code>.</div>
  306. <dl>
  307. <dt><span class="paramLabel">Parameters:</span></dt>
  308. <dd><code>text</code> - the text (<code>null</code> not permitted).</dd>
  309. <dd><code>g2</code> - the graphics target.</dd>
  310. <dd><code>x</code> - the x-coordinate for the text location.</dd>
  311. <dd><code>y</code> - the y-coordinate for the text location.</dd>
  312. <dd><code>textAnchor</code> - the text anchor point.</dd>
  313. <dd><code>angle</code> - the rotation (in radians).</dd>
  314. <dd><code>rotationX</code> - the x-coordinate for the rotation point.</dd>
  315. <dd><code>rotationY</code> - the y-coordinate for the rotation point.</dd>
  316. <dt><span class="simpleTagLabel">Since:</span></dt>
  317. <dd>1.0.16</dd>
  318. </dl>
  319. </li>
  320. </ul>
  321. <a name="drawRotatedString-java.text.AttributedString-java.awt.Graphics2D-float-float-org.jfree.ui.TextAnchor-double-org.jfree.ui.TextAnchor-">
  322. <!-- -->
  323. </a>
  324. <ul class="blockListLast">
  325. <li class="blockList">
  326. <h4>drawRotatedString</h4>
  327. <pre>public static&nbsp;void&nbsp;<a href="../../../../src-html/org/jfree/chart/util/AttrStringUtils.html#line.164">drawRotatedString</a>(java.text.AttributedString&nbsp;text,
  328. java.awt.Graphics2D&nbsp;g2,
  329. float&nbsp;x,
  330. float&nbsp;y,
  331. org.jfree.ui.TextAnchor&nbsp;textAnchor,
  332. double&nbsp;angle,
  333. org.jfree.ui.TextAnchor&nbsp;rotationAnchor)</pre>
  334. <div class="block">Draws a rotated string.</div>
  335. <dl>
  336. <dt><span class="paramLabel">Parameters:</span></dt>
  337. <dd><code>text</code> - the text to draw.</dd>
  338. <dd><code>g2</code> - the graphics target.</dd>
  339. <dd><code>x</code> - the x-coordinate for the text location.</dd>
  340. <dd><code>y</code> - the y-coordinate for the text location.</dd>
  341. <dd><code>textAnchor</code> - the text anchor point.</dd>
  342. <dd><code>angle</code> - the rotation (in radians).</dd>
  343. <dd><code>rotationAnchor</code> - the rotation anchor point.</dd>
  344. <dt><span class="simpleTagLabel">Since:</span></dt>
  345. <dd>1.0.16</dd>
  346. </dl>
  347. </li>
  348. </ul>
  349. </li>
  350. </ul>
  351. </li>
  352. </ul>
  353. </div>
  354. </div>
  355. <!-- ========= END OF CLASS DATA ========= -->
  356. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  357. <div class="bottomNav"><a name="navbar.bottom">
  358. <!-- -->
  359. </a>
  360. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  361. <a name="navbar.bottom.firstrow">
  362. <!-- -->
  363. </a>
  364. <ul class="navList" title="Navigation">
  365. <li><a href="../../../../overview-summary.html">Overview</a></li>
  366. <li><a href="package-summary.html">Package</a></li>
  367. <li class="navBarCell1Rev">Class</li>
  368. <li><a href="class-use/AttrStringUtils.html">Use</a></li>
  369. <li><a href="package-tree.html">Tree</a></li>
  370. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  371. <li><a href="../../../../index-files/index-1.html">Index</a></li>
  372. <li><a href="../../../../help-doc.html">Help</a></li>
  373. </ul>
  374. </div>
  375. <div class="subNav">
  376. <ul class="navList">
  377. <li>Prev&nbsp;Class</li>
  378. <li><a href="../../../../org/jfree/chart/util/CloneUtils.html" title="class in org.jfree.chart.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  379. </ul>
  380. <ul class="navList">
  381. <li><a href="../../../../index.html?org/jfree/chart/util/AttrStringUtils.html" target="_top">Frames</a></li>
  382. <li><a href="AttrStringUtils.html" target="_top">No&nbsp;Frames</a></li>
  383. </ul>
  384. <ul class="navList" id="allclasses_navbar_bottom">
  385. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  386. </ul>
  387. <div>
  388. <script type="text/javascript"><!--
  389. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  390. if(window==top) {
  391. allClassesLink.style.display = "block";
  392. }
  393. else {
  394. allClassesLink.style.display = "none";
  395. }
  396. //-->
  397. </script>
  398. </div>
  399. <div>
  400. <ul class="subNavList">
  401. <li>Summary:&nbsp;</li>
  402. <li>Nested&nbsp;|&nbsp;</li>
  403. <li>Field&nbsp;|&nbsp;</li>
  404. <li>Constr&nbsp;|&nbsp;</li>
  405. <li><a href="#method.summary">Method</a></li>
  406. </ul>
  407. <ul class="subNavList">
  408. <li>Detail:&nbsp;</li>
  409. <li>Field&nbsp;|&nbsp;</li>
  410. <li>Constr&nbsp;|&nbsp;</li>
  411. <li><a href="#method.detail">Method</a></li>
  412. </ul>
  413. </div>
  414. <a name="skip.navbar.bottom">
  415. <!-- -->
  416. </a></div>
  417. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  418. </body>
  419. </html>