You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AFPTextDataInfo.java 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.afp;
  19. import java.awt.Color;
  20. /**
  21. * Text data information
  22. */
  23. public class AFPTextDataInfo {
  24. /** the text font reference */
  25. private int fontReference;
  26. /** the text x coordinate position */
  27. private int x;
  28. /** the text y coordinate position */
  29. private int y;
  30. /** the text color */
  31. private Color color;
  32. /** the text variable space adjustment */
  33. private int variableSpaceCharacterIncrement;
  34. /** the text inter character adjustment */
  35. private int interCharacterAdjustment;
  36. /** the text orientation */
  37. private int rotation;
  38. /** the text encoding */
  39. private String textEncoding;
  40. /** the text string */
  41. private String textString;
  42. /**
  43. * Returns the font reference
  44. *
  45. * @return the font reference
  46. */
  47. public int getFontReference() {
  48. return fontReference;
  49. }
  50. /**
  51. * Sets the font reference
  52. *
  53. * @param fontReference the font reference
  54. */
  55. public void setFontReference(int fontReference) {
  56. this.fontReference = fontReference;
  57. }
  58. /**
  59. * Returns the x coordinate
  60. *
  61. * @return the x coordinate
  62. */
  63. public int getX() {
  64. return x;
  65. }
  66. /**
  67. * Sets the X coordinate
  68. *
  69. * @param x the X coordinate
  70. */
  71. public void setX(int x) {
  72. this.x = x;
  73. }
  74. /**
  75. * Returns the y coordinate
  76. *
  77. * @return the y coordinate
  78. */
  79. public int getY() {
  80. return y;
  81. }
  82. /**
  83. * Sets the Y coordinate
  84. *
  85. * @param y the Y coordinate
  86. */
  87. public void setY(int y) {
  88. this.y = y;
  89. }
  90. /**
  91. * Returns the color
  92. *
  93. * @return the color
  94. */
  95. public Color getColor() {
  96. return color;
  97. }
  98. /**
  99. * Sets the color
  100. *
  101. * @param color the color
  102. */
  103. public void setColor(Color color) {
  104. this.color = color;
  105. }
  106. /**
  107. * Return the variable space character increment
  108. *
  109. * @return the variable space character increment
  110. */
  111. public int getVariableSpaceCharacterIncrement() {
  112. return variableSpaceCharacterIncrement;
  113. }
  114. /**
  115. * Sets the variable space character increment
  116. *
  117. * @param variableSpaceCharacterIncrement the variable space character increment
  118. */
  119. public void setVariableSpaceCharacterIncrement(
  120. int variableSpaceCharacterIncrement) {
  121. this.variableSpaceCharacterIncrement = variableSpaceCharacterIncrement;
  122. }
  123. /**
  124. * Return the inter character adjustment
  125. *
  126. * @return the inter character adjustment
  127. */
  128. public int getInterCharacterAdjustment() {
  129. return interCharacterAdjustment;
  130. }
  131. /**
  132. * Sets the inter character adjustment
  133. *
  134. * @param interCharacterAdjustment the inter character adjustment
  135. */
  136. public void setInterCharacterAdjustment(int interCharacterAdjustment) {
  137. this.interCharacterAdjustment = interCharacterAdjustment;
  138. }
  139. /**
  140. * Sets the text orientation
  141. *
  142. * @param rotation the text rotation
  143. */
  144. public void setRotation(int rotation) {
  145. this.rotation = rotation;
  146. }
  147. /**
  148. * Returns the text rotation
  149. *
  150. * @return the text rotation
  151. */
  152. public int getRotation() {
  153. return this.rotation;
  154. }
  155. /**
  156. * Sets the text encoding
  157. *
  158. * @param textEncoding the text encoding
  159. */
  160. public void setEncoding(String textEncoding) {
  161. this.textEncoding = textEncoding;
  162. }
  163. /**
  164. * Returns the text encoding
  165. *
  166. * @return the text encoding
  167. */
  168. public String getEncoding() {
  169. return this.textEncoding;
  170. }
  171. /**
  172. * Sets the text string
  173. *
  174. * @param textString the text string
  175. */
  176. public void setString(String textString) {
  177. this.textString = textString;
  178. }
  179. /**
  180. * Returns the text string
  181. *
  182. * @return the text string
  183. */
  184. public String getString() {
  185. return this.textString;
  186. }
  187. /** {@inheritDoc} */
  188. public String toString() {
  189. return "TextDataInfo{fontReference=" + fontReference
  190. + ", x=" + x
  191. + ", y=" + y
  192. + ", color=" + color
  193. + ", vsci=" + variableSpaceCharacterIncrement
  194. + ", ica=" + interCharacterAdjustment
  195. + ", orientation=" + rotation
  196. + ", textString=" + textString
  197. + ", textEncoding=" + textEncoding
  198. + "}";
  199. }
  200. }