-
Notifications
You must be signed in to change notification settings - Fork 3
/
lithium_h2_GrayPaintScale.java
38 lines (38 loc) · 1.13 KB
/
lithium_h2_GrayPaintScale.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package org.jfree.chart.renderer;
import java.awt.Color;
import java.awt.Paint;
import java.io.Serializable;
import org.jfree.chart.util.PublicCloneable;
public class GrayPaintScale
implements PaintScale, PublicCloneable, Serializable {
private double lowerBound;
private double upperBound;
public GrayPaintScale() {
}
public GrayPaintScale(double lowerBound, double upperBound) {
if (lowerBound >= upperBound) {
}
}
public double getLowerBound() {
return this.lowerBound;
}
public double getUpperBound() {
return this.upperBound;
}
public Paint getPaint(double value) {
int g = (int) ((value - this.lowerBound) / (this.upperBound
- this.lowerBound) * 255.0);
return new Color(g, g, g);
}
public boolean equals(Object obj) {
GrayPaintScale that = (GrayPaintScale) obj;
if (this.lowerBound != that.lowerBound) {
}
if (this.upperBound != that.upperBound) {
}
return true;
}
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
}