public Control(String title, T min, T max, T value, T step,
			Class<? extends T> valueClass) {
		super(new GridLayout(3, 1));

		if (title == null || min == null || max == null || step == null
				|| valueClass == null) {
			throw new NullPointerException();
		}

		this.min = min;
		this.max = max;
		this.valueClass = valueClass;

		label = new JLabel(title);
		add(label);

		spinnerModel = new SpinnerNumberModel(value, min, max, step);
		spinner = new JSpinner(spinnerModel);
		spinnerEditor = new ValidatingSpinnerNumberEditor<>(spinner, valueClass);
		spinnerEditor.setMessage(String.format(
				Messages.getString("Control.ErrorMessage"), //$NON-NLS-1$
				valueClass.getSimpleName(), min, max));
		spinner.setEditor(spinnerEditor);
		add(spinner);

		int divisions = Math.round((max.floatValue() - min.floatValue())
				/ step.floatValue());
		slider = new JSlider(0, divisions);
		add(slider);

		syncSliderToSpinner();

		spinner.addChangeListener(new ChangeListener() {
			@Override
			public void stateChanged(ChangeEvent e) {
				syncSliderToSpinner();
			}
		});

		slider.addChangeListener(new ChangeListener() {
			@Override
			public void stateChanged(ChangeEvent e) {
				syncSpinnerToSlider();
			}
		});
	}