summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-08-23 12:09:48 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-23 12:09:48 +0300
commitbc6786f0dc865b88dd2eeb0614534bfce80dee35 (patch)
tree0e1d0d0a27a0c0c50293798490888f92029bb937 /server
parentaf8afede9f0d196a28792dea9e587a1eac829902 (diff)
downloadvaadin-framework-bc6786f0dc865b88dd2eeb0614534bfce80dee35.tar.gz
vaadin-framework-bc6786f0dc865b88dd2eeb0614534bfce80dee35.zip
Rename requestRepaint to markAsDirty (#9378)
Also remove some requestRepaint calls that are no longer needed (#9325)
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/event/ActionManager.java2
-rw-r--r--server/src/com/vaadin/terminal/AbstractClientConnector.java23
-rw-r--r--server/src/com/vaadin/terminal/Page.java10
-rw-r--r--server/src/com/vaadin/terminal/Vaadin6Component.java11
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/ClientConnector.java28
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java12
-rw-r--r--server/src/com/vaadin/ui/AbsoluteLayout.java34
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java12
-rw-r--r--server/src/com/vaadin/ui/AbstractComponentContainer.java9
-rw-r--r--server/src/com/vaadin/ui/AbstractField.java26
-rw-r--r--server/src/com/vaadin/ui/AbstractOrderedLayout.java2
-rw-r--r--server/src/com/vaadin/ui/AbstractSelect.java36
-rw-r--r--server/src/com/vaadin/ui/AbstractSplitPanel.java12
-rw-r--r--server/src/com/vaadin/ui/AbstractTextField.java14
-rw-r--r--server/src/com/vaadin/ui/ComboBox.java4
-rw-r--r--server/src/com/vaadin/ui/CssLayout.java10
-rw-r--r--server/src/com/vaadin/ui/CustomComponent.java2
-rw-r--r--server/src/com/vaadin/ui/CustomField.java4
-rw-r--r--server/src/com/vaadin/ui/DateField.java18
-rw-r--r--server/src/com/vaadin/ui/DragAndDropWrapper.java8
-rw-r--r--server/src/com/vaadin/ui/Embedded.java22
-rw-r--r--server/src/com/vaadin/ui/Form.java16
-rw-r--r--server/src/com/vaadin/ui/GridLayout.java16
-rw-r--r--server/src/com/vaadin/ui/Label.java4
-rw-r--r--server/src/com/vaadin/ui/Link.java10
-rw-r--r--server/src/com/vaadin/ui/ListSelect.java4
-rw-r--r--server/src/com/vaadin/ui/MenuBar.java40
-rw-r--r--server/src/com/vaadin/ui/NativeSelect.java2
-rw-r--r--server/src/com/vaadin/ui/OptionGroup.java10
-rw-r--r--server/src/com/vaadin/ui/Panel.java2
-rw-r--r--server/src/com/vaadin/ui/PopupDateField.java2
-rw-r--r--server/src/com/vaadin/ui/PopupView.java4
-rw-r--r--server/src/com/vaadin/ui/ProgressIndicator.java4
-rw-r--r--server/src/com/vaadin/ui/RichTextArea.java4
-rw-r--r--server/src/com/vaadin/ui/Root.java10
-rw-r--r--server/src/com/vaadin/ui/Select.java10
-rw-r--r--server/src/com/vaadin/ui/Slider.java8
-rw-r--r--server/src/com/vaadin/ui/TabSheet.java34
-rw-r--r--server/src/com/vaadin/ui/Table.java66
-rw-r--r--server/src/com/vaadin/ui/Tree.java38
-rw-r--r--server/src/com/vaadin/ui/TreeTable.java6
-rw-r--r--server/src/com/vaadin/ui/TwinColSelect.java8
-rw-r--r--server/src/com/vaadin/ui/Upload.java14
-rw-r--r--server/src/com/vaadin/ui/Window.java2
44 files changed, 342 insertions, 271 deletions
diff --git a/server/src/com/vaadin/event/ActionManager.java b/server/src/com/vaadin/event/ActionManager.java
index 50ddef6265..296d12ba92 100644
--- a/server/src/com/vaadin/event/ActionManager.java
+++ b/server/src/com/vaadin/event/ActionManager.java
@@ -67,7 +67,7 @@ public class ActionManager implements Action.Container, Action.Handler,
private void requestRepaint() {
if (viewer != null) {
- viewer.requestRepaint();
+ viewer.markAsDirty();
}
}
diff --git a/server/src/com/vaadin/terminal/AbstractClientConnector.java b/server/src/com/vaadin/terminal/AbstractClientConnector.java
index 2b96c5fb35..d2490225fb 100644
--- a/server/src/com/vaadin/terminal/AbstractClientConnector.java
+++ b/server/src/com/vaadin/terminal/AbstractClientConnector.java
@@ -85,8 +85,15 @@ public abstract class AbstractClientConnector implements ClientConnector {
private ClientConnector parent;
/* Documentation copied from interface */
+ @Deprecated
@Override
public void requestRepaint() {
+ markAsDirty();
+ }
+
+ /* Documentation copied from interface */
+ @Override
+ public void markAsDirty() {
Root root = getRoot();
if (root != null) {
root.getConnectorTracker().markDirty(this);
@@ -389,11 +396,17 @@ public abstract class AbstractClientConnector implements ClientConnector {
}
@Override
+ @Deprecated
public void requestRepaintAll() {
- requestRepaint();
+ markAsDirtyRecursive();
+ }
+
+ @Override
+ public void markAsDirtyRecursive() {
+ markAsDirty();
for (ClientConnector connector : getAllChildrenIterable(this)) {
- connector.requestRepaintAll();
+ connector.markAsDirtyRecursive();
}
}
@@ -469,14 +482,14 @@ public abstract class AbstractClientConnector implements ClientConnector {
extensions.add(extension);
extension.setParent(this);
- requestRepaint();
+ markAsDirty();
}
@Override
public void removeExtension(Extension extension) {
extension.setParent(null);
extensions.remove(extension);
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -513,7 +526,7 @@ public abstract class AbstractClientConnector implements ClientConnector {
@Override
public void attach() {
- requestRepaint();
+ markAsDirty();
getRoot().getConnectorTracker().registerConnector(this);
diff --git a/server/src/com/vaadin/terminal/Page.java b/server/src/com/vaadin/terminal/Page.java
index 8eb77b7d0d..d41d500bb0 100644
--- a/server/src/com/vaadin/terminal/Page.java
+++ b/server/src/com/vaadin/terminal/Page.java
@@ -332,7 +332,7 @@ public class Page implements Serializable {
if (fireEvents) {
fireEvent(new FragmentChangedEvent(this, newFragment));
}
- root.requestRepaint();
+ root.markAsDirty();
}
}
@@ -523,7 +523,7 @@ public class Page implements Serializable {
*/
public void open(Resource resource) {
openList.add(new OpenResource(resource, null, -1, -1, BORDER_DEFAULT));
- root.requestRepaint();
+ root.markAsDirty();
}
/**
@@ -566,7 +566,7 @@ public class Page implements Serializable {
public void open(Resource resource, String windowName) {
openList.add(new OpenResource(resource, windowName, -1, -1,
BORDER_DEFAULT));
- root.requestRepaint();
+ root.markAsDirty();
}
/**
@@ -589,7 +589,7 @@ public class Page implements Serializable {
int height, BorderStyle border) {
openList.add(new OpenResource(resource, windowName, width, height,
border));
- root.requestRepaint();
+ root.markAsDirty();
}
/**
@@ -603,7 +603,7 @@ public class Page implements Serializable {
notifications = new LinkedList<Notification>();
}
notifications.add(notification);
- root.requestRepaint();
+ root.markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/terminal/Vaadin6Component.java b/server/src/com/vaadin/terminal/Vaadin6Component.java
index 048000e31d..eb169c90f9 100644
--- a/server/src/com/vaadin/terminal/Vaadin6Component.java
+++ b/server/src/com/vaadin/terminal/Vaadin6Component.java
@@ -52,4 +52,15 @@ public interface Vaadin6Component extends VariableOwner, Component,
*/
public void paintContent(PaintTarget target) throws PaintException;
+ /**
+ * (non-Javadoc) {@inheritDoc}
+ * <p>
+ * For a Vaadin6Component, markAsDirty will also cause
+ * {@link #paintContent(PaintTarget)} to be called before sending changes to
+ * the client.
+ *
+ * @see com.vaadin.terminal.gwt.server.ClientConnector#markAsDirty()
+ */
+ @Override
+ public void markAsDirty();
}
diff --git a/server/src/com/vaadin/terminal/gwt/server/ClientConnector.java b/server/src/com/vaadin/terminal/gwt/server/ClientConnector.java
index 87524fe28f..24675c9e45 100644
--- a/server/src/com/vaadin/terminal/gwt/server/ClientConnector.java
+++ b/server/src/com/vaadin/terminal/gwt/server/ClientConnector.java
@@ -65,17 +65,39 @@ public interface ClientConnector extends Connector, RpcTarget {
public ClientConnector getParent();
/**
- * Requests that the connector should be repainted as soon as possible.
+ * @deprecated As of 7.0.0, use {@link #markAsDirty()} instead
*/
+ @Deprecated
public void requestRepaint();
/**
- * Causes a repaint of this connector, and all connectors below it.
+ * Marks that this connector's state might have changed. When the framework
+ * is about to send new data to the client-side, it will run
+ * {@link #beforeClientResponse(boolean)} followed by {@link #encodeState()}
+ * for all connectors that are marked as dirty and send any updated state
+ * info to the client.
*
+ * @since 7.0.0
+ */
+ public void markAsDirty();
+
+ /**
+ * @deprecated As of 7.0.0, use {@link #markAsDirtyRecursive()} instead
+ */
+ @Deprecated
+ public void requestRepaintAll();
+
+ /**
+ * Causes this connector and all connectors below it to be marked as dirty.
+ * <p>
* This should only be used in special cases, e.g when the state of a
* descendant depends on the state of an ancestor.
+ *
+ * @see #markAsDirty()
+ *
+ * @since 7.0.0
*/
- public void requestRepaintAll();
+ public void markAsDirtyRecursive();
/**
* Sets the parent connector of the connector.
diff --git a/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java b/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java
index 981d2569d1..221598171c 100644
--- a/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java
+++ b/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java
@@ -264,7 +264,13 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
}
@Override
+ @Deprecated
public void requestRepaint() {
+ markAsDirty();
+ }
+
+ @Override
+ public void markAsDirty() {
// TODO Auto-generated method stub
}
@@ -276,7 +282,13 @@ public class DragAndDropService implements VariableOwner, ClientConnector {
}
@Override
+ @Deprecated
public void requestRepaintAll() {
+ markAsDirtyRecursive();
+ }
+
+ @Override
+ public void markAsDirtyRecursive() {
// TODO Auto-generated method stub
}
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java
index 8981895717..56bbd19852 100644
--- a/server/src/com/vaadin/ui/AbsoluteLayout.java
+++ b/server/src/com/vaadin/ui/AbsoluteLayout.java
@@ -153,7 +153,7 @@ public class AbsoluteLayout extends AbstractLayout implements
internalRemoveComponent(c);
throw e;
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -197,7 +197,7 @@ public class AbsoluteLayout extends AbstractLayout implements
public void removeComponent(Component c) {
internalRemoveComponent(c);
super.removeComponent(c);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -245,7 +245,7 @@ public class AbsoluteLayout extends AbstractLayout implements
private void internalSetPosition(Component component,
ComponentPosition position) {
componentToCoordinates.put(component, position);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -322,7 +322,7 @@ public class AbsoluteLayout extends AbstractLayout implements
}
}
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -363,7 +363,7 @@ public class AbsoluteLayout extends AbstractLayout implements
public void setTop(Float topValue, Unit topUnits) {
this.topValue = topValue;
this.topUnits = topUnits;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -379,7 +379,7 @@ public class AbsoluteLayout extends AbstractLayout implements
public void setRight(Float rightValue, Unit rightUnits) {
this.rightValue = rightValue;
this.rightUnits = rightUnits;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -395,7 +395,7 @@ public class AbsoluteLayout extends AbstractLayout implements
public void setBottom(Float bottomValue, Unit bottomUnits) {
this.bottomValue = bottomValue;
this.bottomUnits = bottomUnits;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -411,7 +411,7 @@ public class AbsoluteLayout extends AbstractLayout implements
public void setLeft(Float leftValue, Unit leftUnits) {
this.leftValue = leftValue;
this.leftUnits = leftUnits;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -422,7 +422,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setZIndex(int zIndex) {
this.zIndex = zIndex;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -434,7 +434,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setTopValue(Float topValue) {
this.topValue = topValue;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -468,7 +468,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setRightValue(Float rightValue) {
this.rightValue = rightValue;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -492,7 +492,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setBottomValue(Float bottomValue) {
this.bottomValue = bottomValue;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -516,7 +516,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setLeftValue(Float leftValue) {
this.leftValue = leftValue;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -538,7 +538,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setTopUnits(Unit topUnits) {
this.topUnits = topUnits;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -560,7 +560,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setRightUnits(Unit rightUnits) {
this.rightUnits = rightUnits;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -582,7 +582,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setBottomUnits(Unit bottomUnits) {
this.bottomUnits = bottomUnits;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -604,7 +604,7 @@ public class AbsoluteLayout extends AbstractLayout implements
*/
public void setLeftUnits(Unit leftUnits) {
this.leftUnits = leftUnits;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java
index a799c5d679..b1393488f7 100644
--- a/server/src/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/com/vaadin/ui/AbstractComponent.java
@@ -262,7 +262,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
this.locale = locale;
// FIXME: Reload value if there is a converter
- requestRepaint();
+ markAsDirty();
}
/*
@@ -373,7 +373,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
if (getParent() != null) {
// Must always repaint the parent (at least the hierarchy) when
// visibility of a child component changes.
- getParent().requestRepaint();
+ getParent().markAsDirty();
}
}
@@ -535,7 +535,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
public void setComponentError(ErrorMessage componentError) {
this.componentError = componentError;
fireComponentErrorEvent();
- requestRepaint();
+ markAsDirty();
}
/*
@@ -751,7 +751,6 @@ public abstract class AbstractComponent extends AbstractClientConnector
if (needRepaint) {
getState().addRegisteredEventListener(eventIdentifier);
- requestRepaint();
}
}
@@ -800,7 +799,6 @@ public abstract class AbstractComponent extends AbstractClientConnector
eventRouter.removeListener(eventType, target);
if (!eventRouter.hasListeners(eventType)) {
getState().removeRegisteredEventListener(eventIdentifier);
- requestRepaint();
}
}
}
@@ -1107,7 +1105,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
this.height = height;
heightUnit = unit;
- requestRepaint();
+ markAsDirty();
// ComponentSizeValidator.setHeightLocation(this);
}
@@ -1145,7 +1143,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
}
this.width = width;
widthUnit = unit;
- requestRepaint();
+ markAsDirty();
// ComponentSizeValidator.setWidthLocation(this);
}
diff --git a/server/src/com/vaadin/ui/AbstractComponentContainer.java b/server/src/com/vaadin/ui/AbstractComponentContainer.java
index 7450c76fda..4939eb1265 100644
--- a/server/src/com/vaadin/ui/AbstractComponentContainer.java
+++ b/server/src/com/vaadin/ui/AbstractComponentContainer.java
@@ -212,7 +212,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
// If the visibility state is toggled it might affect all children
// aswell, e.g. make container visible should make children visible if
// they were only hidden because the container was hidden.
- requestRepaintAll();
+ markAsDirtyRecursive();
}
@Override
@@ -306,12 +306,7 @@ public abstract class AbstractComponentContainer extends AbstractComponent
private void repaintChildTrees(Collection<Component> dirtyChildren) {
for (Component c : dirtyChildren) {
- if (c instanceof ComponentContainer) {
- ComponentContainer cc = (ComponentContainer) c;
- cc.requestRepaintAll();
- } else {
- c.requestRepaint();
- }
+ c.markAsDirtyRecursive();
}
}
diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java
index 23481eca9e..5123d08da9 100644
--- a/server/src/com/vaadin/ui/AbstractField.java
+++ b/server/src/com/vaadin/ui/AbstractField.java
@@ -301,7 +301,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
// Sets the buffering state
currentBufferedSourceException = new Buffered.SourceException(
this, e);
- requestRepaint();
+ markAsDirty();
// Throws the source exception
throw currentBufferedSourceException;
@@ -316,7 +316,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
fireValueChange(false);
} else if (wasModified) {
// If the value did not change, but the modification status did
- requestRepaint();
+ markAsDirty();
}
}
}
@@ -535,7 +535,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
// Sets the buffering state
currentBufferedSourceException = new Buffered.SourceException(
this, e);
- requestRepaint();
+ markAsDirty();
// Throws the source exception
throw currentBufferedSourceException;
@@ -805,7 +805,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
validators = new LinkedList<Validator>();
}
validators.add(validator);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -833,7 +833,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
if (validators != null) {
validators.remove(validator);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -843,7 +843,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
if (validators != null) {
validators.clear();
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1070,7 +1070,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
protected void fireValueChange(boolean repaintIsNotNeeded) {
fireEvent(new AbstractField.ValueChangeEvent(this));
if (!repaintIsNotNeeded) {
- requestRepaint();
+ markAsDirty();
}
}
@@ -1264,7 +1264,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
protected void setInternalValue(T newValue) {
value = newValue;
if (validators != null && !validators.isEmpty()) {
- requestRepaint();
+ markAsDirty();
}
}
@@ -1347,7 +1347,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
@Override
public void setRequiredError(String requiredMessage) {
requiredError = requiredMessage;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -1375,7 +1375,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
*/
public void setConversionError(String valueConversionError) {
this.conversionError = valueConversionError;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1417,7 +1417,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
*/
public void setValidationVisible(boolean validateAutomatically) {
if (validationVisible != validateAutomatically) {
- requestRepaint();
+ markAsDirty();
validationVisible = validateAutomatically;
}
}
@@ -1430,7 +1430,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
public void setCurrentBufferedSourceException(
Buffered.SourceException currentBufferedSourceException) {
this.currentBufferedSourceException = currentBufferedSourceException;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1518,7 +1518,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
*/
public void setConverter(Converter<T, ?> converter) {
this.converter = (Converter<T, Object>) converter;
- requestRepaint();
+ markAsDirty();
}
@Override
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
index 0a57cb98c4..596bbb7ee2 100644
--- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
@@ -225,7 +225,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
components.add(newLocation, oldComponent);
}
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/AbstractSelect.java b/server/src/com/vaadin/ui/AbstractSelect.java
index 19a74782c4..21ff7ba948 100644
--- a/server/src/com/vaadin/ui/AbstractSelect.java
+++ b/server/src/com/vaadin/ui/AbstractSelect.java
@@ -462,7 +462,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (!isNullSelectionAllowed()
&& (id == null || id == getNullSelectionItemId())) {
// skip empty selection if nullselection is not allowed
- requestRepaint();
+ markAsDirty();
} else if (id != null && containsId(id)) {
acceptedSelections.add(id);
}
@@ -470,7 +470,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (!isNullSelectionAllowed() && acceptedSelections.size() < 1) {
// empty selection not allowed, keep old value
- requestRepaint();
+ markAsDirty();
return;
}
@@ -498,7 +498,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (!isNullSelectionAllowed()
&& (clientSideSelectedKeys.length == 0
|| clientSideSelectedKeys[0] == null || clientSideSelectedKeys[0] == getNullSelectionItemId())) {
- requestRepaint();
+ markAsDirty();
return;
}
if (clientSideSelectedKeys.length == 0) {
@@ -513,7 +513,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
final Object id = itemIdMapper
.get(clientSideSelectedKeys[0]);
if (!isNullSelectionAllowed() && id == null) {
- requestRepaint();
+ markAsDirty();
} else if (id != null
&& id.equals(getNullSelectionItemId())) {
setValue(null, true);
@@ -975,7 +975,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
*/
setValue(null);
- requestRepaint();
+ markAsDirty();
}
}
@@ -1042,7 +1042,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
}
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -1071,7 +1071,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
this.allowNewOptions = allowNewOptions;
- requestRepaint();
+ markAsDirty();
}
}
@@ -1087,7 +1087,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
public void setItemCaption(Object itemId, String caption) {
if (itemId != null) {
itemCaptions.put(itemId, caption);
- requestRepaint();
+ markAsDirty();
}
}
@@ -1173,7 +1173,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
} else {
itemIcons.put(itemId, icon);
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -1239,7 +1239,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
public void setItemCaptionMode(ItemCaptionMode mode) {
if (mode != null) {
itemCaptionMode = mode;
- requestRepaint();
+ markAsDirty();
}
}
@@ -1302,13 +1302,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
if (propertyId != null) {
itemCaptionPropertyId = propertyId;
setItemCaptionMode(ITEM_CAPTION_MODE_PROPERTY);
- requestRepaint();
+ markAsDirty();
} else {
itemCaptionPropertyId = null;
if (getItemCaptionMode() == ITEM_CAPTION_MODE_PROPERTY) {
setItemCaptionMode(ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID);
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -1360,7 +1360,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
throw new IllegalArgumentException(
"Property type must be assignable to Resource");
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1579,7 +1579,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
.containerPropertySetChange(event);
}
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1594,7 +1594,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
.containerItemSetChange(event);
}
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1665,7 +1665,7 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
public void setNullSelectionAllowed(boolean nullSelectionAllowed) {
if (nullSelectionAllowed != this.nullSelectionAllowed) {
this.nullSelectionAllowed = nullSelectionAllowed;
- requestRepaint();
+ markAsDirty();
}
}
@@ -1824,13 +1824,13 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
@Override
public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
- requestRepaint();
+ markAsDirty();
}
@Override
public void itemPropertySetChange(
com.vaadin.data.Item.PropertySetChangeEvent event) {
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java
index 68964e2c35..8b7499115c 100644
--- a/server/src/com/vaadin/ui/AbstractSplitPanel.java
+++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java
@@ -154,8 +154,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
if (c != null) {
super.addComponent(c);
}
-
- requestRepaint();
}
/**
@@ -179,7 +177,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
if (c != null) {
super.addComponent(c);
}
- requestRepaint();
}
/**
@@ -217,7 +214,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
} else if (c == getSecondComponent()) {
getState().setSecondChild(null);
}
- requestRepaint();
+ markAsDirty();
}
/*
@@ -259,7 +256,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
} else if (oldComponent == getSecondComponent()) {
setSecondComponent(newComponent);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -329,8 +326,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
splitterState.setPositionUnit(unit.getSymbol());
splitterState.setPositionReversed(reverse);
posUnit = unit;
-
- requestRepaint();
}
/**
@@ -452,8 +447,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
state.setMaxPosition(maxPos);
state.setMaxPositionUnit(maxPosUnit.getSymbol());
posMaxUnit = maxPosUnit;
-
- requestRepaint();
}
/**
@@ -465,7 +458,6 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
*/
public void setLocked(boolean locked) {
getSplitterState().setLocked(locked);
- requestRepaint();
}
/**
diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java
index 51d5449fdd..1bd61023a4 100644
--- a/server/src/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/com/vaadin/ui/AbstractTextField.java
@@ -184,7 +184,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
// If the modified status changes, or if we have a
// formatter, repaint is needed after all.
if (wasModified != isModified()) {
- requestRepaint();
+ markAsDirty();
}
}
}
@@ -271,7 +271,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
*/
public void setNullRepresentation(String nullRepresentation) {
this.nullRepresentation = nullRepresentation;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -297,7 +297,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
*/
public void setNullSettingAllowed(boolean nullSettingAllowed) {
this.nullSettingAllowed = nullSettingAllowed;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -440,7 +440,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
*/
if (lastKnownTextContent != null) {
lastKnownTextContent = null;
- requestRepaint();
+ markAsDirty();
}
}
@@ -465,7 +465,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
*/
public void setTextChangeEventMode(TextChangeEventMode inputEventMode) {
textChangeEventMode = inputEventMode;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -536,7 +536,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
*/
public void setTextChangeTimeout(int timeout) {
textChangeEventTimeout = timeout;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -627,7 +627,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements
selectionPosition = pos;
selectionLength = length;
focus();
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/ComboBox.java b/server/src/com/vaadin/ui/ComboBox.java
index e2655be405..af19ca5b96 100644
--- a/server/src/com/vaadin/ui/ComboBox.java
+++ b/server/src/com/vaadin/ui/ComboBox.java
@@ -81,7 +81,7 @@ public class ComboBox extends Select {
*/
public void setInputPrompt(String inputPrompt) {
this.inputPrompt = inputPrompt;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -110,7 +110,7 @@ public class ComboBox extends Select {
*/
public void setTextInputAllowed(boolean textInputAllowed) {
this.textInputAllowed = textInputAllowed;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java
index c80986b768..b16bcf31df 100644
--- a/server/src/com/vaadin/ui/CssLayout.java
+++ b/server/src/com/vaadin/ui/CssLayout.java
@@ -102,7 +102,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
components.add(c);
try {
super.addComponent(c);
- requestRepaint();
+ markAsDirty();
} catch (IllegalArgumentException e) {
components.remove(c);
throw e;
@@ -125,7 +125,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
components.addFirst(c);
try {
super.addComponent(c);
- requestRepaint();
+ markAsDirty();
} catch (IllegalArgumentException e) {
components.remove(c);
throw e;
@@ -154,7 +154,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
components.add(index, c);
try {
super.addComponent(c);
- requestRepaint();
+ markAsDirty();
} catch (IllegalArgumentException e) {
components.remove(c);
throw e;
@@ -171,7 +171,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
public void removeComponent(Component c) {
components.remove(c);
super.removeComponent(c);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -276,7 +276,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
components.add(newLocation, oldComponent);
}
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/CustomComponent.java b/server/src/com/vaadin/ui/CustomComponent.java
index 88f7b162c1..b67fa89ecb 100644
--- a/server/src/com/vaadin/ui/CustomComponent.java
+++ b/server/src/com/vaadin/ui/CustomComponent.java
@@ -100,7 +100,7 @@ public class CustomComponent extends AbstractComponentContainer {
super.addComponent(compositionRoot);
}
root = compositionRoot;
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/CustomField.java b/server/src/com/vaadin/ui/CustomField.java
index 794e472dae..9ac5e2defb 100644
--- a/server/src/com/vaadin/ui/CustomField.java
+++ b/server/src/com/vaadin/ui/CustomField.java
@@ -120,13 +120,13 @@ public abstract class CustomField<T> extends AbstractField<T> implements
@Override
public void setHeight(float height, Unit unit) {
super.setHeight(height, unit);
- requestRepaintAll();
+ markAsDirtyRecursive();
}
@Override
public void setWidth(float height, Unit unit) {
super.setWidth(height, unit);
- requestRepaintAll();
+ markAsDirtyRecursive();
}
// ComponentContainer methods
diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java
index 790f3568d5..828fa3b21d 100644
--- a/server/src/com/vaadin/ui/DateField.java
+++ b/server/src/com/vaadin/ui/DateField.java
@@ -429,7 +429,7 @@ public class DateField extends AbstractField<Date> implements
* if handleUnparsableDateString throws an exception. In
* this case the invalid text remains in the DateField.
*/
- requestRepaint();
+ markAsDirty();
} catch (Converter.ConversionException e) {
/*
@@ -471,7 +471,7 @@ public class DateField extends AbstractField<Date> implements
* change and form depends on this implementation detail.
*/
notifyFormOfValidityChange();
- requestRepaint();
+ markAsDirty();
}
} else if (newDate != oldDate
&& (newDate == null || !newDate.equals(oldDate))) {
@@ -562,7 +562,7 @@ public class DateField extends AbstractField<Date> implements
* this.
*/
notifyFormOfValidityChange();
- requestRepaint();
+ markAsDirty();
return;
}
@@ -588,7 +588,7 @@ public class DateField extends AbstractField<Date> implements
* thing as form does in its value change listener that
* it registers to all fields.
*/
- f.requestRepaint();
+ f.markAsDirty();
formFound = true;
break;
}
@@ -639,7 +639,7 @@ public class DateField extends AbstractField<Date> implements
*/
public void setResolution(Resolution resolution) {
this.resolution = resolution;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -699,7 +699,7 @@ public class DateField extends AbstractField<Date> implements
*/
public void setDateFormat(String dateFormat) {
this.dateFormat = dateFormat;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -725,7 +725,7 @@ public class DateField extends AbstractField<Date> implements
*/
public void setLenient(boolean lenient) {
this.lenient = lenient;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -781,7 +781,7 @@ public class DateField extends AbstractField<Date> implements
*/
public void setShowISOWeekNumbers(boolean showWeekNumbers) {
showISOWeekNumbers = showWeekNumbers;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -850,7 +850,7 @@ public class DateField extends AbstractField<Date> implements
*/
public void setTimeZone(TimeZone timeZone) {
this.timeZone = timeZone;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/DragAndDropWrapper.java b/server/src/com/vaadin/ui/DragAndDropWrapper.java
index 1c41de81a0..ec805ecf46 100644
--- a/server/src/com/vaadin/ui/DragAndDropWrapper.java
+++ b/server/src/com/vaadin/ui/DragAndDropWrapper.java
@@ -60,7 +60,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
String id = (String) rawVariables.get("fi" + i);
files[i] = file;
receivers.put(id, file);
- requestRepaint(); // paint Receivers
+ markAsDirty(); // paint Receivers
}
}
}
@@ -207,7 +207,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
*/
public void setHTML5DataFlavor(String type, Object value) {
html5DataFlavors.put(type, value);
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -254,7 +254,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
public void setDropHandler(DropHandler dropHandler) {
this.dropHandler = dropHandler;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -270,7 +270,7 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
public void setDragStartMode(DragStartMode dragStartMode) {
this.dragStartMode = dragStartMode;
- requestRepaint();
+ markAsDirty();
}
public DragStartMode getDragStartMode() {
diff --git a/server/src/com/vaadin/ui/Embedded.java b/server/src/com/vaadin/ui/Embedded.java
index d019ea3b0b..41b93d0b27 100644
--- a/server/src/com/vaadin/ui/Embedded.java
+++ b/server/src/com/vaadin/ui/Embedded.java
@@ -196,7 +196,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
if (altText != this.altText
|| (altText != null && !altText.equals(this.altText))) {
this.altText = altText;
- requestRepaint();
+ markAsDirty();
}
}
@@ -222,7 +222,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
*/
public void setParameter(String name, String value) {
parameters.put(name, value);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -244,7 +244,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
*/
public void removeParameter(String name) {
parameters.remove(name);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -307,7 +307,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
if (codebase != this.codebase
|| (codebase != null && !codebase.equals(this.codebase))) {
this.codebase = codebase;
- requestRepaint();
+ markAsDirty();
}
}
@@ -325,7 +325,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
if (codetype != this.codetype
|| (codetype != null && !codetype.equals(this.codetype))) {
this.codetype = codetype;
- requestRepaint();
+ markAsDirty();
}
}
@@ -350,7 +350,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
setParameter("wmode", "transparent");
}
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -365,7 +365,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
if (standby != this.standby
|| (standby != null && !standby.equals(this.standby))) {
this.standby = standby;
- requestRepaint();
+ markAsDirty();
}
}
@@ -390,7 +390,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
if (classId != this.classId
|| (classId != null && !classId.equals(this.classId))) {
this.classId = classId;
- requestRepaint();
+ markAsDirty();
}
}
@@ -443,7 +443,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
} else {
// Keep previous type
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -467,7 +467,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
}
if (type != this.type) {
this.type = type;
- requestRepaint();
+ markAsDirty();
}
}
@@ -502,7 +502,7 @@ public class Embedded extends AbstractComponent implements Vaadin6Component {
if (archive != this.archive
|| (archive != null && !archive.equals(this.archive))) {
this.archive = archive;
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/Form.java b/server/src/com/vaadin/ui/Form.java
index 8f63ad511a..55404b2e6b 100644
--- a/server/src/com/vaadin/ui/Form.java
+++ b/server/src/com/vaadin/ui/Form.java
@@ -133,7 +133,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
private final ValueChangeListener fieldValueChangeListener = new ValueChangeListener() {
@Override
public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
- requestRepaint();
+ markAsDirty();
}
};
@@ -342,7 +342,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
if (problems == null) {
if (currentBufferedSourceException != null) {
currentBufferedSourceException = null;
- requestRepaint();
+ markAsDirty();
}
return;
}
@@ -357,7 +357,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
final Buffered.SourceException e = new Buffered.SourceException(this,
causes);
currentBufferedSourceException = e;
- requestRepaint();
+ markAsDirty();
throw e;
}
@@ -386,7 +386,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
if (problems == null) {
if (currentBufferedSourceException != null) {
currentBufferedSourceException = null;
- requestRepaint();
+ markAsDirty();
}
return;
}
@@ -401,7 +401,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
final Buffered.SourceException e = new Buffered.SourceException(this,
causes);
currentBufferedSourceException = e;
- requestRepaint();
+ markAsDirty();
throw e;
}
@@ -491,7 +491,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
public void addField(Object propertyId, Field<?> field) {
registerField(propertyId, field);
attachField(propertyId, field);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -720,7 +720,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
// If the new datasource is null, just set null datasource
if (itemDatasource == null) {
- requestRepaint();
+ markAsDirty();
return;
}
@@ -1244,7 +1244,7 @@ public class Form extends AbstractField<Object> implements Item.Editor,
// some ancestor still disabled, don't update children
return;
} else {
- getLayout().requestRepaintAll();
+ getLayout().markAsDirtyRecursive();
}
}
diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java
index 5de6cc79c7..3870b71611 100644
--- a/server/src/com/vaadin/ui/GridLayout.java
+++ b/server/src/com/vaadin/ui/GridLayout.java
@@ -254,7 +254,7 @@ public class GridLayout extends AbstractLayout implements
}
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -400,7 +400,7 @@ public class GridLayout extends AbstractLayout implements
super.removeComponent(component);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1096,7 +1096,7 @@ public class GridLayout extends AbstractLayout implements
} else {
oldLocation.setComponent(newComponent);
newLocation.setComponent(oldComponent);
- requestRepaint();
+ markAsDirty();
}
}
@@ -1117,7 +1117,7 @@ public class GridLayout extends AbstractLayout implements
public void setComponentAlignment(Component childComponent,
Alignment alignment) {
componentToAlignment.put(childComponent, alignment);
- requestRepaint();
+ markAsDirty();
}
/*
@@ -1173,7 +1173,7 @@ public class GridLayout extends AbstractLayout implements
setRows(getRows() + 1);
structuralChange = true;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1232,7 +1232,7 @@ public class GridLayout extends AbstractLayout implements
}
structuralChange = true;
- requestRepaint();
+ markAsDirty();
}
@@ -1257,7 +1257,7 @@ public class GridLayout extends AbstractLayout implements
*/
public void setColumnExpandRatio(int columnIndex, float ratio) {
columnExpandRatio.put(columnIndex, ratio);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1295,7 +1295,7 @@ public class GridLayout extends AbstractLayout implements
*/
public void setRowExpandRatio(int rowIndex, float ratio) {
rowExpandRatio.put(rowIndex, ratio);
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/Label.java b/server/src/com/vaadin/ui/Label.java
index 5055c7e573..81a343e937 100644
--- a/server/src/com/vaadin/ui/Label.java
+++ b/server/src/com/vaadin/ui/Label.java
@@ -265,7 +265,7 @@ public class Label extends AbstractComponent implements Property<String>,
.isAssignableFrom(dataSource.getClass())) {
((Property.ValueChangeNotifier) dataSource).addListener(this);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -482,7 +482,7 @@ public class Label extends AbstractComponent implements Property<String>,
*/
public void setConverter(Converter<String, ?> converter) {
this.converter = (Converter<String, Object>) converter;
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/Link.java b/server/src/com/vaadin/ui/Link.java
index ae2934f878..f98a2b0d2d 100644
--- a/server/src/com/vaadin/ui/Link.java
+++ b/server/src/com/vaadin/ui/Link.java
@@ -188,7 +188,7 @@ public class Link extends AbstractComponent implements Vaadin6Component {
*/
public void setTargetBorder(BorderStyle targetBorder) {
this.targetBorder = targetBorder;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -199,7 +199,7 @@ public class Link extends AbstractComponent implements Vaadin6Component {
*/
public void setTargetHeight(int targetHeight) {
this.targetHeight = targetHeight;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -210,7 +210,7 @@ public class Link extends AbstractComponent implements Vaadin6Component {
*/
public void setTargetName(String targetName) {
this.targetName = targetName;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -221,7 +221,7 @@ public class Link extends AbstractComponent implements Vaadin6Component {
*/
public void setTargetWidth(int targetWidth) {
this.targetWidth = targetWidth;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -241,7 +241,7 @@ public class Link extends AbstractComponent implements Vaadin6Component {
*/
public void setResource(Resource resource) {
this.resource = resource;
- requestRepaint();
+ markAsDirty();
}
@Override
diff --git a/server/src/com/vaadin/ui/ListSelect.java b/server/src/com/vaadin/ui/ListSelect.java
index eb54183164..da78e24fa8 100644
--- a/server/src/com/vaadin/ui/ListSelect.java
+++ b/server/src/com/vaadin/ui/ListSelect.java
@@ -62,7 +62,7 @@ public class ListSelect extends AbstractSelect {
}
if (this.columns != columns) {
this.columns = columns;
- requestRepaint();
+ markAsDirty();
}
}
@@ -88,7 +88,7 @@ public class ListSelect extends AbstractSelect {
}
if (this.rows != rows) {
this.rows = rows;
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/MenuBar.java b/server/src/com/vaadin/ui/MenuBar.java
index 37728ee69b..51c06cf934 100644
--- a/server/src/com/vaadin/ui/MenuBar.java
+++ b/server/src/com/vaadin/ui/MenuBar.java
@@ -223,7 +223,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
}
MenuItem newItem = new MenuItem(caption, icon, command);
menuItems.add(newItem);
- requestRepaint();
+ markAsDirty();
return newItem;
@@ -259,7 +259,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
menuItems.add(newItem);
}
- requestRepaint();
+ markAsDirty();
return newItem;
}
@@ -283,7 +283,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
if (item != null) {
menuItems.remove(item);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -291,7 +291,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
*/
public void removeItems() {
menuItems.clear();
- requestRepaint();
+ markAsDirty();
}
/**
@@ -318,7 +318,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
} else {
moreItem = new MenuItem("", null, null);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -345,7 +345,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
public void setAutoOpen(boolean autoOpenTopLevelMenu) {
if (autoOpenTopLevelMenu != openRootOnHover) {
openRootOnHover = autoOpenTopLevelMenu;
- requestRepaint();
+ markAsDirty();
}
}
@@ -373,7 +373,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
*/
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
this.htmlContentAllowed = htmlContentAllowed;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -521,7 +521,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
newItem.setParent(this);
itsChildren.add(newItem);
- requestRepaint();
+ markAsDirty();
return newItem;
}
@@ -560,7 +560,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
newItem = addItem(caption, icon, command);
}
- requestRepaint();
+ markAsDirty();
return newItem;
}
@@ -651,7 +651,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
*/
public void setIcon(Resource icon) {
itsIcon = icon;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -664,7 +664,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
if (text != null) {
itsText = text;
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -679,7 +679,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
if (itsChildren.isEmpty()) {
itsChildren = null;
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -690,7 +690,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
if (itsChildren != null) {
itsChildren.clear();
itsChildren = null;
- requestRepaint();
+ markAsDirty();
}
}
@@ -706,7 +706,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
public void setEnabled(boolean enabled) {
this.enabled = enabled;
- requestRepaint();
+ markAsDirty();
}
public boolean isEnabled() {
@@ -715,7 +715,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
public void setVisible(boolean visible) {
this.visible = visible;
- requestRepaint();
+ markAsDirty();
}
public boolean isVisible() {
@@ -724,7 +724,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
private void setSeparator(boolean isSeparator) {
this.isSeparator = isSeparator;
- requestRepaint();
+ markAsDirty();
}
public boolean isSeparator() {
@@ -733,7 +733,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
public void setStyleName(String styleName) {
this.styleName = styleName;
- requestRepaint();
+ markAsDirty();
}
public String getStyleName() {
@@ -750,7 +750,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
*/
public void setDescription(String description) {
this.description = description;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -855,7 +855,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
"A menu item with children cannot be checkable");
}
this.checkable = checkable;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -897,7 +897,7 @@ public class MenuBar extends AbstractComponent implements Vaadin6Component {
*/
public void setChecked(boolean checked) {
this.checked = checked;
- requestRepaint();
+ markAsDirty();
}
}// class MenuItem
diff --git a/server/src/com/vaadin/ui/NativeSelect.java b/server/src/com/vaadin/ui/NativeSelect.java
index 53c225a256..c2969874b0 100644
--- a/server/src/com/vaadin/ui/NativeSelect.java
+++ b/server/src/com/vaadin/ui/NativeSelect.java
@@ -64,7 +64,7 @@ public class NativeSelect extends AbstractSelect {
}
if (this.columns != columns) {
this.columns = columns;
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/OptionGroup.java b/server/src/com/vaadin/ui/OptionGroup.java
index dfb5019331..12507442c9 100644
--- a/server/src/com/vaadin/ui/OptionGroup.java
+++ b/server/src/com/vaadin/ui/OptionGroup.java
@@ -125,14 +125,14 @@ public class OptionGroup extends AbstractSelect implements
Set<?> newValueSet = (Set<?>) newValue;
for (Object itemId : currentValueSet) {
if (!isItemEnabled(itemId) && !newValueSet.contains(itemId)) {
- requestRepaint();
+ markAsDirty();
return;
}
}
for (Object itemId : newValueSet) {
if (!isItemEnabled(itemId)
&& !currentValueSet.contains(itemId)) {
- requestRepaint();
+ markAsDirty();
return;
}
}
@@ -141,7 +141,7 @@ public class OptionGroup extends AbstractSelect implements
newValue = getNullSelectionItemId();
}
if (!isItemEnabled(newValue)) {
- requestRepaint();
+ markAsDirty();
return;
}
}
@@ -169,7 +169,7 @@ public class OptionGroup extends AbstractSelect implements
} else {
disabledItemIds.add(itemId);
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -200,7 +200,7 @@ public class OptionGroup extends AbstractSelect implements
*/
public void setHtmlContentAllowed(boolean htmlContentAllowed) {
this.htmlContentAllowed = htmlContentAllowed;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java
index 1f3b8580f8..00810b83db 100644
--- a/server/src/com/vaadin/ui/Panel.java
+++ b/server/src/com/vaadin/ui/Panel.java
@@ -176,7 +176,7 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
.addListener((ComponentContainer.ComponentDetachListener) this);
content = newContent;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/PopupDateField.java b/server/src/com/vaadin/ui/PopupDateField.java
index a4304faaf9..acff49a142 100644
--- a/server/src/com/vaadin/ui/PopupDateField.java
+++ b/server/src/com/vaadin/ui/PopupDateField.java
@@ -84,7 +84,7 @@ public class PopupDateField extends DateField {
*/
public void setInputPrompt(String inputPrompt) {
this.inputPrompt = inputPrompt;
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/PopupView.java b/server/src/com/vaadin/ui/PopupView.java
index 198ba00ed2..786257c240 100644
--- a/server/src/com/vaadin/ui/PopupView.java
+++ b/server/src/com/vaadin/ui/PopupView.java
@@ -147,7 +147,7 @@ public class PopupView extends AbstractComponentContainer implements
throw new IllegalArgumentException("Content must not be null");
}
content = newContent;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -179,7 +179,7 @@ public class PopupView extends AbstractComponentContainer implements
visibleComponent = null;
}
fireEvent(new PopupVisibilityEvent(this));
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/ProgressIndicator.java b/server/src/com/vaadin/ui/ProgressIndicator.java
index d3e292a3e1..528c404ab9 100644
--- a/server/src/com/vaadin/ui/ProgressIndicator.java
+++ b/server/src/com/vaadin/ui/ProgressIndicator.java
@@ -226,7 +226,7 @@ public class ProgressIndicator extends AbstractField<Number> implements
*/
public void setIndeterminate(boolean newValue) {
indeterminate = newValue;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -246,7 +246,7 @@ public class ProgressIndicator extends AbstractField<Number> implements
*/
public void setPollingInterval(int newValue) {
pollingInterval = newValue;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/RichTextArea.java b/server/src/com/vaadin/ui/RichTextArea.java
index e954f78700..51caa82136 100644
--- a/server/src/com/vaadin/ui/RichTextArea.java
+++ b/server/src/com/vaadin/ui/RichTextArea.java
@@ -157,7 +157,7 @@ public class RichTextArea extends AbstractField<String> implements
*/
selectAll = true;
focus();
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -183,7 +183,7 @@ public class RichTextArea extends AbstractField<String> implements
// If the modified status changes,
// repaint is needed after all.
if (wasModified != isModified()) {
- requestRepaint();
+ markAsDirty();
}
}
}
diff --git a/server/src/com/vaadin/ui/Root.java b/server/src/com/vaadin/ui/Root.java
index f96fa1dc5a..35517044c0 100644
--- a/server/src/com/vaadin/ui/Root.java
+++ b/server/src/com/vaadin/ui/Root.java
@@ -723,7 +723,7 @@ public abstract class Root extends AbstractComponentContainer implements
private void attachWindow(Window w) {
windows.add(w);
w.setParent(this);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -746,7 +746,7 @@ public abstract class Root extends AbstractComponentContainer implements
}
window.setParent(null);
window.fireClose();
- requestRepaint();
+ markAsDirty();
return true;
}
@@ -788,7 +788,7 @@ public abstract class Root extends AbstractComponentContainer implements
*/
public void setFocusedComponent(Focusable focusable) {
pendingFocus = focusable;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -808,7 +808,7 @@ public abstract class Root extends AbstractComponentContainer implements
"The component where to scroll must belong to this root.");
}
scrollIntoView = component;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1013,7 +1013,7 @@ public abstract class Root extends AbstractComponentContainer implements
*/
public void setResizeLazy(boolean resizeLazy) {
this.resizeLazy = resizeLazy;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/Select.java b/server/src/com/vaadin/ui/Select.java
index 898728b9cd..20345b55e0 100644
--- a/server/src/com/vaadin/ui/Select.java
+++ b/server/src/com/vaadin/ui/Select.java
@@ -676,15 +676,21 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering,
}
@Override
+ @Deprecated
public void requestRepaint() {
- super.requestRepaint();
+ markAsDirty();
+ }
+
+ @Override
+ public void markAsDirty() {
+ super.markAsDirty();
optionRequest = false;
prevfilterstring = filterstring;
filterstring = null;
}
private void optionRepaint() {
- super.requestRepaint();
+ super.markAsDirty();
}
@Override
diff --git a/server/src/com/vaadin/ui/Slider.java b/server/src/com/vaadin/ui/Slider.java
index f7672f617c..d4e2db4853 100644
--- a/server/src/com/vaadin/ui/Slider.java
+++ b/server/src/com/vaadin/ui/Slider.java
@@ -174,7 +174,7 @@ public class Slider extends AbstractField<Double> implements Vaadin6Component {
if (getValue() > max) {
setValue(max);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -198,7 +198,7 @@ public class Slider extends AbstractField<Double> implements Vaadin6Component {
if (getValue() < min) {
setValue(min);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -220,7 +220,7 @@ public class Slider extends AbstractField<Double> implements Vaadin6Component {
*/
public void setOrientation(int orientation) {
this.orientation = orientation;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -244,7 +244,7 @@ public class Slider extends AbstractField<Double> implements Vaadin6Component {
return;
}
this.resolution = resolution;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java
index 868d97a09c..82faedcc41 100644
--- a/server/src/com/vaadin/ui/TabSheet.java
+++ b/server/src/com/vaadin/ui/TabSheet.java
@@ -176,7 +176,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
fireSelectedTabChange();
}
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -301,7 +301,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
fireSelectedTabChange();
}
super.addComponent(c);
- requestRepaint();
+ markAsDirty();
return tab;
}
}
@@ -475,7 +475,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
*/
public void hideTabs(boolean tabsHidden) {
this.tabsHidden = tabsHidden;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -519,7 +519,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
setSelected(c);
updateSelection();
fireSelectedTabChange();
- requestRepaint();
+ markAsDirty();
}
}
@@ -537,13 +537,13 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
// "cached" update even though the client knows nothing about the
// connector
if (selected instanceof ComponentContainer) {
- ((ComponentContainer) selected).requestRepaintAll();
+ ((ComponentContainer) selected).markAsDirtyRecursive();
} else if (selected instanceof Table) {
// Workaround until there's a generic way of telling a component
// that there is no client side state to rely on. See #8642
((Table) selected).refreshRowCache();
} else if (selected != null) {
- selected.requestRepaint();
+ selected.markAsDirty();
}
}
@@ -716,7 +716,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
copyTabMetadata(oldTab, newTab);
copyTabMetadata(tmp, oldTab);
- requestRepaint();
+ markAsDirty();
}
}
@@ -1028,7 +1028,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
@Override
public void setCaption(String caption) {
this.caption = caption;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -1039,7 +1039,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
@Override
public void setIcon(Resource icon) {
this.icon = icon;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -1053,7 +1053,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
if (updateSelection()) {
fireSelectedTabChange();
}
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -1067,7 +1067,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
if (updateSelection()) {
fireSelectedTabChange();
}
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -1078,7 +1078,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
@Override
public void setClosable(boolean closable) {
this.closable = closable;
- requestRepaint();
+ markAsDirty();
}
public void close() {
@@ -1093,7 +1093,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
@Override
public void setDescription(String description) {
this.description = description;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -1104,7 +1104,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
@Override
public void setComponentError(ErrorMessage componentError) {
this.componentError = componentError;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -1120,7 +1120,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
@Override
public void setStyleName(String styleName) {
this.styleName = styleName;
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -1180,7 +1180,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
int oldPosition = getTabPosition(tab);
components.remove(oldPosition);
components.add(position, tab.getComponent());
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1207,7 +1207,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
@Override
public void setTabIndex(int tabIndex) {
this.tabIndex = tabIndex;
- requestRepaint();
+ markAsDirty();
}
@Override
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java
index 120d1f9810..8fc3fc2572 100644
--- a/server/src/com/vaadin/ui/Table.java
+++ b/server/src/com/vaadin/ui/Table.java
@@ -729,7 +729,7 @@ public class Table extends AbstractSelect implements Action.Container,
this.columnHeaders.put(it.next(), columnHeaders[i]);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -788,7 +788,7 @@ public class Table extends AbstractSelect implements Action.Container,
this.columnIcons.put(it.next(), columnIcons[i]);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -888,7 +888,7 @@ public class Table extends AbstractSelect implements Action.Container,
} else {
columnWidths.put(propertyId, Integer.valueOf(width));
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1026,7 +1026,7 @@ public class Table extends AbstractSelect implements Action.Container,
}
if (this.cacheRate != cacheRate) {
this.cacheRate = cacheRate;
- requestRepaint();
+ markAsDirty();
}
}
@@ -1158,7 +1158,7 @@ public class Table extends AbstractSelect implements Action.Container,
columnIcons.put(propertyId, icon);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1198,7 +1198,7 @@ public class Table extends AbstractSelect implements Action.Container,
columnHeaders.put(propertyId, header);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1361,7 +1361,7 @@ public class Table extends AbstractSelect implements Action.Container,
public void setColumnReorderingAllowed(boolean columnReorderingAllowed) {
if (columnReorderingAllowed != this.columnReorderingAllowed) {
this.columnReorderingAllowed = columnReorderingAllowed;
- requestRepaint();
+ markAsDirty();
}
}
@@ -1532,7 +1532,7 @@ public class Table extends AbstractSelect implements Action.Container,
public void setSelectable(boolean selectable) {
if (this.selectable != selectable) {
this.selectable = selectable;
- requestRepaint();
+ markAsDirty();
}
}
@@ -1558,7 +1558,7 @@ public class Table extends AbstractSelect implements Action.Container,
}
if (columnHeaderMode != this.columnHeaderMode) {
this.columnHeaderMode = columnHeaderMode;
- requestRepaint();
+ markAsDirty();
}
}
@@ -1627,7 +1627,7 @@ public class Table extends AbstractSelect implements Action.Container,
}
setRowCacheInvalidated(true);
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1636,17 +1636,39 @@ public class Table extends AbstractSelect implements Action.Container,
* Note that a {@code Table} does not necessarily repaint its contents when
* this method has been called. See {@link #refreshRowCache()} for forcing
* an update of the contents.
+ *
+ * @deprecated As of 7.0.0, use {@link #markAsDirty()} instead
*/
+ @Deprecated
@Override
public void requestRepaint() {
+ markAsDirty();
+ }
+
+ /**
+ * Requests that the Table should be repainted as soon as possible.
+ *
+ * Note that a {@code Table} does not necessarily repaint its contents when
+ * this method has been called. See {@link #refreshRowCache()} for forcing
+ * an update of the contents.
+ */
+
+ @Override
+ public void markAsDirty() {
// Overridden only for javadoc
- super.requestRepaint();
+ super.markAsDirty();
}
+ @Deprecated
@Override
public void requestRepaintAll() {
- super.requestRepaintAll();
+ markAsDirtyRecursive();
+ }
+
+ @Override
+ public void markAsDirtyRecursive() {
+ super.markAsDirtyRecursive();
// Avoid sending a partial repaint (#8714)
refreshRowCache();
@@ -2436,7 +2458,7 @@ public class Table extends AbstractSelect implements Action.Container,
if (!isNullSelectionAllowed()
&& (id == null || id == getNullSelectionItemId())) {
// skip empty selection if nullselection is not allowed
- requestRepaint();
+ markAsDirty();
} else if (id != null && containsId(id)) {
newValue.add(id);
renderedButNotSelectedItemIds.remove(id);
@@ -2463,7 +2485,7 @@ public class Table extends AbstractSelect implements Action.Container,
if (!isNullSelectionAllowed() && newValue.isEmpty()) {
// empty selection not allowed, keep old value
- requestRepaint();
+ markAsDirty();
return;
}
@@ -2802,7 +2824,7 @@ public class Table extends AbstractSelect implements Action.Container,
if (refreshContent) {
refreshRenderedCells();
// Ensure that client gets a response
- requestRepaint();
+ markAsDirty();
}
}
@@ -3751,7 +3773,7 @@ public class Table extends AbstractSelect implements Action.Container,
refreshRowCache();
containerChangeToBeRendered = true;
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -4476,7 +4498,7 @@ public class Table extends AbstractSelect implements Action.Container,
public void setSortEnabled(boolean sortEnabled) {
if (this.sortEnabled != sortEnabled) {
this.sortEnabled = sortEnabled;
- requestRepaint();
+ markAsDirty();
}
}
@@ -4573,7 +4595,7 @@ public class Table extends AbstractSelect implements Action.Container,
// some ancestor still disabled, don't update children
return;
} else {
- requestRepaintAll();
+ markAsDirtyRecursive();
}
}
@@ -4585,7 +4607,7 @@ public class Table extends AbstractSelect implements Action.Container,
*/
public void setDragMode(TableDragMode newDragMode) {
dragMode = newDragMode;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -4669,7 +4691,7 @@ public class Table extends AbstractSelect implements Action.Container,
*/
public void setMultiSelectMode(MultiSelectMode mode) {
multiSelectMode = mode;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -4977,7 +4999,7 @@ public class Table extends AbstractSelect implements Action.Container,
columnFooters.put(propertyId, footer);
}
- requestRepaint();
+ markAsDirty();
}
/**
@@ -4993,7 +5015,7 @@ public class Table extends AbstractSelect implements Action.Container,
public void setFooterVisible(boolean visible) {
if (visible != columnFootersVisible) {
columnFootersVisible = visible;
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java
index dda0a78aff..2d6673a67d 100644
--- a/server/src/com/vaadin/ui/Tree.java
+++ b/server/src/com/vaadin/ui/Tree.java
@@ -184,7 +184,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
*/
public boolean expandItem(Object itemId) {
boolean success = expandItem(itemId, true);
- requestRepaint();
+ markAsDirty();
return success;
}
@@ -215,7 +215,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
expandedItemId = itemId;
if (initialPaint) {
- requestRepaint();
+ markAsDirty();
} else if (sendChildTree) {
requestPartialRepaint();
}
@@ -225,13 +225,13 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
}
@Override
- public void requestRepaint() {
- super.requestRepaint();
+ public void markAsDirty() {
+ super.markAsDirty();
partialUpdate = false;
}
private void requestPartialRepaint() {
- super.requestRepaint();
+ super.markAsDirty();
partialUpdate = true;
}
@@ -262,7 +262,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
todo.addAll(getChildren(id));
}
}
- requestRepaint();
+ markAsDirty();
return result;
}
@@ -282,7 +282,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
// Collapse
expanded.remove(itemId);
- requestRepaint();
+ markAsDirty();
fireCollapseEvent(itemId);
return true;
@@ -349,7 +349,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
public void setSelectable(boolean selectable) {
if (this.selectable != selectable) {
this.selectable = selectable;
- requestRepaint();
+ markAsDirty();
}
}
@@ -362,7 +362,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
public void setMultiselectMode(MultiSelectMode mode) {
if (multiSelectMode != mode && mode != null) {
multiSelectMode = mode;
- requestRepaint();
+ markAsDirty();
}
}
@@ -478,7 +478,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
if (!isNullSelectionAllowed()
&& (id == null || id == getNullSelectionItemId())) {
// skip empty selection if nullselection is not allowed
- requestRepaint();
+ markAsDirty();
} else if (id != null && containsId(id)) {
s.add(id);
}
@@ -486,7 +486,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
if (!isNullSelectionAllowed() && s.size() < 1) {
// empty selection not allowed, keep old value
- requestRepaint();
+ markAsDirty();
return;
}
@@ -796,7 +796,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
final boolean success = ((Container.Hierarchical) items)
.setChildrenAllowed(itemId, areChildrenAllowed);
if (success) {
- requestRepaint();
+ markAsDirty();
}
return success;
}
@@ -812,7 +812,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
final boolean success = ((Container.Hierarchical) items).setParent(
itemId, newParentId);
if (success) {
- requestRepaint();
+ markAsDirty();
}
return success;
}
@@ -1036,7 +1036,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
if (!actionHandlers.contains(actionHandler)) {
actionHandlers.add(actionHandler);
- requestRepaint();
+ markAsDirty();
}
}
}
@@ -1058,7 +1058,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
actionMapper = null;
}
- requestRepaint();
+ markAsDirty();
}
}
@@ -1068,7 +1068,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
public void removeAllActionHandlers() {
actionHandlers = null;
actionMapper = null;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1182,7 +1182,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
public void setItemStyleGenerator(ItemStyleGenerator itemStyleGenerator) {
if (this.itemStyleGenerator != itemStyleGenerator) {
this.itemStyleGenerator = itemStyleGenerator;
- requestRepaint();
+ markAsDirty();
}
}
@@ -1342,7 +1342,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
*/
public void setDragMode(TreeDragMode dragMode) {
this.dragMode = dragMode;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -1601,7 +1601,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
public void setItemDescriptionGenerator(ItemDescriptionGenerator generator) {
if (generator != itemDescriptionGenerator) {
itemDescriptionGenerator = generator;
- requestRepaint();
+ markAsDirty();
}
}
diff --git a/server/src/com/vaadin/ui/TreeTable.java b/server/src/com/vaadin/ui/TreeTable.java
index 7548a4840b..05757a6d09 100644
--- a/server/src/com/vaadin/ui/TreeTable.java
+++ b/server/src/com/vaadin/ui/TreeTable.java
@@ -463,7 +463,7 @@ public class TreeTable extends Table implements Hierarchical {
// been processed
clearFocusedRowPending = true;
}
- requestRepaint();
+ markAsDirty();
}
@Override
@@ -561,7 +561,7 @@ public class TreeTable extends Table implements Hierarchical {
}
if (containerSupportsPartialUpdates && !forceFullRefresh) {
- requestRepaint();
+ markAsDirty();
} else {
// For containers that do not send item set change events, always do
// full repaint instead of partial row update.
@@ -826,7 +826,7 @@ public class TreeTable extends Table implements Hierarchical {
*/
public void setAnimationsEnabled(boolean animationsEnabled) {
this.animationsEnabled = animationsEnabled;
- requestRepaint();
+ markAsDirty();
}
private static final Logger getLogger() {
diff --git a/server/src/com/vaadin/ui/TwinColSelect.java b/server/src/com/vaadin/ui/TwinColSelect.java
index 80f4ae49c8..891e695a5f 100644
--- a/server/src/com/vaadin/ui/TwinColSelect.java
+++ b/server/src/com/vaadin/ui/TwinColSelect.java
@@ -79,7 +79,7 @@ public class TwinColSelect extends AbstractSelect {
}
if (this.columns != columns) {
this.columns = columns;
- requestRepaint();
+ markAsDirty();
}
}
@@ -111,7 +111,7 @@ public class TwinColSelect extends AbstractSelect {
}
if (this.rows != rows) {
this.rows = rows;
- requestRepaint();
+ markAsDirty();
}
}
@@ -159,7 +159,7 @@ public class TwinColSelect extends AbstractSelect {
*/
public void setRightColumnCaption(String rightColumnCaption) {
this.rightColumnCaption = rightColumnCaption;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -179,7 +179,7 @@ public class TwinColSelect extends AbstractSelect {
*/
public void setLeftColumnCaption(String leftColumnCaption) {
this.leftColumnCaption = leftColumnCaption;
- requestRepaint();
+ markAsDirty();
}
/**
diff --git a/server/src/com/vaadin/ui/Upload.java b/server/src/com/vaadin/ui/Upload.java
index b50ba03835..619db07eea 100644
--- a/server/src/com/vaadin/ui/Upload.java
+++ b/server/src/com/vaadin/ui/Upload.java
@@ -138,7 +138,7 @@ public class Upload extends AbstractComponent implements Component.Focusable,
int id = (Integer) variables.get("pollForStart");
if (!isUploading && id == nextid) {
notStarted = true;
- requestRepaint();
+ markAsDirty();
} else {
}
}
@@ -829,7 +829,7 @@ public class Upload extends AbstractComponent implements Component.Focusable,
isUploading = false;
contentLength = -1;
interrupted = false;
- requestRepaint();
+ markAsDirty();
}
public boolean isUploading() {
@@ -901,7 +901,7 @@ public class Upload extends AbstractComponent implements Component.Focusable,
*/
public void setButtonCaption(String buttonCaption) {
this.buttonCaption = buttonCaption;
- requestRepaint();
+ markAsDirty();
}
/**
@@ -922,14 +922,14 @@ public class Upload extends AbstractComponent implements Component.Focusable,
* fired.
*/
public void submitUpload() {
- requestRepaint();
+ markAsDirty();
forceSubmit = true;
}
@Override
- public void requestRepaint() {
+ public void markAsDirty() {
forceSubmit = false;
- super.requestRepaint();
+ super.markAsDirty();
}
/*
@@ -982,7 +982,7 @@ public class Upload extends AbstractComponent implements Component.Focusable,
fireUploadSuccess(event.getFileName(), event.getMimeType(),
event.getContentLength());
endUpload();
- requestRepaint();
+ markAsDirty();
}
@Override
diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java
index 902d33bc64..d79588cc63 100644
--- a/server/src/com/vaadin/ui/Window.java
+++ b/server/src/com/vaadin/ui/Window.java
@@ -493,7 +493,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
}
}
bringToFront = Integer.valueOf(maxBringToFront + 1);
- requestRepaint();
+ markAsDirty();
}
/**