public StaticValueValueUiJComponent( final StaticValueMadDefinition definition, final StaticValueMadInstance instance, final StaticValueMadUiInstance uiInstance, final int controlIndex) { model = new SVValueSliderModel(); final SliderDisplayController controller = new SliderDisplayController(model); view = new LWTCSliderDisplayView( model, controller, SatelliteOrientation.LEFT, DisplayOrientation.HORIZONTAL, SatelliteOrientation.RIGHT, LWTCControlConstants.SLIDER_VIEW_COLORS, "Value:", false, true); model.addChangeListener( new ValueChangeListener() { @Override public void receiveValueChange(final Object source, final float newValue) { uiInstance.sendValueChange(newValue); } }); }
@Override public void receiveControlValue(final String valueStr) { model.setValue(this, Float.parseFloat(valueStr)); }
@Override public String getControlValue() { return Float.toString(model.getValue()); }