|
|
@@ -24,7 +24,6 @@ import com.google.gwt.core.client.Scheduler.ScheduledCommand; |
|
|
|
import com.vaadin.client.ApplicationConnection; |
|
|
|
import com.vaadin.client.Paintable; |
|
|
|
import com.vaadin.client.UIDL; |
|
|
|
import com.vaadin.client.communication.StateChangeEvent; |
|
|
|
import com.vaadin.client.ui.AbstractFieldConnector; |
|
|
|
import com.vaadin.client.ui.SimpleManagedLayout; |
|
|
|
import com.vaadin.client.ui.VFilterSelect; |
|
|
@@ -44,10 +43,6 @@ public class ComboBoxConnector extends AbstractFieldConnector implements |
|
|
|
// update textbox text by a changed item caption. |
|
|
|
private boolean oldSuggestionTextMatchTheOldSelection; |
|
|
|
|
|
|
|
// Need to recompute the width of the combobox when styles change, see |
|
|
|
// #13444 |
|
|
|
private boolean stylesChanged; |
|
|
|
|
|
|
|
/* |
|
|
|
* (non-Javadoc) |
|
|
|
* |
|
|
@@ -200,17 +195,8 @@ public class ComboBoxConnector extends AbstractFieldConnector implements |
|
|
|
|
|
|
|
getWidget().popupOpenerClicked = false; |
|
|
|
|
|
|
|
/* |
|
|
|
* if styles have changed or this is our first time we need to |
|
|
|
* recalculate the root width. |
|
|
|
*/ |
|
|
|
if (!getWidget().initDone) { |
|
|
|
// no need to force update since we have no existing width |
|
|
|
getWidget().updateRootWidth(false); |
|
|
|
} else if (stylesChanged) { |
|
|
|
// we have previously calculated a width, we must force an update |
|
|
|
// due to changed styles |
|
|
|
getWidget().updateRootWidth(true); |
|
|
|
getWidget().updateRootWidth(); |
|
|
|
} |
|
|
|
|
|
|
|
// Focus dependent style names are lost during the update, so we add |
|
|
@@ -219,9 +205,6 @@ public class ComboBoxConnector extends AbstractFieldConnector implements |
|
|
|
getWidget().addStyleDependentName("focus"); |
|
|
|
} |
|
|
|
|
|
|
|
// width has been recalculated above, clear style change flag |
|
|
|
stylesChanged = false; |
|
|
|
|
|
|
|
getWidget().initDone = true; |
|
|
|
} |
|
|
|
|
|
|
@@ -344,13 +327,4 @@ public class ComboBoxConnector extends AbstractFieldConnector implements |
|
|
|
getWidget().enabled = widgetEnabled; |
|
|
|
getWidget().tb.setEnabled(widgetEnabled); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void onStateChanged(StateChangeEvent event) { |
|
|
|
super.onStateChanged(event); |
|
|
|
if (event.hasPropertyChanged("styles")) { |
|
|
|
stylesChanged = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |