Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Leader.java 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
  4. * For details on use and redistribution please refer to the
  5. * LICENSE file included with these sources.
  6. */
  7. package org.apache.fop.area.inline;
  8. import org.apache.fop.render.Renderer;
  9. import org.apache.fop.fo.properties.RuleStyle;
  10. /**
  11. * This is a leader inline area.
  12. * This class is only used for leader with leader-pattern of rule.
  13. */
  14. public class Leader extends InlineArea {
  15. // pattern, length min opt max
  16. // in the case of use content or dots this is replaced
  17. // with the set of inline areas
  18. // if space replaced with a space
  19. // otherwise this is a holder for a line
  20. private int ruleStyle = RuleStyle.SOLID;
  21. private int ruleThickness = 1000;
  22. /**
  23. * Create a new leader area.
  24. */
  25. public Leader() {
  26. }
  27. /**
  28. * Set the rule style of this leader area.
  29. *
  30. * @param style the rule style for the leader line
  31. */
  32. public void setRuleStyle(int style) {
  33. ruleStyle = style;
  34. }
  35. /**
  36. * Set the rule thickness of the rule in miilipoints.
  37. *
  38. * @param rt the rule thickness in millipoints
  39. */
  40. public void setRuleThickness(int rt) {
  41. ruleThickness = rt;
  42. }
  43. /**
  44. * Get the rule style of this leader.
  45. *
  46. * @return the rule style
  47. */
  48. public int getRuleStyle() {
  49. return ruleStyle;
  50. }
  51. /**
  52. * Get the rule thickness of the rule in miilipoints.
  53. *
  54. * @return the rule thickness in millipoints
  55. */
  56. public int getRuleThickness() {
  57. return ruleThickness;
  58. }
  59. /**
  60. * Render this leader in the current renderer.
  61. *
  62. * @param renderer the renderer to render this inline area
  63. */
  64. public void render(Renderer renderer) {
  65. renderer.renderLeader(this);
  66. }
  67. }