//Window.alert("Something got selected " + createdPanel.getValue(selectedIndex));
// Element element = DOM.getElementById(createdPanel.getValue(selectedIndex));
// element.getStyle().setBorderWidth(10, Unit.PX);
// element.getStyle().setBorderStyle(BorderStyle.SOLID);
// element.getStyle().setBorderColor("black");
EventListener listener = DOM.getEventListener(DOM.getElementById(createdPanel.getValue(selectedIndex)));
// No listener attached to the element, so no widget exist for this
// element
if (listener instanceof Widget) {
// GWT uses the widget as event listener
Widget widget = (Widget) listener ;
widget.getElement().getStyle().setBorderWidth(10, Unit.PX);
widget.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
widget.getElement().getStyle().setBorderColor("black");
selectedWidget = widget;
if (widget instanceof FlowPanel) {
//Label cell4= new Label("FlowPanel D");
//cell4.getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
//cell4.getElement().getStyle().setBorderColor("blue");
//cell4.getElement().getStyle().setBorderWidth(5, Unit.PX);
//((FlowPanel)widget).add(cell4);
((FlowPanel)widget).getElement().getStyle().setOutlineStyle(OutlineStyle.DOTTED);
((FlowPanel)widget).getElement().getStyle().setOutlineWidth(5, Unit.PX);
((FlowPanel)widget).getElement().getStyle().setOutlineColor("gray");
//Window.alert("FlowPanel ");
for (int i = 0; i < createdPanel.getItemCount(); i++) {
if (i != selectedIndex) {
EventListener listener2 = DOM.getEventListener(DOM.getElementById(createdPanel.getValue(i)));
if (listener2 instanceof Widget) {
Widget widget2 = (Widget) listener2 ;
((FlowPanel)widget2).getElement().getStyle().setOutlineStyle(OutlineStyle.NONE);
}
}