summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/Table.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/com/vaadin/ui/Table.java')
-rw-r--r--server/src/com/vaadin/ui/Table.java66
1 files changed, 44 insertions, 22 deletions
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();
}
}