aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/area/MinOptMax.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/apache/fop/area/MinOptMax.java')
-rw-r--r--src/org/apache/fop/area/MinOptMax.java52
1 files changed, 25 insertions, 27 deletions
diff --git a/src/org/apache/fop/area/MinOptMax.java b/src/org/apache/fop/area/MinOptMax.java
index 545b9b06e..3c68fafb0 100644
--- a/src/org/apache/fop/area/MinOptMax.java
+++ b/src/org/apache/fop/area/MinOptMax.java
@@ -1,6 +1,6 @@
/*
* $Id$
- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * 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.
*/
@@ -13,7 +13,6 @@ package org.apache.fop.area;
* 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.*/
@@ -22,55 +21,54 @@ public class MinOptMax implements java.io.Serializable, Cloneable {
public int max;
public MinOptMax() {
- this(0);
+ this(0);
}
public MinOptMax(int val) {
- this(val, val, val);
+ this(val, val, val);
}
public MinOptMax(int min, int opt, int max) {
- this.min = min;
- this.opt = opt;
- this.max = 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;
- }
+ 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);
+ 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);
+ 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));
+ 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;
+ min += op.min;
+ opt += op.opt;
+ max += op.max;
}
public void subtract(MinOptMax op) {
- min -= op.max;
- opt -= op.opt;
- max -= op.min;
+ min -= op.max;
+ opt -= op.opt;
+ max -= op.min;
}
-
}
+