diff options
author | Keiron Liddle <keiron@apache.org> | 2003-02-13 04:24:19 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2003-02-13 04:24:19 +0000 |
commit | b85d39223993219dabcedda0f5187e3897ac5e9c (patch) | |
tree | 68b4be5c0b901639845d8d7477134c972b554bb9 /src/org/apache/fop/area/MinOptMax.java | |
parent | c557cab146937985244cd88efbe5c7b1e24dace6 (diff) | |
download | xmlgraphics-fop-b85d39223993219dabcedda0f5187e3897ac5e9c.tar.gz xmlgraphics-fop-b85d39223993219dabcedda0f5187e3897ac5e9c.zip |
moved MinOptMax to where it is used
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195939 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/area/MinOptMax.java')
-rw-r--r-- | src/org/apache/fop/area/MinOptMax.java | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/src/org/apache/fop/area/MinOptMax.java b/src/org/apache/fop/area/MinOptMax.java deleted file mode 100644 index 7332336d2..000000000 --- a/src/org/apache/fop/area/MinOptMax.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * $Id$ - * Copyright (C) 2001-2003 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.area; - -/** - * This class holds the resolved (as mpoints) form of a LengthRange or - * Space type Property value. - * MinOptMax values are used during layout calculations. The instance - * variables are package visible. - */ -public class MinOptMax implements java.io.Serializable, Cloneable { - - /** Publicly visible min(imum), opt(imum) and max(imum) values.*/ - public int min; - public int opt; - public int max; - - public MinOptMax() { - this(0); - } - - public MinOptMax(int val) { - this(val, val, val); - } - - public MinOptMax(int min, int opt, int max) { - this.min = min; - this.opt = opt; - this.max = max; - } - - public Object clone() { - try { - return super.clone(); - } catch (CloneNotSupportedException ex) { - // SHOULD NEVER OCCUR - all members are primitive types! - return null; - } - } - - public static MinOptMax subtract(MinOptMax op1, MinOptMax op2) { - return new MinOptMax(op1.min - op2.max, op1.opt - op2.opt, - op1.max - op2.min); - } - - public static MinOptMax add(MinOptMax op1, MinOptMax op2) { - return new MinOptMax(op1.min + op2.min, op1.opt + op2.opt, - op1.max + op2.max); - } - - public static MinOptMax multiply(MinOptMax op1, double mult) { - return new MinOptMax((int)(op1.min * mult), - (int)(op1.opt * mult), (int)(op1.max * mult)); - } - - public void add(MinOptMax op) { - min += op.min; - opt += op.opt; - max += op.max; - } - - public void subtract(MinOptMax op) { - min -= op.max; - opt -= op.opt; - max -= op.min; - } - -} - |