projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add ancestor to refresh.
[lgpl/argeo-commons.git]
/
org.argeo.cms.ui
/
src
/
org
/
argeo
/
cms
/
ui
/
widgets
/
StyledControl.java
diff --git
a/org.argeo.cms.ui/src/org/argeo/cms/ui/widgets/StyledControl.java
b/org.argeo.cms.ui/src/org/argeo/cms/ui/widgets/StyledControl.java
index 5dde1f63708e161a26428521d8749924341f52e1..b413faf3e59352c439ea32d69db3ac830ed44cb0 100644
(file)
--- a/
org.argeo.cms.ui/src/org/argeo/cms/ui/widgets/StyledControl.java
+++ b/
org.argeo.cms.ui/src/org/argeo/cms/ui/widgets/StyledControl.java
@@
-24,6
+24,8
@@
public abstract class StyledControl extends JcrComposite implements CmsConstants
private Boolean editing = Boolean.FALSE;
private Boolean editing = Boolean.FALSE;
+ private Composite ancestorToLayout;
+
public StyledControl(Composite parent, int swtStyle) {
super(parent, swtStyle);
setLayout(CmsUiUtils.noSpaceGridLayout());
public StyledControl(Composite parent, int swtStyle) {
super(parent, swtStyle);
setLayout(CmsUiUtils.noSpaceGridLayout());
@@
-81,11
+83,14
@@
public abstract class StyledControl extends JcrComposite implements CmsConstants
clear(false);
refreshControl(style);
}
clear(false);
refreshControl(style);
}
-
+
protected void refreshControl(String style) {
control = createControl(box, style);
setControlLayoutData(control);
protected void refreshControl(String style) {
control = createControl(box, style);
setControlLayoutData(control);
- getParent().layout(true, true);
+ if (ancestorToLayout != null)
+ ancestorToLayout.layout(true, true);
+ else
+ getParent().layout(true, true);
}
public void setStyle(String style) {
}
public void setStyle(String style) {
@@
-140,4
+145,9
@@
public abstract class StyledControl extends JcrComposite implements CmsConstants
if (control != null && this.focusListener != null)
control.addFocusListener(focusListener);
}
if (control != null && this.focusListener != null)
control.addFocusListener(focusListener);
}
+
+ public void setAncestorToLayout(Composite ancestorToLayout) {
+ this.ancestorToLayout = ancestorToLayout;
+ }
+
}
}