jf1 = new JFrame();
final String attributeName = "double_scalar_rw_with_format";
// Initialiser le device et le composant
initFirstDevice();
final AttributeNumberScalarWheelSwitch widget = new AttributeNumberScalarWheelSwitch.Builder(
m_deviceName, attributeName).jframe(jf1).build();
Sleeper.SECONDS.sleep(2);
final JLabel label = getLabel(jf1);
assertNotNull("can't find label");
// v�rifier que la valeur courante de l'attribut est bien affich�e
double value = 1234.567;
m_deviceProxy
.write_attribute(new DeviceAttribute(attributeName, value));
final String format = "%7.3f";
assertTrue(waitLabelText(label, formatValue(value, format), 5000));
// stop widget and check is disconected
widget.stop();
Sleeper.SECONDS.sleep(2);
assertEquals("+X.XX", label.getText());
// restart and bean show the same value as device
widget.start();
Sleeper.SECONDS.sleep(2);
assertTrue(waitLabelText(label, formatValue(value, format), 5000));
// test write ok after restart
value = 1234.568;
m_deviceProxy
.write_attribute(new DeviceAttribute(attributeName, value));
assertTrue("write failed after restart",
waitLabelText(label, formatValue(value, format), 5000));
widget.stop();
jf1.dispose();
}