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.

Character.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /**
  10. * Single character inline area.
  11. * This inline area holds a single characater.
  12. */
  13. public class Character extends InlineArea {
  14. private char character;
  15. /**
  16. * Create a new characater inline area with the given character.
  17. *
  18. * @param ch the character for this inline area
  19. */
  20. public Character(char ch) {
  21. character = ch;
  22. }
  23. // character info: font, char spacing, colour, baseline
  24. /**
  25. * Render this inline area.
  26. *
  27. * @param renderer the renderer to render this character area
  28. */
  29. public void render(Renderer renderer) {
  30. renderer.renderCharacter(this);
  31. }
  32. /**
  33. * Get the character for this inline character area.
  34. *
  35. * @return the character
  36. */
  37. public char getChar() {
  38. return character;
  39. }
  40. }