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.

Resolvable.java 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.area;
  19. import java.util.List;
  20. /**
  21. * Resolvable Interface. Classes that implement this interface contain
  22. * idrefs (see Section 5.11 of spec for definition of <idref> datatype)
  23. * that are resolved when their target IDs are added to the area tree.
  24. */
  25. public interface Resolvable {
  26. /**
  27. * Check if this area has been resolved.
  28. *
  29. * @return true once this area is resolved
  30. */
  31. boolean isResolved();
  32. /**
  33. * Get the array of idrefs of this resolvable object.
  34. * If this object contains child resolvables that are
  35. * resolved through this then it should return the idref's of
  36. * the child also.
  37. *
  38. * @return the id references for resolving this object
  39. */
  40. String[] getIDRefs();
  41. /**
  42. * This method allows the Resolvable object to resolve one of
  43. * its unresolved idrefs with the actual set of PageViewports
  44. * containing the target ID. The Resolvable object initially
  45. * identifies to the AreaTreeHandler which idrefs it needs
  46. * resolved. After the idrefs are resolved, the ATH calls this
  47. * method to allow the Resolvable object to update itself with
  48. * the PageViewport information.
  49. *
  50. * @param id an ID matching one of the Resolvable object's
  51. * unresolved idref's.
  52. * @param pages the list of PageViewports with the given ID
  53. *
  54. */
  55. void resolveIDRef(String id, List<PageViewport> pages);
  56. }