/* * $Id$ * 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. */ package org.apache.fop.layout; import org.apache.fop.datatypes.ColorType; import org.apache.fop.datatypes.CondLength; public class BorderAndPadding implements Cloneable { public static final int TOP = 0; public static final int RIGHT = 1; public static final int BOTTOM = 2; public static final int LEFT = 3; private static class ResolvedCondLength implements Cloneable { int iLength; // Resolved length value boolean bDiscard; ResolvedCondLength(CondLength length) { bDiscard = length.isDiscard(); iLength = length.mvalue(); } public Object clone() throws CloneNotSupportedException { return super.clone(); } } /** * Return a full copy of the BorderAndPadding information. This clones all * padding and border information. * @return The copy. */ public Object clone() throws CloneNotSupportedException { BorderAndPadding bp = (BorderAndPadding) super.clone(); bp.padding = (ResolvedCondLength[])padding.clone(); bp.borderInfo = (BorderInfo[])borderInfo.clone(); for (int i=0; i