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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Slash.java
  3. * $Id$
  4. *
  5. *
  6. *
  7. * Copyright 1999-2003 The Apache Software Foundation.
  8. *
  9. * Licensed under the Apache License, Version 2.0 (the "License");
  10. * you may not use this file except in compliance with the License.
  11. * You may obtain a copy of the License at
  12. *
  13. * http://www.apache.org/licenses/LICENSE-2.0
  14. *
  15. * Unless required by applicable law or agreed to in writing, software
  16. * distributed under the License is distributed on an "AS IS" BASIS,
  17. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. * See the License for the specific language governing permissions and
  19. * limitations under the License.
  20. *
  21. *
  22. */
  23. package org.apache.fop.datatypes;
  24. import org.apache.fop.fo.expr.PropertyException;
  25. /**
  26. * A datatype representing an isolated forward slash character.
  27. * The only known occurence of an isolated forward slash is as a separator
  28. * between <em>font-size</em> and <em>line-height</em> specifiers in a
  29. * <em>font </em> shorthand value.
  30. * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
  31. * @version $Revision$ $Name$
  32. */
  33. public class Slash extends AbstractPropertyValue {
  34. private static final String tag = "$Name$";
  35. private static final String revision = "$Revision$";
  36. /**
  37. * @param property the <tt>int</tt> index of the property on which
  38. * this value is being defined.
  39. * @exception PropertyException
  40. */
  41. public Slash (int property)
  42. throws PropertyException
  43. {
  44. super(property, PropertyValue.SLASH);
  45. }
  46. /**
  47. * @param propertyName the <tt>String</tt< name of the property on which
  48. * this value is being defined.
  49. * @exception PropertyException
  50. */
  51. public Slash (String propertyName)
  52. throws PropertyException
  53. {
  54. super(propertyName, PropertyValue.SLASH);
  55. }
  56. public String toString() {
  57. return "/";
  58. }
  59. /**
  60. * Validation not supported for <tt>Slash</tt>.
  61. */
  62. public void validate() throws PropertyException {
  63. throw new PropertyException
  64. ("Slash datatype should never be validated");
  65. }
  66. }