wxr
2022-10-28 bab36f8002d92e7125dfc40023f566266e3fdb38
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.mm.android.deviceaddmodule.mobilecommon.widget.linechart.model;
 
import android.graphics.Color;
 
import com.mm.android.deviceaddmodule.mobilecommon.widget.linechart.utils.Utils;
 
public class WarnLine {
 
    public static final float D_WARN_WIDTH = 2;
    public static final float D_WARN_TXT_SIZE = 15;
 
    int warnColor = Color.RED;
    float warnLineWidth;
    float txtSize ;
 
    boolean enable = true;
    double value;//预警数值
 
 
    public WarnLine(double value) {
        this.value = value;
 
        warnLineWidth = Utils.dp2px(D_WARN_WIDTH);
        txtSize = Utils.dp2px(D_WARN_TXT_SIZE);
    }
 
    public WarnLine(double value, int warnColor) {
        this.value = value;
        this.warnColor = warnColor;
 
        warnLineWidth = Utils.dp2px(D_WARN_WIDTH);
        txtSize = Utils.dp2px(D_WARN_TXT_SIZE);
    }
 
    public int getWarnColor() {
        return warnColor;
    }
 
    public void setWarnColor(int warnColor) {
        this.warnColor = warnColor;
    }
 
    public float getWarnLineWidth() {
        return warnLineWidth;
    }
 
    public void setWarnLineWidth(float warnLineWidth) {
        this.warnLineWidth = warnLineWidth;
    }
 
    public boolean isEnable() {
        return enable;
    }
 
    public void setEnable(boolean enable) {
        this.enable = enable;
    }
 
    public double getValue() {
        return value;
    }
 
    public void setValue(double value) {
        this.value = value;
    }
 
    public float getTxtSize() {
        return txtSize;
    }
 
    public void setTxtSize(float txtSize) {
        this.txtSize = txtSize;
    }
}