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.

AFPLineDataInfo.java 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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. /** Line data information */
  21. public class AFPLineDataInfo {
  22. /** the x1 coordinate */
  23. private int x1;
  24. /** the y1 coordinate */
  25. private int y1;
  26. /** the x2 coordinate */
  27. private int x2;
  28. /** the y2 coordinate */
  29. private int y2;
  30. /** the thickness */
  31. private int thickness;
  32. /** the painting color */
  33. private Color color;
  34. /** the rotation */
  35. private int rotation;
  36. /**
  37. * Default constructor
  38. */
  39. public AFPLineDataInfo() {
  40. }
  41. /**
  42. * Copy constructor.
  43. * @param template the object to copy
  44. */
  45. public AFPLineDataInfo(AFPLineDataInfo template) {
  46. this.x1 = template.x1;
  47. this.y1 = template.y1;
  48. this.x2 = template.x2;
  49. this.y2 = template.y2;
  50. this.thickness = template.thickness;
  51. this.color = template.color;
  52. this.rotation = template.rotation;
  53. }
  54. /**
  55. * Returns the X1 coordinate
  56. *
  57. * @return the X1 coordinate
  58. */
  59. public int getX1() {
  60. return x1;
  61. }
  62. /**
  63. * Sets the X1 coordinate
  64. *
  65. * @param x1 the X1 coordinate
  66. */
  67. public void setX1(int x1) {
  68. this.x1 = x1;
  69. }
  70. /**
  71. * Returns the Y1 coordinate
  72. *
  73. * @return the Y1 coordinate
  74. */
  75. public int getY1() {
  76. return y1;
  77. }
  78. /**
  79. * Sets the Y1 coordinate
  80. *
  81. * @param y1 the Y1 coordinate
  82. */
  83. public void setY1(int y1) {
  84. this.y1 = y1;
  85. }
  86. /**
  87. * Returns the X2 coordinate
  88. *
  89. * @return the X2 coordinate
  90. */
  91. public int getX2() {
  92. return x2;
  93. }
  94. /**
  95. * Sets the X2 coordinate
  96. *
  97. * @param x2 the X2 coordinate
  98. */
  99. public void setX2(int x2) {
  100. this.x2 = x2;
  101. }
  102. /**
  103. * Returns the Y2 coordinate
  104. *
  105. * @return the Y2 coordinate
  106. */
  107. public int getY2() {
  108. return y2;
  109. }
  110. /**
  111. * Sets the Y2 coordinate
  112. *
  113. * @param y2 the Y2 coordinate
  114. */
  115. public void setY2(int y2) {
  116. this.y2 = y2;
  117. }
  118. /**
  119. * Returns the line thickness
  120. *
  121. * @return the line thickness
  122. */
  123. public int getThickness() {
  124. return thickness;
  125. }
  126. /**
  127. * Sets the line thickness
  128. *
  129. * @param thickness the line thickness
  130. */
  131. public void setThickness(int thickness) {
  132. this.thickness = thickness;
  133. }
  134. /**
  135. * Returns line color
  136. *
  137. * @return the line color
  138. */
  139. public Color getColor() {
  140. return color;
  141. }
  142. /**
  143. * Sets the line color
  144. *
  145. * @param color the line color
  146. */
  147. public void setColor(Color color) {
  148. this.color = color;
  149. }
  150. /**
  151. * Returns line rotation
  152. *
  153. * @return the line rotation
  154. */
  155. public int getRotation() {
  156. return rotation;
  157. }
  158. /**
  159. * Sets the line rotation
  160. *
  161. * @param rotation the line rotation
  162. */
  163. public void setRotation(int rotation) {
  164. this.rotation = rotation;
  165. }
  166. /** {@inheritDoc} */
  167. public String toString() {
  168. return "AFPLineDataInfo{x1=" + x1
  169. + ", y1=" + y1
  170. + ", x2=" + x2
  171. + ", y2=" + y2
  172. + ", thickness=" + thickness
  173. + ", color=" + color
  174. + ", rotation=" + rotation
  175. + "}";
  176. }
  177. }