- Code: Select all
ToolItem toolItem = new ToolItem(parentToolBar, SWT.PUSH);
toolItem.setToolTipText(toolTipText);
toolItem.setImage(image);
toolItem.setEnabled(true);
toolItem.setData("name", toolTipText);
When we test the ToolItem to see if the Button is enabled it always returns false.
- Code: Select all
NamedWidgetLocator sendButtonLocated = new NamedWidgetLocator(TOOL_TIP_TEXT);
ui.assertThat(sendButtonLocated.isEnabled());
When the ToolItem is enabled it displays the Image in color. When it is not enabled it shows the gray Image.
Is there a different way to test this state?