BubbleEntry.java
2.17 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package com.github.mikephil.charting.data;
import android.annotation.SuppressLint;
import android.graphics.drawable.Drawable;
/**
* Subclass of Entry that holds a value for one entry in a BubbleChart. Bubble
* chart implementation: Copyright 2015 Pierre-Marc Airoldi Licensed under
* Apache License 2.0
*
* @author Philipp Jahoda
*/
@SuppressLint("ParcelCreator")
public class BubbleEntry extends Entry {
/** size value */
private float mSize = 0f;
/**
* Constructor.
*
* @param x The value on the x-axis.
* @param y The value on the y-axis.
* @param size The size of the bubble.
*/
public BubbleEntry(float x, float y, float size) {
super(x, y);
this.mSize = size;
}
/**
* Constructor.
*
* @param x The value on the x-axis.
* @param y The value on the y-axis.
* @param size The size of the bubble.
* @param data Spot for additional data this Entry represents.
*/
public BubbleEntry(float x, float y, float size, Object data) {
super(x, y, data);
this.mSize = size;
}
/**
* Constructor.
*
* @param x The value on the x-axis.
* @param y The value on the y-axis.
* @param size The size of the bubble.
* @param icon Icon image
*/
public BubbleEntry(float x, float y, float size, Drawable icon) {
super(x, y, icon);
this.mSize = size;
}
/**
* Constructor.
*
* @param x The value on the x-axis.
* @param y The value on the y-axis.
* @param size The size of the bubble.
* @param icon Icon image
* @param data Spot for additional data this Entry represents.
*/
public BubbleEntry(float x, float y, float size, Drawable icon, Object data) {
super(x, y, icon, data);
this.mSize = size;
}
public BubbleEntry copy() {
BubbleEntry c = new BubbleEntry(getX(), getY(), mSize, getData());
return c;
}
/**
* Returns the size of this entry (the size of the bubble).
*
* @return
*/
public float getSize() {
return mSize;
}
public void setSize(float size) {
this.mSize = size;
}
}