00001
00002
00003
00004
00005
00006
00007 package DisplayGUI;
00008 import java.awt.Color;
00009
00014 public class ColorScalePoint {
00015 Double value;
00016 Color color;
00017 String label;
00018
00019
00021 public ColorScalePoint(Double xlow, Color loColor, String loLabel) {
00022 value = xlow;
00023 color = loColor;
00024 label = loLabel;
00025 }
00026 public Color getColor() {
00027 return color;
00028 }
00029 public Double getValue() {
00030 return value;
00031 }
00032 public void setValue(Double value) {
00033 this.value=value;
00034 }
00035 public String getLabel() {
00036 return label;
00037 }
00038 public void setLabel(String label) {
00039 this.label=label;
00040 }
00041 public boolean equals(ColorScalePoint otherPoint) {
00042 if(!label.equals(otherPoint.getLabel())) return false;
00043 if(!value.equals(otherPoint.getValue())) return false;
00044 if(!color.equals(otherPoint.getColor())) return false;
00045 return true;
00046 }
00047 public void setData(int index, Object object) {
00048 switch(index) {
00049 case 0:
00050 value = (Double)object;
00051 break;
00052 case 1:
00053 label = (String)object;
00054 break;
00055 case 2:
00056 color = (Color) object;
00057 default:
00058 }
00059 }
00060 public Object getData(int index) {
00061 switch(index) {
00062 case 0:
00063 return value;
00064 case 1:
00065 return label;
00066 case 2:
00067 return color;
00068 default:
00069 }
00070 return null;
00071 }
00072 }