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 3.6KB

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