VAbstractPaintableWidget.updateFromUIDLtags/7.0.0.alpha2
@@ -30,14 +30,11 @@ import com.google.gwt.user.client.Element; | |||
import com.google.gwt.user.client.Event; | |||
import com.google.gwt.user.client.Timer; | |||
import com.google.gwt.user.client.Window; | |||
import com.google.gwt.user.client.ui.FocusWidget; | |||
import com.google.gwt.user.client.ui.Focusable; | |||
import com.google.gwt.user.client.ui.HasWidgets; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConfiguration.ErrorMessage; | |||
import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize; | |||
import com.vaadin.terminal.gwt.client.RenderInformation.Size; | |||
import com.vaadin.terminal.gwt.client.ui.Field; | |||
import com.vaadin.terminal.gwt.client.ui.VContextMenu; | |||
import com.vaadin.terminal.gwt.client.ui.VNotification; | |||
import com.vaadin.terminal.gwt.client.ui.VNotification.HideEvent; | |||
@@ -66,13 +63,13 @@ public class ApplicationConnection { | |||
// This indicates the whole page is generated by us (not embedded) | |||
public static final String GENERATED_BODY_CLASSNAME = "v-generated-body"; | |||
private static final String MODIFIED_CLASSNAME = "v-modified"; | |||
public static final String MODIFIED_CLASSNAME = "v-modified"; | |||
public static final String DISABLED_CLASSNAME = "v-disabled"; | |||
private static final String REQUIRED_CLASSNAME_EXT = "-required"; | |||
public static final String REQUIRED_CLASSNAME_EXT = "-required"; | |||
private static final String ERROR_CLASSNAME_EXT = "-error"; | |||
public static final String ERROR_CLASSNAME_EXT = "-error"; | |||
public static final char VAR_RECORD_SEPARATOR = '\u001e'; | |||
@@ -99,9 +96,6 @@ public class ApplicationConnection { | |||
public static final String PARAM_UNLOADBURST = "onunloadburst"; | |||
public static final String ATTRIBUTE_DESCRIPTION = "description"; | |||
public static final String ATTRIBUTE_ERROR = "error"; | |||
/** | |||
* A string that, if found in a non-JSON response to a UIDL request, will | |||
* cause the browser to refresh the page. If followed by a colon, optional | |||
@@ -1592,204 +1586,7 @@ public class ApplicationConnection { | |||
return result.toString(); | |||
} | |||
/** | |||
* Update generic component features. | |||
* | |||
* <h2>Selecting correct implementation</h2> | |||
* | |||
* <p> | |||
* The implementation of a component depends on many properties, including | |||
* styles, component features, etc. Sometimes the user changes those | |||
* properties after the component has been created. Calling this method in | |||
* the beginning of your updateFromUIDL -method automatically replaces your | |||
* component with more appropriate if the requested implementation changes. | |||
* </p> | |||
* | |||
* <h2>Caption, icon, error messages and description</h2> | |||
* | |||
* <p> | |||
* Component can delegate management of caption, icon, error messages and | |||
* description to parent layout. This is optional an should be decided by | |||
* component author | |||
* </p> | |||
* | |||
* <h2>Component visibility and disabling</h2> | |||
* | |||
* This method will manage component visibility automatically and if | |||
* component is an instanceof FocusWidget, also handle component disabling | |||
* when needed. | |||
* | |||
* @param component | |||
* Widget to be updated, expected to implement an instance of | |||
* Paintable | |||
* @param uidl | |||
* UIDL to be painted | |||
* @param manageCaption | |||
* True if you want to delegate caption, icon, description and | |||
* error message management to parent. | |||
* | |||
* @return Returns true iff no further painting is needed by caller | |||
*/ | |||
@Deprecated | |||
public boolean updateComponent(VPaintableWidget paintable, UIDL uidl, | |||
boolean manageCaption) { | |||
Widget component = paintable.getWidgetForPaintable(); | |||
String pid = paintableMap.getPid(paintable); | |||
if (pid == null) { | |||
VConsole.error("Trying to update an unregistered component: " | |||
+ Util.getSimpleName(component)); | |||
return true; | |||
} | |||
// If the server request that a cached instance should be used, do | |||
// nothing | |||
if (uidl.getBooleanAttribute("cached")) { | |||
return true; | |||
} | |||
// register the listened events by the server-side to the event-handler | |||
// of the component | |||
paintableMap.registerEventListenersFromUIDL(pid, uidl); | |||
// Visibility | |||
boolean visible = !uidl.getBooleanAttribute("invisible"); | |||
boolean wasVisible = component.isVisible(); | |||
component.setVisible(visible); | |||
if (wasVisible != visible) { | |||
// Changed invisibile <-> visible | |||
if (wasVisible && manageCaption) { | |||
// Must hide caption when component is hidden | |||
paintable.getParent().updateCaption(paintable, uidl); | |||
} | |||
} | |||
if (configuration.useDebugIdInDOM() && uidl.getId().startsWith("PID_S")) { | |||
DOM.setElementProperty(component.getElement(), "id", uidl.getId() | |||
.substring(5)); | |||
} | |||
if (!visible) { | |||
// component is invisible, delete old size to notify parent, if | |||
// later make visible | |||
paintableMap.setOffsetSize(paintable, null); | |||
return true; | |||
} | |||
boolean enabled = !uidl.getBooleanAttribute("disabled"); | |||
if (uidl.hasAttribute("tabindex") && component instanceof Focusable) { | |||
((Focusable) component).setTabIndex(uidl | |||
.getIntAttribute("tabindex")); | |||
} | |||
/* | |||
* Disabled state may affect (override) tabindex so the order must be | |||
* first setting tabindex, then enabled state. | |||
*/ | |||
if (component instanceof FocusWidget) { | |||
FocusWidget fw = (FocusWidget) component; | |||
fw.setEnabled(enabled); | |||
} | |||
// Style names | |||
component.setStyleName(getStyleName(component.getStylePrimaryName(), | |||
uidl, component instanceof Field)); | |||
TooltipInfo tooltipInfo = paintableMap.getTooltipInfo(paintable, null); | |||
// Update tooltip | |||
if (uidl.hasAttribute(ATTRIBUTE_DESCRIPTION)) { | |||
tooltipInfo | |||
.setTitle(uidl.getStringAttribute(ATTRIBUTE_DESCRIPTION)); | |||
} else { | |||
tooltipInfo.setTitle(null); | |||
} | |||
// Set captions | |||
if (manageCaption) { | |||
paintable.getParent().updateCaption(paintable, uidl); | |||
} | |||
// add error classname to components w/ error | |||
if (uidl.hasAttribute(ATTRIBUTE_ERROR)) { | |||
tooltipInfo.setErrorUidl(uidl.getErrors()); | |||
} else { | |||
tooltipInfo.setErrorUidl(null); | |||
} | |||
/* | |||
* updateComponentSize need to be after caption update so caption can be | |||
* taken into account | |||
*/ | |||
updateComponentSize(paintable, uidl); | |||
return false; | |||
} | |||
/** | |||
* Generates the style name for the widget based on the given primary style | |||
* name (typically returned by Widget.getPrimaryStyleName()) and the UIDL. | |||
* An additional "modified" style name can be added if the field parameter | |||
* is set to true. | |||
* | |||
* @param primaryStyleName | |||
* @param uidl | |||
* @param isField | |||
* @return | |||
*/ | |||
public static String getStyleName(String primaryStyleName, UIDL uidl, | |||
boolean field) { | |||
boolean enabled = !uidl.getBooleanAttribute("disabled"); | |||
StringBuffer styleBuf = new StringBuffer(); | |||
styleBuf.append(primaryStyleName); | |||
// first disabling and read-only status | |||
if (!enabled) { | |||
styleBuf.append(" "); | |||
styleBuf.append(DISABLED_CLASSNAME); | |||
} | |||
if (uidl.getBooleanAttribute("readonly")) { | |||
styleBuf.append(" "); | |||
styleBuf.append("v-readonly"); | |||
} | |||
// add additional styles as css classes, prefixed with component default | |||
// stylename | |||
if (uidl.hasAttribute("style")) { | |||
final String[] styles = uidl.getStringAttribute("style").split(" "); | |||
for (int i = 0; i < styles.length; i++) { | |||
styleBuf.append(" "); | |||
styleBuf.append(primaryStyleName); | |||
styleBuf.append("-"); | |||
styleBuf.append(styles[i]); | |||
styleBuf.append(" "); | |||
styleBuf.append(styles[i]); | |||
} | |||
} | |||
// add modified classname to Fields | |||
if (field && uidl.hasAttribute("modified")) { | |||
styleBuf.append(" "); | |||
styleBuf.append(MODIFIED_CLASSNAME); | |||
} | |||
// add error classname to components w/ error | |||
if (uidl.hasAttribute(ATTRIBUTE_ERROR)) { | |||
styleBuf.append(" "); | |||
styleBuf.append(primaryStyleName); | |||
styleBuf.append(ERROR_CLASSNAME_EXT); | |||
} | |||
// add required style to required components | |||
if (uidl.hasAttribute("required")) { | |||
styleBuf.append(" "); | |||
styleBuf.append(primaryStyleName); | |||
styleBuf.append(REQUIRED_CLASSNAME_EXT); | |||
} | |||
return styleBuf.toString(); | |||
} | |||
private void updateComponentSize(VPaintableWidget paintable, UIDL uidl) { | |||
public void updateComponentSize(VPaintableWidget paintable, UIDL uidl) { | |||
String w = uidl.hasAttribute("width") ? uidl | |||
.getStringAttribute("width") : ""; | |||
@@ -594,6 +594,7 @@ public class Util { | |||
} | |||
@Deprecated | |||
public static boolean isCached(UIDL uidl) { | |||
return uidl.getBooleanAttribute("cached"); | |||
} |
@@ -35,11 +35,13 @@ public class VAbsoluteLayoutPaintable extends VAbstractPaintableWidgetContainer | |||
} | |||
}; | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
getWidgetForPaintable().client = client; | |||
// TODO margin handling | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -3,21 +3,30 @@ | |||
*/ | |||
package com.vaadin.terminal.gwt.client.ui; | |||
import com.google.gwt.user.client.DOM; | |||
import com.google.gwt.user.client.ui.FocusWidget; | |||
import com.google.gwt.user.client.ui.Focusable; | |||
import com.google.gwt.user.client.ui.Widget; | |||
import com.vaadin.terminal.gwt.client.ApplicationConnection; | |||
import com.vaadin.terminal.gwt.client.TooltipInfo; | |||
import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.VPaintableMap; | |||
import com.vaadin.terminal.gwt.client.VPaintableWidget; | |||
import com.vaadin.terminal.gwt.client.VPaintableWidgetContainer; | |||
public abstract class VAbstractPaintableWidget implements VPaintableWidget { | |||
public static final String ATTRIBUTE_DESCRIPTION = "description"; | |||
public static final String ATTRIBUTE_ERROR = "error"; | |||
private Widget widget; | |||
private ApplicationConnection connection; | |||
private String id; | |||
private VPaintableWidgetContainer parent; | |||
/* State variables */ | |||
private boolean enabled = true; | |||
private boolean visible = true; | |||
/** | |||
* Default constructor | |||
@@ -73,10 +82,6 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget { | |||
this.connection = connection; | |||
} | |||
public boolean isEnabled() { | |||
return enabled; | |||
} | |||
public String getId() { | |||
return id; | |||
} | |||
@@ -86,9 +91,10 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget { | |||
} | |||
public VPaintableWidgetContainer getParent() { | |||
if (parent != null) | |||
if (parent != null) { | |||
return parent; | |||
} | |||
// FIXME: Hierarchy should be set by framework instead of looked up here | |||
VPaintableMap paintableMap = VPaintableMap.get(getConnection()); | |||
@@ -96,11 +102,218 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget { | |||
while (w != null) { | |||
w = w.getParent(); | |||
if (paintableMap.isPaintable(w)) { | |||
parent = (VPaintableWidgetContainer) paintableMap.getPaintable(w); | |||
parent = (VPaintableWidgetContainer) paintableMap | |||
.getPaintable(w); | |||
return parent; | |||
} | |||
} | |||
return null; | |||
} | |||
protected static boolean isRealUpdate(UIDL uidl) { | |||
return !isCachedUpdate(uidl) && !uidl.getBooleanAttribute("invisible"); | |||
} | |||
protected static boolean isCachedUpdate(UIDL uidl) { | |||
return uidl.getBooleanAttribute("cached"); | |||
} | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (isCachedUpdate(uidl)) { | |||
return; | |||
} | |||
VPaintableMap paintableMap = VPaintableMap.get(getConnection()); | |||
// register the listened events by the server-side to the event-handler | |||
// of the component | |||
paintableMap.registerEventListenersFromUIDL(getId(), uidl); | |||
// Visibility | |||
setVisible(!uidl.getBooleanAttribute("invisible"), uidl); | |||
if (uidl.getId().startsWith("PID_S")) { | |||
DOM.setElementProperty(getWidgetForPaintable().getElement(), "id", | |||
uidl.getId().substring(5)); | |||
} | |||
if (!isVisible()) { | |||
// component is invisible, delete old size to notify parent, if | |||
// later made visible | |||
paintableMap.setOffsetSize(this, null); | |||
return; | |||
} | |||
/* | |||
* Disabled state may affect (override) tabindex so the order must be | |||
* first setting tabindex, then enabled state. | |||
*/ | |||
if (uidl.hasAttribute("tabindex") | |||
&& getWidgetForPaintable() instanceof Focusable) { | |||
((Focusable) getWidgetForPaintable()).setTabIndex(uidl | |||
.getIntAttribute("tabindex")); | |||
} | |||
setEnabled(!uidl.getBooleanAttribute("disabled")); | |||
// Style names | |||
String styleName = getStyleNameFromUIDL(getWidgetForPaintable() | |||
.getStylePrimaryName(), uidl, | |||
getWidgetForPaintable() instanceof Field); | |||
getWidgetForPaintable().setStyleName(styleName); | |||
// Update tooltip | |||
TooltipInfo tooltipInfo = paintableMap.getTooltipInfo(this, null); | |||
if (uidl.hasAttribute(ATTRIBUTE_DESCRIPTION)) { | |||
tooltipInfo | |||
.setTitle(uidl.getStringAttribute(ATTRIBUTE_DESCRIPTION)); | |||
} else { | |||
tooltipInfo.setTitle(null); | |||
} | |||
// add error info to tooltip if present | |||
if (uidl.hasAttribute(ATTRIBUTE_ERROR)) { | |||
tooltipInfo.setErrorUidl(uidl.getErrors()); | |||
} else { | |||
tooltipInfo.setErrorUidl(null); | |||
} | |||
// Set captions | |||
if (delegateCaptionHandling()) { | |||
getParent().updateCaption(this, uidl); | |||
} | |||
/* | |||
* updateComponentSize need to be after caption update so caption can be | |||
* taken into account | |||
*/ | |||
getConnection().updateComponentSize(this, uidl); | |||
} | |||
/** | |||
* Sets the enabled state of this paintable | |||
* | |||
* @param enabled | |||
* true if the paintable is enabled, false otherwise | |||
*/ | |||
protected void setEnabled(boolean enabled) { | |||
this.enabled = enabled; | |||
if (getWidgetForPaintable() instanceof FocusWidget) { | |||
FocusWidget fw = (FocusWidget) getWidgetForPaintable(); | |||
fw.setEnabled(enabled); | |||
} | |||
} | |||
public boolean isEnabled() { | |||
return enabled; | |||
} | |||
/** | |||
* Return true if parent handles caption, false if the paintable handles the | |||
* caption itself. | |||
* | |||
* | |||
* @deprecated This should always return true and all components should let | |||
* the parent handle the caption and use other attributes for | |||
* internal texts in the component | |||
* @return | |||
*/ | |||
@Deprecated | |||
protected boolean delegateCaptionHandling() { | |||
return true; | |||
} | |||
/** | |||
* Sets the visible state for this paintable. | |||
* | |||
* @param visible | |||
* true if the paintable should be made visible, false otherwise | |||
* @param captionUidl | |||
* The UIDL that is passed to the parent and onwards to VCaption | |||
* if the caption needs to be updated as a result of the | |||
* visibility change. | |||
*/ | |||
protected void setVisible(boolean visible, UIDL captionUidl) { | |||
boolean wasVisible = this.visible; | |||
this.visible = visible; | |||
getWidgetForPaintable().setVisible(visible); | |||
if (wasVisible != visible) { | |||
// Changed invisibile <-> visible | |||
if (wasVisible && delegateCaptionHandling()) { | |||
// Must hide caption when component is hidden | |||
getParent().updateCaption(this, captionUidl); | |||
} | |||
} | |||
} | |||
protected boolean isVisible() { | |||
return visible; | |||
} | |||
/** | |||
* Generates the style name for the widget based on the given primary style | |||
* name (typically returned by Widget.getPrimaryStyleName()) and the UIDL. | |||
* An additional "modified" style name can be added if the field parameter | |||
* is set to true. | |||
* | |||
* @param primaryStyleName | |||
* @param uidl | |||
* @param isField | |||
* @return | |||
*/ | |||
protected static String getStyleNameFromUIDL(String primaryStyleName, | |||
UIDL uidl, boolean field) { | |||
boolean enabled = !uidl.getBooleanAttribute("disabled"); | |||
StringBuffer styleBuf = new StringBuffer(); | |||
styleBuf.append(primaryStyleName); | |||
// first disabling and read-only status | |||
if (!enabled) { | |||
styleBuf.append(" "); | |||
styleBuf.append(ApplicationConnection.DISABLED_CLASSNAME); | |||
} | |||
if (uidl.getBooleanAttribute("readonly")) { | |||
styleBuf.append(" "); | |||
styleBuf.append("v-readonly"); | |||
} | |||
// add additional styles as css classes, prefixed with component default | |||
// stylename | |||
if (uidl.hasAttribute("style")) { | |||
final String[] styles = uidl.getStringAttribute("style").split(" "); | |||
for (int i = 0; i < styles.length; i++) { | |||
styleBuf.append(" "); | |||
styleBuf.append(primaryStyleName); | |||
styleBuf.append("-"); | |||
styleBuf.append(styles[i]); | |||
styleBuf.append(" "); | |||
styleBuf.append(styles[i]); | |||
} | |||
} | |||
// add modified classname to Fields | |||
if (field && uidl.hasAttribute("modified")) { | |||
styleBuf.append(" "); | |||
styleBuf.append(ApplicationConnection.MODIFIED_CLASSNAME); | |||
} | |||
// add error classname to components w/ error | |||
if (uidl.hasAttribute(ATTRIBUTE_ERROR)) { | |||
styleBuf.append(" "); | |||
styleBuf.append(primaryStyleName); | |||
styleBuf.append(ApplicationConnection.ERROR_CLASSNAME_EXT); | |||
} | |||
// add required style to required components | |||
if (uidl.hasAttribute("required")) { | |||
styleBuf.append(" "); | |||
styleBuf.append(primaryStyleName); | |||
styleBuf.append(ApplicationConnection.REQUIRED_CLASSNAME_EXT); | |||
} | |||
return styleBuf.toString(); | |||
} | |||
} |
@@ -64,6 +64,7 @@ public abstract class VAbstractSplitPanelPaintable extends | |||
}; | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().client = client; | |||
getWidgetForPaintable().id = uidl.getId(); | |||
@@ -71,7 +72,8 @@ public abstract class VAbstractSplitPanelPaintable extends | |||
getWidgetForPaintable().immediate = uidl.hasAttribute("immediate"); | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -32,7 +32,7 @@ public class VAccordionPaintable extends VTabsheetBasePaintable { | |||
getWidgetForPaintable().selectedUIDLItemIndex); | |||
selectedItem.setContent(selectedTabUIDL); | |||
} else if (!uidl.getBooleanAttribute("cached") | |||
} else if (isRealUpdate(uidl) | |||
&& getWidgetForPaintable().openTab != null) { | |||
getWidgetForPaintable().close(getWidgetForPaintable().openTab); | |||
} |
@@ -15,10 +15,10 @@ public class VAudioPaintable extends VMediaBasePaintable { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
super.updateFromUIDL(uidl, client); | |||
Style style = getWidgetForPaintable().getElement().getStyle(); | |||
// Make sure that the controls are not clipped if visible. |
@@ -13,11 +13,18 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
public class VButtonPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Ensure correct implementation, | |||
// but don't let container manage caption etc. | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -14,13 +14,20 @@ import com.vaadin.terminal.gwt.client.VTooltip; | |||
public class VCheckBoxPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Save details | |||
getWidgetForPaintable().client = client; | |||
getWidgetForPaintable().id = uidl.getId(); | |||
// Ensure correct implementation | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -31,10 +31,12 @@ public class VCssLayoutPaintable extends VAbstractPaintableWidgetContainer { | |||
} | |||
}; | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -15,9 +15,11 @@ import com.vaadin.terminal.gwt.client.VPaintableWidget; | |||
public class VCustomComponentPaintable extends | |||
VAbstractPaintableWidgetContainer { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, final ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -16,10 +16,12 @@ import com.vaadin.terminal.gwt.client.VPaintableWidget; | |||
public class VCustomLayoutPaintable extends VAbstractPaintableWidgetContainer { | |||
/** Update the layout from UIDL */ | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().client = client; | |||
// ApplicationConnection manages generic component features | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -14,9 +14,11 @@ import com.vaadin.terminal.gwt.client.VConsole; | |||
public class VDateFieldPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Ensure correct implementation and let layout manage caption | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -17,7 +17,7 @@ public class VDragAndDropWrapperPaintable extends VCustomComponentPaintable { | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().client = client; | |||
super.updateFromUIDL(uidl, client); | |||
if (!uidl.hasAttribute("cached") && !uidl.hasAttribute("hidden")) { | |||
if (isRealUpdate(uidl) && !uidl.hasAttribute("hidden")) { | |||
UIDL acceptCrit = uidl.getChildByTagName("-ac"); | |||
if (acceptCrit == null) { | |||
getWidgetForPaintable().dropHandler = null; |
@@ -28,8 +28,10 @@ public class VEmbeddedPaintable extends VAbstractPaintableWidget { | |||
public static final String CLICK_EVENT_IDENTIFIER = "click"; | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -21,6 +21,7 @@ public class VFilterSelectPaintable extends VAbstractPaintableWidget { | |||
* com.vaadin.terminal.gwt.client.Paintable#updateFromUIDL(com.vaadin.terminal | |||
* .gwt.client.UIDL, com.vaadin.terminal.gwt.client.ApplicationConnection) | |||
*/ | |||
@Override | |||
@SuppressWarnings("deprecation") | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Save details | |||
@@ -33,7 +34,8 @@ public class VFilterSelectPaintable extends VAbstractPaintableWidget { | |||
getWidgetForPaintable().tb.setEnabled(getWidgetForPaintable().enabled); | |||
getWidgetForPaintable().updateReadOnly(); | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -10,12 +10,14 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
import com.vaadin.terminal.gwt.client.VPaintableWidget; | |||
public class VFormLayoutPaintable extends VAbstractPaintableWidgetContainer { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
getWidgetForPaintable().client = client; | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -13,12 +13,19 @@ import com.vaadin.terminal.gwt.client.VPaintableWidget; | |||
public class VFormPaintable extends VAbstractPaintableWidgetContainer { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
getWidgetForPaintable().client = client; | |||
getWidgetForPaintable().id = uidl.getId(); | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -37,12 +37,14 @@ public class VGridLayoutPaintable extends VAbstractPaintableWidgetContainer { | |||
} | |||
}; | |||
@Override | |||
@SuppressWarnings("unchecked") | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
getWidgetForPaintable().client = client; | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -12,11 +12,18 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
public class VLinkPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Ensure correct implementation, | |||
// but don't let container manage caption etc. | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -21,8 +21,10 @@ public abstract class VMediaBasePaintable extends VAbstractPaintableWidget { | |||
public static final String ATTR_HTML = "html"; | |||
public static final String ATTR_ALT_TEXT = "alt"; | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -22,10 +22,12 @@ public class VMenuBarPaintable extends VAbstractPaintableWidget { | |||
* This method is called when the page is loaded for the first time, and | |||
* every time UI changes in the component are received from the server. | |||
*/ | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// This call should be made first. Ensure correct implementation, | |||
// and let the containing layout manage caption, etc. | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -12,11 +12,18 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
public class VNativeButtonPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Ensure correct implementation, | |||
// but don't let container manage caption etc. | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -10,13 +10,15 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
public abstract class VOptionGroupBasePaintable extends | |||
VAbstractPaintableWidget { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Save details | |||
getWidgetForPaintable().client = client; | |||
getWidgetForPaintable().paintableId = uidl.getId(); | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -58,8 +58,7 @@ public abstract class VOrderedLayoutPaintable extends CellBasedLayoutPaintable { | |||
super.updateFromUIDL(uidl, client); | |||
// Only non-cached, visible UIDL:s can introduce changes | |||
if (uidl.getBooleanAttribute("cached") | |||
|| uidl.getBooleanAttribute("invisible")) { | |||
if (!isRealUpdate(uidl) || uidl.getBooleanAttribute("invisible")) { | |||
getWidgetForPaintable().isRendering = false; | |||
return; | |||
} | |||
@@ -106,7 +105,7 @@ public abstract class VOrderedLayoutPaintable extends CellBasedLayoutPaintable { | |||
* the layout are rendered later when it is clear how much space | |||
* they can use | |||
*/ | |||
if (!Util.isCached(childUIDL)) { | |||
if (isRealUpdate(childUIDL)) { | |||
FloatSize relativeSize = Util.parseRelativeSize(childUIDL); | |||
childComponentContainer.setRelativeSize(relativeSize); | |||
} | |||
@@ -125,7 +124,7 @@ public abstract class VOrderedLayoutPaintable extends CellBasedLayoutPaintable { | |||
.getWidth()); | |||
} | |||
if (getWidgetForPaintable().sizeHasChangedDuringRendering | |||
&& Util.isCached(childUIDL)) { | |||
&& !isRealUpdate(childUIDL)) { | |||
// notify cached relative sized component about size | |||
// chance | |||
client.handleComponentRelativeSize(childComponentContainer | |||
@@ -176,7 +175,7 @@ public abstract class VOrderedLayoutPaintable extends CellBasedLayoutPaintable { | |||
getWidgetForPaintable().activeLayoutSize.getWidth()); | |||
} | |||
if (Util.isCached(childUIDL)) { | |||
if (!isRealUpdate(childUIDL)) { | |||
/* | |||
* We must update the size of the relative sized component if | |||
* the expand ratio or something else in the layout changes |
@@ -26,13 +26,18 @@ public class VPanelPaintable extends VAbstractPaintableWidgetContainer { | |||
} | |||
}; | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
}; | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
if (!uidl.hasAttribute("cached")) { | |||
if (isRealUpdate(uidl)) { | |||
// Handle caption displaying and style names, prior generics. | |||
// Affects size | |||
// calculations | |||
// Affects size calculations | |||
// Restore default stylenames | |||
getWidgetForPaintable().contentNode.setClassName(VPanel.CLASSNAME | |||
@@ -78,7 +83,9 @@ public class VPanelPaintable extends VAbstractPaintableWidgetContainer { | |||
} | |||
} | |||
// Ensure correct implementation | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -34,7 +34,7 @@ public class VPopupCalendarPaintable extends VTextualDatePaintable { | |||
super.updateFromUIDL(uidl, client); | |||
String popupStyleNames = ApplicationConnection.getStyleName( | |||
String popupStyleNames = getStyleNameFromUIDL( | |||
VPopupCalendar.POPUP_PRIMARY_STYLE_NAME, uidl, false); | |||
popupStyleNames += " " | |||
+ VDateField.CLASSNAME |
@@ -13,16 +13,23 @@ import com.vaadin.terminal.gwt.client.VPaintableWidget; | |||
public class VPopupViewPaintable extends VAbstractPaintableWidgetContainer { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
/** | |||
* | |||
* | |||
* @see com.vaadin.terminal.gwt.client.VPaintableWidget#updateFromUIDL(com.vaadin.terminal.gwt.client.UIDL, | |||
* com.vaadin.terminal.gwt.client.ApplicationConnection) | |||
*/ | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// This call should be made first. Ensure correct implementation, | |||
// and don't let the containing layout manage caption. | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
// These are for future server connections |
@@ -12,11 +12,13 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
public class VProgressIndicatorPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Ensure correct implementation, | |||
// but don't let container manage caption etc. | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -23,6 +23,7 @@ public class VScrollTablePaintable extends VAbstractPaintableWidgetContainer { | |||
* com.vaadin.terminal.gwt.client.Paintable#updateFromUIDL(com.vaadin.terminal | |||
* .gwt.client.UIDL, com.vaadin.terminal.gwt.client.ApplicationConnection) | |||
*/ | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
@@ -48,7 +49,8 @@ public class VScrollTablePaintable extends VAbstractPaintableWidgetContainer { | |||
getWidgetForPaintable().tFoot | |||
.setVisible(getWidgetForPaintable().showColFooters); | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -12,13 +12,15 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
public class VSliderPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().client = client; | |||
getWidgetForPaintable().id = uidl.getId(); | |||
// Ensure correct implementation | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -26,7 +26,6 @@ abstract class VTabsheetBase extends ComplexPanel implements Container { | |||
protected boolean disabled; | |||
protected boolean readonly; | |||
protected Set<String> disabledTabKeys = new HashSet<String>(); | |||
protected boolean cachedUpdate = false; | |||
public VTabsheetBase(String classname) { | |||
setElement(DOM.createDiv()); |
@@ -15,13 +15,13 @@ import com.vaadin.terminal.gwt.client.VPaintableWidget; | |||
public abstract class VTabsheetBasePaintable extends | |||
VAbstractPaintableWidgetContainer { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().client = client; | |||
// Ensure correct implementation | |||
getWidgetForPaintable().cachedUpdate = client.updateComponent(this, | |||
uidl, true); | |||
if (getWidgetForPaintable().cachedUpdate) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -16,14 +16,14 @@ public class VTabsheetPaintable extends VTabsheetBasePaintable { | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
if (!uidl.getBooleanAttribute("cached")) { | |||
if (isRealUpdate(uidl)) { | |||
// Handle stylename changes before generics (might affect size | |||
// calculations) | |||
getWidgetForPaintable().handleStyleNames(uidl); | |||
} | |||
super.updateFromUIDL(uidl, client); | |||
if (getWidgetForPaintable().cachedUpdate) { | |||
if (!isRealUpdate(uidl)) { | |||
getWidgetForPaintable().rendering = false; | |||
return; | |||
} |
@@ -16,12 +16,14 @@ import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.BeforeShortcutAct | |||
public class VTextFieldPaintable extends VAbstractPaintableWidget implements | |||
BeforeShortcutActionListener { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Save details | |||
getWidgetForPaintable().client = client; | |||
getWidgetForPaintable().paintableId = uidl.getId(); | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -14,9 +14,11 @@ import com.vaadin.terminal.gwt.client.ui.VTree.TreeNode; | |||
public class VTreePaintable extends VAbstractPaintableWidget { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Ensure correct implementation and let container manage caption | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -15,7 +15,7 @@ public class VTwinColSelectPaintable extends VOptionGroupBasePaintable { | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
// Captions are updated before super call to ensure the widths are set | |||
// correctly | |||
if (!uidl.getBooleanAttribute("cached")) { | |||
if (isRealUpdate(uidl)) { | |||
getWidgetForPaintable().updateCaptions(uidl); | |||
} | |||
@@ -12,8 +12,15 @@ import com.vaadin.terminal.gwt.client.VUIDLBrowser; | |||
public class VUnknownComponentPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
} | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
getWidgetForPaintable().setCaption( |
@@ -11,8 +11,10 @@ import com.vaadin.terminal.gwt.client.UIDL; | |||
public class VUploadPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
if (uidl.hasAttribute("notStarted")) { |
@@ -13,7 +13,8 @@ public class VVideoPaintable extends VMediaBasePaintable { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
super.updateFromUIDL(uidl, client); |
@@ -31,6 +31,7 @@ public class VViewPaintable extends VAbstractPaintableWidgetContainer { | |||
private static final String CLICK_EVENT_IDENTIFIER = VPanelPaintable.CLICK_EVENT_IDENTIFIER; | |||
@Override | |||
public void updateFromUIDL(final UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().rendering = true; | |||
// As VView is not created in the same way as all other paintables we | |||
@@ -143,7 +144,7 @@ public class VViewPaintable extends VAbstractPaintableWidgetContainer { | |||
} | |||
getWidgetForPaintable().layout.updateFromUIDL(childUidl, client); | |||
if (!childUidl.getBooleanAttribute("cached")) { | |||
if (isRealUpdate(childUidl)) { | |||
getWidgetForPaintable().updateParentFrameSize(); | |||
} | |||
@@ -33,6 +33,12 @@ public class VWindowPaintable extends VAbstractPaintableWidgetContainer | |||
} | |||
}; | |||
@Override | |||
protected boolean delegateCaptionHandling() { | |||
return false; | |||
}; | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().id = uidl.getId(); | |||
getWidgetForPaintable().client = client; | |||
@@ -47,7 +53,7 @@ public class VWindowPaintable extends VAbstractPaintableWidgetContainer | |||
return; | |||
} | |||
if (!uidl.hasAttribute("cached")) { | |||
if (isRealUpdate(uidl)) { | |||
if (uidl.getBooleanAttribute("modal") != getWidgetForPaintable().vaadinModality) { | |||
getWidgetForPaintable().setVaadinModality( | |||
!getWidgetForPaintable().vaadinModality); | |||
@@ -75,7 +81,8 @@ public class VWindowPaintable extends VAbstractPaintableWidgetContainer | |||
} | |||
getWidgetForPaintable().visibilityChangesDisabled = true; | |||
if (client.updateComponent(this, uidl, false)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
getWidgetForPaintable().visibilityChangesDisabled = false; |
@@ -16,8 +16,10 @@ public class VLabelPaintable extends VAbstractPaintableWidget { | |||
public VLabelPaintable() { | |||
} | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -11,11 +11,12 @@ import com.vaadin.terminal.gwt.client.ui.VMarginInfo; | |||
public abstract class CellBasedLayoutPaintable extends | |||
VAbstractPaintableWidgetContainer { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().client = client; | |||
// Only non-cached UIDL:s can introduce changes | |||
if (uidl.getBooleanAttribute("cached")) { | |||
if (isCachedUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -30,9 +31,7 @@ public abstract class CellBasedLayoutPaintable extends | |||
* This call should be made first. Ensure correct implementation, handle | |||
* size etc. | |||
*/ | |||
if (client.updateComponent(this, uidl, true)) { | |||
return; | |||
} | |||
super.updateFromUIDL(uidl, client); | |||
handleDynamicDimensions(uidl); | |||
} |
@@ -14,6 +14,7 @@ import com.vaadin.terminal.gwt.client.ui.VAbstractPaintableWidget; | |||
public class VRichTextAreaPaintable extends VAbstractPaintableWidget implements | |||
BeforeShortcutActionListener { | |||
@Override | |||
public void updateFromUIDL(final UIDL uidl, ApplicationConnection client) { | |||
getWidgetForPaintable().client = client; | |||
getWidgetForPaintable().id = uidl.getId(); | |||
@@ -29,12 +30,13 @@ public class VRichTextAreaPaintable extends VAbstractPaintableWidget implements | |||
.setHTML(getWidgetForPaintable().currentValue); | |||
} | |||
} | |||
if (!uidl.hasAttribute("cached")) { | |||
if (isRealUpdate(uidl)) { | |||
getWidgetForPaintable().setEnabled( | |||
!uidl.getBooleanAttribute("disabled")); | |||
} | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
@@ -11,8 +11,10 @@ import com.vaadin.terminal.gwt.client.ui.VAbstractPaintableWidget; | |||
public class VMyDragSourcePaintable extends VAbstractPaintableWidget { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
} |
@@ -11,8 +11,10 @@ import com.vaadin.terminal.gwt.client.ui.VAbstractPaintableWidget; | |||
public class VMyDropTargetPaintable extends VAbstractPaintableWidget { | |||
@Override | |||
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { | |||
if (client.updateComponent(this, uidl, true)) { | |||
super.updateFromUIDL(uidl, client); | |||
if (!isRealUpdate(uidl)) { | |||
return; | |||
} | |||
getWidgetForPaintable().client = client; |