1 package org.simantics.datatypes.literal;
3 import org.simantics.common.color.Color;
4 import org.simantics.common.utils.CommonUtils;
5 import org.simantics.databoard.Bindings;
6 import org.simantics.databoard.binding.Binding;
7 import org.simantics.databoard.util.Bean;
12 public static class Integer extends Bean implements Color {
14 private static final long serialVersionUID = -8574259779076550543L;
16 public static final Binding BINDING = Bindings.getBindingUnchecked(Integer.class);
22 public Integer(int r, int g, int b) {
24 this.red = r; this.green = g; this.blue = b;
28 public String toString() {
29 return "RGB.Integer[r=" + red + " ,g=" + green + " ,b=" + blue + "]";
33 public double getR() {
34 return CommonUtils.convertColor256ToDouble(red);
38 public double getG() {
39 return CommonUtils.convertColor256ToDouble(green);
43 public double getB() {
44 return CommonUtils.convertColor256ToDouble(blue);
48 public double getA() {
53 public double getH() {
54 throw new UnsupportedOperationException();
58 public double getS() {
59 throw new UnsupportedOperationException();
63 public double getV() {
64 throw new UnsupportedOperationException();