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.

FOTreeControl.java 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Copyright 1999-2004 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.fo;
  18. // Java
  19. import java.util.Map;
  20. import java.util.Set;
  21. // FOP
  22. import org.apache.fop.apps.FOUserAgent;
  23. import org.apache.fop.fo.extensions.Bookmarks;
  24. import org.apache.fop.fonts.FontMetrics;
  25. // Avalon
  26. import org.apache.avalon.framework.logger.Logger;
  27. /**
  28. * An interface for classes that are conceptually the parent class of the
  29. * fo.pagination.Root object. The purpose of the interface is to maintain
  30. * encapsulation of the FO Tree classes, but to acknowledge that a higher-level
  31. * object is needed to control the building of the FO Tree, to provide it
  32. * with information about the environment, and to keep track of meta-type
  33. * information.
  34. */
  35. public interface FOTreeControl {
  36. /**
  37. * @param family the font family
  38. * @param style the font style
  39. * @param weight the font weight
  40. * @return the String font name matching the parameters
  41. */
  42. String fontLookup(String family, String style,
  43. int weight);
  44. /**
  45. * @param fontName the String containing the font name for which a
  46. * FontMetrics object is desired
  47. * @return the FontMetrics object matching the fontName parameter
  48. */
  49. FontMetrics getMetricsFor(String fontName);
  50. /**
  51. * @return true if the default font has been properly setup
  52. */
  53. boolean isSetupValid();
  54. /**
  55. * @return a Map containing the Fonts used in this FO Tree
  56. */
  57. Map getFonts();
  58. /**
  59. * Sets the Bookmark object which encapsulates the bookmarks for the FO
  60. * Tree.
  61. * @param bookmarks the Bookmark object encapsulating the bookmarks for this
  62. * FO Tree.
  63. */
  64. void setBookmarks(Bookmarks bookmarks);
  65. /**
  66. * @return the Bookmark object encapsulating the bookmarks for the FO Tree.
  67. */
  68. Bookmarks getBookmarks();
  69. /**
  70. * Returns the set of ID references found in the FO Tree.
  71. * @return the ID references
  72. */
  73. Set getIDReferences();
  74. /**
  75. * @return the FOInputHandler for parsing this FO Tree
  76. */
  77. FOInputHandler getFOInputHandler();
  78. /**
  79. * @return the Logger being used with this FO Tree
  80. */
  81. Logger getLogger();
  82. /**
  83. * @return the FOUserAgent used for processing this FO Tree
  84. */
  85. FOUserAgent getUserAgent();
  86. }