final Button btnLevel = new Button("Show Msg Level Imgs");
btnLevel.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
final IMsgOperator op = registry.getOperator(context, true);
op.showMsgs(Position.BOTTOM, -1, bTglShowImg);
btnLevel.setText(bTglShowImg ? "Hide Msg Level Imgs" : "Show Msg Level Imgs");
bTglShowImg = !bTglShowImg;
}
});
buttonPanel.add(btnLevel);
buttonPanel.add(new Button("Test cloaking", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
registry.clear();
final IMsgOperator operator = registry.getOperator(refWidget, false);
operator.addMsg(msgWarn, null);
nestedContext.setVisible(false);
operator.showMsgs(true);
Window
.alert("No message popup should appear even though showMsgs() was called because the nestedContext's visibliity was just set to false.");
nestedContext.setVisible(true);
operator.showMsgs(true);
Window.alert("Now it should be showing because the nestedContext's visibliity was just set to true.");
}
}));
buttonPanel.add(new Button("Test scroll handling", new ClickHandler() {