X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.selection%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fselection%2FElementSelector.java;fp=org.simantics.district.selection%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fselection%2FElementSelector.java;h=ff978059dab381aaf86d651fede0f3815613f181;hb=d29053f165fd2d8ae1f81c0102e2ba6687b74060;hp=9015b7117605674dd56bcaa9385e3116ccaedf43;hpb=1ccfd3124e5ca55f31f89aa3e884f79b11b0252e;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java b/org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java index 9015b711..ff978059 100644 --- a/org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java +++ b/org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java @@ -56,6 +56,8 @@ public class ElementSelector { Selector selector; Condition condition; + private float[] color; + static Logger LOG = LoggerFactory.getLogger(ElementSelector.class); static ElementSelectionResource ES; @@ -81,6 +83,9 @@ public class ElementSelector { try { this.name = graph.getRelatedValue(resource, L0.HasLabel); this.expression = getExpression(graph, resource); + + float[] color = graph.getPossibleRelatedValue(resource, ES.Selection_HasHighlightColor); + this.color = color; } catch (DatabaseException e) { LOG.error("Error reading element selector", e); throw e; @@ -149,6 +154,13 @@ public class ElementSelector { public Condition getCondition() { return condition; } + + /** + * Get the selection highlight color as a four element BGRA array. + */ + public float[] getColor() { + return color; + } /** *