12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- /*
- * $Id$
- * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
- * For details on use and redistribution please refer to the
- * LICENSE file included with these sources.
- */
-
- package org.apache.fop.datatypes;
-
- import org.apache.fop.fo.Property;
-
- /**
- * a space quantity in XSL (space-before, space-after)
- */
- public class Space extends LengthRange {
-
- private Property precedence;
- private Property conditionality;
-
- // From CompoundDatatype
- public void setComponent(String sCmpnName, Property cmpnValue,
- boolean bIsDefault) {
- if (sCmpnName.equals("precedence")) {
- setPrecedence(cmpnValue, bIsDefault);
- } else if (sCmpnName.equals("conditionality")) {
- setConditionality(cmpnValue, bIsDefault);
- } else {
- super.setComponent(sCmpnName, cmpnValue, bIsDefault);
- }
- }
-
- // From CompoundDatatype
- public Property getComponent(String sCmpnName) {
- if (sCmpnName.equals("precedence")) {
- return getPrecedence();
- } else if (sCmpnName.equals("conditionality")) {
- return getConditionality();
- } else {
- return super.getComponent(sCmpnName);
- }
- }
-
- protected void setPrecedence(Property precedence, boolean bIsDefault) {
- this.precedence = precedence;
- }
-
- protected void setConditionality(Property conditionality,
- boolean bIsDefault) {
- this.conditionality = conditionality;
- }
-
- public Property getPrecedence() {
- return this.precedence;
- }
-
- public Property getConditionality() {
- return this.conditionality;
- }
-
- }
|