Selector selector;
Condition condition;
+ private float[] color;
+
static Logger LOG = LoggerFactory.getLogger(ElementSelector.class);
static ElementSelectionResource ES;
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;
public Condition getCondition() {
return condition;
}
+
+ /**
+ * Get the selection highlight color as a four element BGRA array.
+ */
+ public float[] getColor() {
+ return color;
+ }
/**
*
// Select sorting direction
Comparator<Pair<Resource, Double>> comparator = smallest ?
(p1, p2) -> Double.compare(p1.second, p2.second) :
- (p1, p2) -> Double.compare(p1.second, p2.second);
+ (p1, p2) -> Double.compare(p2.second, p1.second);
// Get association list to property values
List<Pair<Resource, Double>> result2 = elements.stream()