|
@@ -38,6 +38,7 @@ import de.tudarmstadt.informatik.hostage.logging.UglyDbHelper;
|
|
|
import de.tudarmstadt.informatik.hostage.ui.LogFilter;
|
|
|
import de.tudarmstadt.informatik.hostage.ui2.adapter.StatisticListAdapter;
|
|
|
import de.tudarmstadt.informatik.hostage.ui2.dialog.ChecklistDialog;
|
|
|
+import de.tudarmstadt.informatik.hostage.ui2.helper.ColorSequenceGenerator;
|
|
|
import de.tudarmstadt.informatik.hostage.ui2.model.PlotComparisonItem;
|
|
|
import de.tudarmstadt.informatik.hostage.ui2.popup.AbstractPopup;
|
|
|
import de.tudarmstadt.informatik.hostage.ui2.popup.AbstractPopupItem;
|
|
@@ -935,50 +936,11 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
|
|
|
public int getOtherColor(){
|
|
|
- return Color.argb(255,0,0,0);
|
|
|
- }
|
|
|
-
|
|
|
- public ArrayList<Integer> getColorList(){
|
|
|
- if (this.colorList == null){
|
|
|
- this.colorList = new ArrayList<Integer>();
|
|
|
- for (int i =0; i < 255; i++){
|
|
|
- Integer color = this.generateColorForIndex(i);
|
|
|
- this.colorList.add(color);
|
|
|
- }
|
|
|
- }
|
|
|
- return this.colorList;
|
|
|
- }
|
|
|
-
|
|
|
- public Integer getColor(int index){
|
|
|
- if (this.colorList == null) this.colorList = new ArrayList<Integer>();
|
|
|
- if (index >= this.colorList.size()) {
|
|
|
- for (int i = this.colorList.size(); i<= index; i++){
|
|
|
- Integer color = this.generateColorForIndex(i);
|
|
|
- this.colorList.add(color);
|
|
|
- }
|
|
|
- return this.generateColorForIndex(index);
|
|
|
- }
|
|
|
- return this.colorList.get(index);
|
|
|
- }
|
|
|
-
|
|
|
- public Integer generateColorForIndex(int index){
|
|
|
- int r[] = new int[]{0,0,1,1,0,1,1};
|
|
|
- int g[] = new int[]{0,1,0,0,1,1,1};
|
|
|
- int b[] = new int[]{1,0,0,1,1,0,1};
|
|
|
-
|
|
|
- int a = (index / 7);
|
|
|
- int n = index % 7;
|
|
|
-
|
|
|
- int q = Math.max(1, 2 * (a / 7));
|
|
|
- int multiplier = 16 / (q);
|
|
|
-
|
|
|
- int sub = (Math.min(((Math.max(0,(a ))) * multiplier), 16));
|
|
|
-
|
|
|
- int R = Math.max( (r[n] * 255) - sub, 0);
|
|
|
- int G = Math.max( (g[n] * 255) - sub, 0);
|
|
|
- int B = Math.max( (b[n] * 255) - sub, 0);
|
|
|
-
|
|
|
- return Color.argb(255,R,G,B);
|
|
|
+ return Color.argb(255, 80, 80, 80); // grey
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getColor(int index) {
|
|
|
+ return ColorSequenceGenerator.getColorForIndex(index);
|
|
|
}
|
|
|
|
|
|
|