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.

Leader.java 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.area.inline;
  18. import org.apache.fop.fo.Constants;
  19. /**
  20. * This is a leader inline area.
  21. * This class is only used for leader with leader-pattern of rule.
  22. */
  23. public class Leader extends InlineArea {
  24. // in the case of use content or dots this is replaced
  25. // with the set of inline areas
  26. // if space replaced with a space
  27. // otherwise this is a holder for a line
  28. private int ruleStyle = Constants.RuleStyle.SOLID;
  29. private int ruleThickness = 1000;
  30. /**
  31. * Create a new leader area.
  32. */
  33. public Leader() {
  34. }
  35. /**
  36. * Set the rule style of this leader area.
  37. *
  38. * @param style the rule style for the leader line
  39. */
  40. public void setRuleStyle(int style) {
  41. ruleStyle = style;
  42. }
  43. /**
  44. * Set the rule thickness of the rule in miilipoints.
  45. *
  46. * @param rt the rule thickness in millipoints
  47. */
  48. public void setRuleThickness(int rt) {
  49. ruleThickness = rt;
  50. }
  51. /**
  52. * Get the rule style of this leader.
  53. *
  54. * @return the rule style
  55. */
  56. public int getRuleStyle() {
  57. return ruleStyle;
  58. }
  59. /**
  60. * Get the rule thickness of the rule in miilipoints.
  61. *
  62. * @return the rule thickness in millipoints
  63. */
  64. public int getRuleThickness() {
  65. return ruleThickness;
  66. }
  67. }