final ListBox widgetIndexLb = new ListBox();
for (Iterator<Widget> iterator = invokingWidget.iterator(); iterator.hasNext();) {
Widget next = iterator.next();
widgetIndexLb.addItem(((IVkWidget)next).getWidgetName() + " - at index - " + invokingWidget.getWidgetIndex(next));
}
final SliderBarHorizontal sliderBar = new SliderBarSimpleHorizontal(invokingWidget.getOffsetHeight(), "300px", false);
widgetIndexLb.addChangeHandler(new ChangeHandler(){
@Override
public void onChange(ChangeEvent event) {
sliderBar.setValue(invokingWidget.getWidget(widgetIndexLb.getSelectedIndex()).getElement().getParentElement().getOffsetHeight());
}});
widgetIndexLb.setWidth("300px");
dialog.add(widgetIndexLb);
dialog.add(new Label("Drag to change height:"));
dialog.add(sliderBar);
sliderBar.addBarValueChangedHandler(new BarValueChangedHandler() {
@Override
public void onBarValueChanged(BarValueChangedEvent event) {
DOM.setStyleAttribute((com.google.gwt.user.client.Element) invokingWidget.getWidget(widgetIndexLb.getSelectedIndex()).getElement().getParentElement(), "height", event.getValue() + "px");
}
});
sliderBar.setValue(invokingWidget.getWidget(0).getElement().getParentElement().getOffsetHeight());
sliderBar.setMinMarkStep(50);
Button okButton = new Button("OK");
dialog.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
dialog.add(okButton);
okButton.addClickHandler(new ClickHandler() {
@Override