for (final ComponentConnector connector : zeroSized) {
final ServerConnector parent = connector.getParent();
final String parentId = parent.getConnectorId();
final Label errorDetails = new Label(Util.getSimpleName(connector)
+ "[" + connector.getConnectorId() + "]" + " inside "
+ Util.getSimpleName(parent));
if (parent instanceof ComponentConnector) {
final ComponentConnector parentConnector = (ComponentConnector) parent;
if (!parents.contains(parentId)) {
parents.add(parentId);
Highlight.show(parentConnector, "yellow");
}
errorDetails.addMouseOverHandler(new MouseOverHandler() {
@Override
public void onMouseOver(MouseOverEvent event) {
Highlight.hideAll();
Highlight.show(parentConnector, "yellow");
Highlight.show(connector);
errorDetails.getElement().getStyle()
.setTextDecoration(TextDecoration.UNDERLINE);
}
});
errorDetails.addMouseOutHandler(new MouseOutHandler() {
@Override
public void onMouseOut(MouseOutEvent event) {
Highlight.hideAll();
errorDetails.getElement().getStyle()
.setTextDecoration(TextDecoration.NONE);
}
});
errorDetails.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
fireSelectEvent(connector);
}
});