1 package org.simantics.modeling.ui.diagram.monitor;
3 import org.simantics.common.color.Color;
4 import org.simantics.databoard.Bindings;
5 import org.simantics.db.ReadGraph;
6 import org.simantics.db.Resource;
7 import org.simantics.db.exception.DatabaseException;
9 public class RGB implements Color {
13 public RGB(double r, double g, double b) {
14 this.r = r; this.g = g; this.b=b;
17 public RGB(ReadGraph graph, Resource resource) throws DatabaseException {
18 double[] array = graph.getValue(resource, Bindings.DOUBLE_ARRAY);
19 assert(array.length == 3);
26 public double getR() {
31 public double getG() {
36 public double getB() {
41 public double getA() {
42 throw new UnsupportedOperationException();
46 public double getH() {
47 throw new UnsupportedOperationException();
51 public double getS() {
52 throw new UnsupportedOperationException();
56 public double getV() {
57 throw new UnsupportedOperationException();