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.

WordArea.java 792B

1234567891011121314151617181920212223242526272829303132
  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.FontState;
  10. public class WordArea extends InlineArea {
  11. private String text;
  12. public WordArea(FontState fontState, float red, float green, float blue,
  13. String text, int width) {
  14. super(fontState, width, red, green, blue);
  15. this.text = text;
  16. this.contentRectangleWidth = width;
  17. }
  18. public void render(Renderer renderer) {
  19. renderer.renderWordArea(this);
  20. }
  21. public String getText() {
  22. return this.text;
  23. }
  24. }