public class NumberFieldTest {
private static JPanel initPanel() {
final JPanel panel = new JPanel(new BorderLayout());
NumberScalarBox numberBox = new NumberScalarBox();
TangoKey key = new TangoKey();
TangoKeyTool.registerAttribute(key, "tango/tangotest/titan", "ampli");
TangoKey secondkey = new TangoKey();
TangoKeyTool.registerAttribute(secondkey, "tango/tangotest/titan", "double_scalar");
Spinner spinner = new Spinner();
WheelSwitch wheelswitch = new WheelSwitch();
wheelswitch.setInvertionLogic(true);
Slider slider = new Slider();
numberBox.connectWidget(spinner, secondkey);
numberBox.connectWidget(wheelswitch, key);
numberBox.connectWidget(slider, key);
numberBox.setConfirmation(spinner, true);
panel.add(spinner, BorderLayout.CENTER);
panel.add(wheelswitch, BorderLayout.EAST);
panel.add(slider, BorderLayout.NORTH);