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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* $Id$
  2. * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  3. * For details on use and redistribution please refer to the
  4. * LICENSE file included with these sources.
  5. */
  6. package org.apache.fop.layout.inline;
  7. import org.apache.fop.render.Renderer;
  8. import org.apache.fop.layout.*;
  9. public class InlineSpace extends Space {
  10. private int size; // in millipoints
  11. private boolean resizeable = true; //to disallow size changes during justification of a line
  12. // Textdecoration
  13. protected boolean underlined = false;
  14. protected boolean overlined = false;
  15. protected boolean lineThrough = false;
  16. public InlineSpace(int amount) {
  17. this.size = amount;
  18. }
  19. public InlineSpace(int amount, boolean resizeable) {
  20. this.resizeable = resizeable;
  21. this.size = amount;
  22. }
  23. /**
  24. * @param ul true if text should be underlined
  25. */
  26. public void setUnderlined(boolean ul) {
  27. this.underlined = ul;
  28. }
  29. public boolean getUnderlined() {
  30. return this.underlined;
  31. }
  32. public void setOverlined(boolean ol) {
  33. this.overlined = ol;
  34. }
  35. public boolean getOverlined() {
  36. return this.overlined;
  37. }
  38. public void setLineThrough(boolean lt) {
  39. this.lineThrough = lt;
  40. }
  41. public boolean getLineThrough() {
  42. return this.lineThrough;
  43. }
  44. public int getSize() {
  45. return size;
  46. }
  47. public void setSize(int amount) {
  48. this.size = amount;
  49. }
  50. public boolean getResizeable() {
  51. return resizeable;
  52. }
  53. public void setResizeable(boolean resizeable) {
  54. this.resizeable = resizeable;
  55. }
  56. public void render(Renderer renderer) {
  57. renderer.renderInlineSpace(this);
  58. }
  59. }