1 package org.simantics.district.network.visualisations.triggers;
5 public class VisualisationTrigger {
7 private String moduleName;
8 private String attributeName;
9 private double threshold;
12 public VisualisationTrigger(String moduleName, String attributeName, double threshold, String colorHex) {
13 this.moduleName = moduleName;
14 this.attributeName = attributeName;
15 this.threshold = threshold;
16 this.color = hex2Rgb(colorHex);
19 public String getModuleName() {
23 public String getAttributeName() {
27 public double getThreshold() {
31 public Color getColor() {
37 * @param colorStr e.g. "#FFFFFF"
40 private static Color hex2Rgb(String colorStr) {
42 Integer.valueOf( colorStr.substring( 1, 3 ), 16 ),
43 Integer.valueOf( colorStr.substring( 3, 5 ), 16 ),
44 Integer.valueOf( colorStr.substring( 5, 7 ), 16 ) );