aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/CustomField.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-03-20 14:43:24 +0200
committerArtur Signell <artur@vaadin.com>2012-03-21 15:28:05 +0200
commitbd4f8df793edef2dffdf3365e859979e5a86280d (patch)
tree49d2df4296aaae6bcb365d663b11d57ce2bcb238 /src/com/vaadin/ui/CustomField.java
parent068c74b31b4120d32267c5380d78d826aff0ca23 (diff)
downloadvaadin-framework-bd4f8df793edef2dffdf3365e859979e5a86280d.tar.gz
vaadin-framework-bd4f8df793edef2dffdf3365e859979e5a86280d.zip
Added requestRepaintall helper to AbstractComponentContainer and use the
same helper and logic in all component containers including Form, Table and CustomField
Diffstat (limited to 'src/com/vaadin/ui/CustomField.java')
-rw-r--r--src/com/vaadin/ui/CustomField.java20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/com/vaadin/ui/CustomField.java b/src/com/vaadin/ui/CustomField.java
index a462cccfb4..685092904a 100644
--- a/src/com/vaadin/ui/CustomField.java
+++ b/src/com/vaadin/ui/CustomField.java
@@ -121,18 +121,6 @@ public abstract class CustomField<T> extends AbstractField<T> implements
*/
protected abstract Component initContent();
- private void requestContentRepaint() {
- if (getParent() == null) {
- // skip repaint - not yet attached
- return;
- }
- if (getContent() instanceof ComponentContainer) {
- ((ComponentContainer) getContent()).requestRepaintAll();
- } else {
- getContent().requestRepaint();
- }
- }
-
// Size related methods
// TODO might not be necessary to override but following the pattern from
// AbstractComponentContainer
@@ -140,13 +128,13 @@ public abstract class CustomField<T> extends AbstractField<T> implements
@Override
public void setHeight(float height, Unit unit) {
super.setHeight(height, unit);
- requestContentRepaint();
+ requestRepaintAll();
}
@Override
public void setWidth(float height, Unit unit) {
super.setWidth(height, unit);
- requestContentRepaint();
+ requestRepaintAll();
}
// ComponentContainer methods
@@ -182,9 +170,7 @@ public abstract class CustomField<T> extends AbstractField<T> implements
}
public void requestRepaintAll() {
- requestRepaint();
-
- requestContentRepaint();
+ AbstractComponentContainer.requestRepaintAll(this);
}
/**