private void monochromeTest() throws DevFailed {
jf1 = new JFrame();
// Initialiser le device et le composant
initFirstDevice();
final AttributeImagePanel widget = new AttributeImagePanel.Builder(
m_deviceName, "int_image_rw").setMonochrome(true).jframe(jf1)
.build();
Sleeper.SECONDS.sleep(2);
final ImageViewer imageViewer = (ImageViewer) tth.findFirstComponent(
ImageViewer.class, jf1);
Assert.assertTrue("Image viewer not found", imageViewer != null);
final BufferedImage image = imageViewer.getImage();
for (int x = 0; x < image.getWidth(); x++) {
for (int y = 0; y < image.getHeight(); y++) {
Assert.assertTrue("Image is not BW",
isBWColor(new Color(image.getRGB(0, 0))));
}
}
// clean
widget.stop();
jf1.dispose();
}