From 638ba8591ea3b38e2908376bce29c53b8bec2587 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Thu, 3 Oct 2002 11:55:58 +0000 Subject: [PATCH] Removed. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195281 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/datatypes/PropertyTriplet.java | 238 ------------------ 1 file changed, 238 deletions(-) delete mode 100644 src/org/apache/fop/datatypes/PropertyTriplet.java diff --git a/src/org/apache/fop/datatypes/PropertyTriplet.java b/src/org/apache/fop/datatypes/PropertyTriplet.java deleted file mode 100644 index b9c8ca944..000000000 --- a/src/org/apache/fop/datatypes/PropertyTriplet.java +++ /dev/null @@ -1,238 +0,0 @@ -package org.apache.fop.datatypes; - -import org.apache.fop.fo.PropertyConsts; -import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.FONode; -import org.apache.fop.fo.expr.PropertyException; - -/** - * PropertyTriplet.java - * $Id$ - * - * Created: Tue Nov 20 22:18:11 2001 - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. - * For details on use and redistribution please refer to the - * LICENSE file included with these sources. - * @author Peter B. West - * @version $Revision$ $Name$ - */ -/** - * A PropertyTriplet is a set of possible values of an - * instance of a property at a given point in the FO tree. The three - * possible values are specified, computed and actual. All three values - * are represented by a subclass of PropertyValue. - *

- * Values may, and frequently will be, null, especially specified and actual. - */ - -public class PropertyTriplet { - - /** The property with which this triplet is associated. */ - private int property; - /** - * The specified property value. Note that this may be a - * reference to a value associated with another property, so its - * property index may be different from property. - * TODO - ensure that whenever a value is derived from another property, - * that the value is cloned and the property correctly set, rather than - * simply held here as a reference. This will render the above note - * obsolete. Same for computed and actual. - */ - private PropertyValue specified; - /** - * The computed property value. Note that this may be a - * reference to a value associated with another property, so its - * property index may be different from property. - */ - private PropertyValue computed; - /** - * The actual property value. Note that this may be a - * reference to a value associated with another property, so its - * property index may be different from property. - */ - private PropertyValue actual; - private boolean wasSpecified; - - /** - * The FONode that stacked this triplet. This is required in - * event that later a triplet is overriden by a higher priority property - * within the same FO; e.g. when the expansion of a shorthand is - * overriden by a direct assignment. - */ - private FONode stackedBy = null; - - public PropertyTriplet() { - // PropertyValues are null - } - - /** - * @param property an int property index. - * @param specified a PropertyValue. - * @param computed a PropertyValue. - * @param actual a PropertyValue. - * @exception PropertyException if property is not within the - * range of valid property indices. - */ - public PropertyTriplet(int property, PropertyValue specified, - PropertyValue computed, PropertyValue actual) - throws PropertyException - { - if (property < 0 || property > PropNames.LAST_PROPERTY_INDEX) - throw new PropertyException("Invalid property index."); - - this.property = property; - this.specified = specified; - this.computed = computed; - this.actual = actual; - } - - /** - * @param propertyName a String containing property name. - * @param specified a PropertyValue. - * @param computed a PropertyValue. - * @param actual a PropertyValue. - * @exception PropertyException if property is not within the - * range of valid property indices. - */ - public PropertyTriplet(String propertyName, PropertyValue specified, - PropertyValue computed, PropertyValue actual) - throws PropertyException - { - this(PropertyConsts.getPropertyIndex(propertyName), - specified, computed, actual); - } - - /** - * @param property an int property index. - * @param specified a PropertyValue. - */ - public PropertyTriplet(int property, PropertyValue specified) - throws PropertyException - { - this(property, specified, null, null); - } - - /** - * @param property an int property index. - * @param specified a PropertyValue. - * @param computed a PropertyValue. - */ - public PropertyTriplet - (int property, PropertyValue specified, PropertyValue computed) - throws PropertyException - { - this(property, specified, computed, null); - } - - /** - * Set the specified value. - * @param value a PropertyValue. - */ - public void setSpecified(PropertyValue value) { - specified = value; - } - - /** - * Set the computed value. - * @param value a PropertyValue. - */ - public void setComputed(PropertyValue value) { - computed = value; - } - - /** - * Set the actual value. - * @param value a PropertyValue. - */ - public void setActual(PropertyValue value) { - actual = value; - } - - /** - * Get the specified value. - * @return the specified PropertyValue. - */ - public PropertyValue getSpecified() { - return specified; - } - - /** - * Get the computed value. - * @return the computed PropertyValue. - */ - public PropertyValue getComputed() { - return computed; - } - - /** - * Get the actual value. - * @return the actual PropertyValue. - */ - public PropertyValue getActual() { - return actual; - } - - /** - * Get the property index associated with this triplet. - * @return the property index. - */ - public int getProperty() { - return property; - } - - /** - * Get the property index associated with the specified value. - * @return the property index. - */ - public int getSpecifiedProperty() { - return specified.getProperty(); - } - - /** - * Get the property index associated with the computed value. - * @return the property index. - */ - public int getComputedProperty() { - return computed.getProperty(); - } - - /** - * Get the property index associated with the actual value. - * @return the property index. - */ - public int getActualProperty() { - return actual.getProperty(); - } - - /** - * Retrieve the FONode that stacked this PropertyTriplet. - */ - public FONode getStackedBy() { - return stackedBy; - } - - /** - * Record the FONode that stacked this PropertyTriplet. - */ - public void setStackedBy(FONode stackedBy) { - this.stackedBy = stackedBy; - } - - public String toString() { - String tmpstr = "Specified: "; - if (specified != null) tmpstr += specified.toString(); - else tmpstr += "null"; - tmpstr += "\nComputed: "; - if (computed != null) tmpstr += computed.toString(); - else tmpstr += "null"; - tmpstr += "\nActual: "; - if (actual != null) tmpstr += actual.toString(); - else tmpstr += "null"; - tmpstr += "\nStacked by: "; - if (stackedBy != null) tmpstr+= stackedBy.hashCode(); - else tmpstr += "null"; - tmpstr += "\n"; - return tmpstr; - } - -} -- 2.39.5