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.

InlineSpace.java 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. public class InlineSpace extends Space {
  11. private int size; // in millipoints
  12. private boolean resizeable =
  13. true; // to disallow size changes during justification of a line
  14. // Used to discard some pending spaces in LineArea
  15. private boolean eatable = false;
  16. // Textdecoration
  17. protected boolean underlined = false;
  18. protected boolean overlined = false;
  19. protected boolean lineThrough = false;
  20. public InlineSpace(int amount) {
  21. this.size = amount;
  22. }
  23. public InlineSpace(int amount, boolean resizeable) {
  24. this.resizeable = resizeable;
  25. this.size = amount;
  26. }
  27. /**
  28. * @param ul true if text should be underlined
  29. */
  30. public void setUnderlined(boolean ul) {
  31. this.underlined = ul;
  32. }
  33. public boolean getUnderlined() {
  34. return this.underlined;
  35. }
  36. public void setOverlined(boolean ol) {
  37. this.overlined = ol;
  38. }
  39. public boolean getOverlined() {
  40. return this.overlined;
  41. }
  42. public void setLineThrough(boolean lt) {
  43. this.lineThrough = lt;
  44. }
  45. public boolean getLineThrough() {
  46. return this.lineThrough;
  47. }
  48. public int getSize() {
  49. return size;
  50. }
  51. public void setSize(int amount) {
  52. this.size = amount;
  53. }
  54. public boolean getResizeable() {
  55. return resizeable;
  56. }
  57. public void setResizeable(boolean resizeable) {
  58. this.resizeable = resizeable;
  59. }
  60. /**
  61. * And eatable InlineSpace is discarded if it occurs
  62. * as the first pending element in a LineArea
  63. */
  64. public void setEatable(boolean eatable) {
  65. this.eatable = eatable;
  66. }
  67. public boolean isEatable() {
  68. return eatable;
  69. }
  70. }