public void setValue(int _index, Value _value) { switch (_index) { case 0: if (_value.getObject() instanceof double[][][][]) setDataArray((double[][][][]) _value.getObject()); break; case 1: setAutoscaleMagnitude(_value.getBoolean()); break; case 2: setExtrema(_value.getDouble(), maxMagnitude); break; case 3: setExtrema(minMagnitude, _value.getDouble()); break; case 4: setNumberOfLevels(_value.getInteger()); break; case 5: setMinColor((Color) _value.getObject()); break; case 6: setMaxColor((Color) _value.getObject()); break; case 7: setZoom(_value.getDouble()); break; case 8: setInvisibleLevel(_value.getInteger()); break; default: super.setValue(_index - FIELD_PROPERTIES_ADDED, _value); break; } }
public void setDefaultValue(int _index) { switch (_index) { case 0: setDataArray((double[][][][]) null); break; case 1: setAutoscaleMagnitude(true); break; case 2: setExtrema(0.0, maxMagnitude); break; case 3: setExtrema(minMagnitude, 1.0); break; case 4: setNumberOfLevels(16); break; case 5: setMinColor(Color.BLUE); break; case 6: setMaxColor(Color.RED); break; case 7: setZoom(1.0); break; case 8: setInvisibleLevel(-1); break; default: super.setDefaultValue(_index - FIELD_PROPERTIES_ADDED); break; } }