Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

LeaderArea.java 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001 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.layout.inline;
  8. import org.apache.fop.render.Renderer;
  9. import org.apache.fop.layout.*;
  10. import java.util.Vector;
  11. import java.util.Enumeration;
  12. public class LeaderArea extends InlineArea {
  13. int ruleThickness;
  14. int leaderLengthOptimum;
  15. int leaderPattern;
  16. int ruleStyle;
  17. float red, green, blue;
  18. public LeaderArea(FontState fontState, float red, float green,
  19. float blue, String text, int leaderLengthOptimum,
  20. int leaderPattern, int ruleThickness, int ruleStyle) {
  21. super(fontState, leaderLengthOptimum, red, green, blue);
  22. this.leaderPattern = leaderPattern;
  23. this.leaderLengthOptimum = leaderLengthOptimum;
  24. this.ruleStyle = ruleStyle;
  25. // following the xsl spec rule: if rule-style="none" set thickness to 0;
  26. // actually in pdf this doesn't work, because a very thin line is still shown
  27. // this is handled in the pdf renderer
  28. if (ruleStyle == org.apache.fop.fo.properties.RuleStyle.NONE) {
  29. ruleThickness = 0;
  30. }
  31. this.ruleThickness = ruleThickness;
  32. }
  33. public int getRuleThickness() {
  34. return this.ruleThickness;
  35. }
  36. public int getRuleStyle() {
  37. return this.ruleStyle;
  38. }
  39. public int getLeaderPattern() {
  40. return this.leaderPattern;
  41. }
  42. public int getLeaderLength() {
  43. return this.contentRectangleWidth;
  44. }
  45. }