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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.fo.flow;
  19. // FOP
  20. import org.xml.sax.Locator;
  21. import org.apache.fop.apps.FOPException;
  22. import org.apache.fop.fo.FONode;
  23. import org.apache.fop.fo.FObj;
  24. import org.apache.fop.fo.PropertyList;
  25. import org.apache.fop.fo.ValidationException;
  26. /**
  27. * Class modelling the fo:multi-toggle property.
  28. */
  29. public class MultiToggle extends FObj {
  30. // The value of properties relevant for fo:multi-toggle (commented out for performance).
  31. // private CommonAccessibility commonAccessibility;
  32. // public ToBeImplementedProperty prSwitchTo;
  33. // End of property values
  34. static boolean notImplementedWarningGiven = false;
  35. /**
  36. * @param parent FONode that is the parent of this object
  37. */
  38. public MultiToggle(FONode parent) {
  39. super(parent);
  40. if (!notImplementedWarningGiven) {
  41. getFOValidationEventProducer().unimplementedFeature(this, getName(),
  42. getName(), getLocator());
  43. notImplementedWarningGiven = true;
  44. }
  45. }
  46. /**
  47. * {@inheritDoc}
  48. */
  49. public void bind(PropertyList pList) throws FOPException {
  50. // prSwitchTo = pList.get(PR_SWITCH_TO);
  51. }
  52. /**
  53. * {@inheritDoc}
  54. * XSL Content Model: (#PCDATA|%inline;|%block;)*
  55. */
  56. protected void validateChildNode(Locator loc, String nsURI, String localName)
  57. throws ValidationException {
  58. if (FO_URI.equals(nsURI)) {
  59. if (!isBlockOrInlineItem(nsURI, localName)) {
  60. invalidChildError(loc, nsURI, localName);
  61. }
  62. }
  63. }
  64. /** {@inheritDoc} */
  65. public String getLocalName() {
  66. return "multi-toggle";
  67. }
  68. /**
  69. * {@inheritDoc}
  70. */
  71. public int getNameId() {
  72. return FO_MULTI_TOGGLE;
  73. }
  74. }