diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-12-21 08:44:10 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-12-21 08:44:10 +0000 |
commit | 92b9df06809545a342f684fe76a50a5792356fe4 (patch) | |
tree | c14d6a8d58e787a430278f5d8044fd650c840801 | |
parent | 50524941f6739dffc3047ddffce1ee96b6bee3a1 (diff) | |
download | vaadin-framework-92b9df06809545a342f684fe76a50a5792356fe4.tar.gz vaadin-framework-92b9df06809545a342f684fe76a50a5792356fe4.zip |
#6041 The splitter in a disabled split panel can be moved
svn changeset:16591/svn branch:6.5
-rw-r--r-- | WebContent/VAADIN/themes/base/splitpanel/splitpanel.css | 6 | ||||
-rw-r--r-- | WebContent/VAADIN/themes/base/styles.css | 10 | ||||
-rw-r--r-- | WebContent/VAADIN/themes/liferay/styles.css | 10 | ||||
-rw-r--r-- | WebContent/VAADIN/themes/reindeer/styles.css | 10 | ||||
-rw-r--r-- | WebContent/VAADIN/themes/runo/styles.css | 10 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java | 16 |
6 files changed, 52 insertions, 10 deletions
diff --git a/WebContent/VAADIN/themes/base/splitpanel/splitpanel.css b/WebContent/VAADIN/themes/base/splitpanel/splitpanel.css index fd92984abb..80a2133b23 100644 --- a/WebContent/VAADIN/themes/base/splitpanel/splitpanel.css +++ b/WebContent/VAADIN/themes/base/splitpanel/splitpanel.css @@ -16,6 +16,9 @@ cursor: e-resize; cursor: col-resize; } +.v-disabled .v-splitpanel-hsplitter div { + cursor: default; +} .v-splitpanel-vsplitter { height: 6px; font-size: 1px; /* for IE6 */ @@ -27,6 +30,9 @@ cursor: s-resize; cursor: row-resize; } +.v-disabled .v-splitpanel-vsplitter div { + cursor: default; +} /* IE specific styles */ .v-ie6 .v-splitpanel-hsplitter div { height: 99%; diff --git a/WebContent/VAADIN/themes/base/styles.css b/WebContent/VAADIN/themes/base/styles.css index b1a60ab137..c870724233 100644 --- a/WebContent/VAADIN/themes/base/styles.css +++ b/WebContent/VAADIN/themes/base/styles.css @@ -1,5 +1,5 @@ -.v-theme-version:after {content:"6_5_0_dev-20101216";} -.v-theme-version-6_5_0_dev-20101216 {display: none;} +.v-theme-version:after {content:"6_5_0_dev-20101221";} +.v-theme-version-6_5_0_dev-20101221 {display: none;} /* Automatically compiled css file from subdirectories. */ .v-absolutelayout-wrapper { @@ -1422,6 +1422,9 @@ div.v-progressindicator-indeterminate-disabled { cursor: e-resize; cursor: col-resize; } +.v-disabled .v-splitpanel-hsplitter div { + cursor: default; +} .v-splitpanel-vsplitter { height: 6px; font-size: 1px; /* for IE6 */ @@ -1433,6 +1436,9 @@ div.v-progressindicator-indeterminate-disabled { cursor: s-resize; cursor: row-resize; } +.v-disabled .v-splitpanel-vsplitter div { + cursor: default; +} /* IE specific styles */ .v-ie6 .v-splitpanel-hsplitter div { height: 99%; diff --git a/WebContent/VAADIN/themes/liferay/styles.css b/WebContent/VAADIN/themes/liferay/styles.css index 01300df646..6beec279c0 100644 --- a/WebContent/VAADIN/themes/liferay/styles.css +++ b/WebContent/VAADIN/themes/liferay/styles.css @@ -1,5 +1,5 @@ -.v-theme-version:after {content:"6_5_0_dev-20101216";} -.v-theme-version-6_5_0_dev-20101216 {display: none;} +.v-theme-version:after {content:"6_5_0_dev-20101221";} +.v-theme-version-6_5_0_dev-20101221 {display: none;} /* Automatically compiled css file from subdirectories. */ .v-absolutelayout-wrapper { @@ -1422,6 +1422,9 @@ div.v-progressindicator-indeterminate-disabled { cursor: e-resize; cursor: col-resize; } +.v-disabled .v-splitpanel-hsplitter div { + cursor: default; +} .v-splitpanel-vsplitter { height: 6px; font-size: 1px; /* for IE6 */ @@ -1433,6 +1436,9 @@ div.v-progressindicator-indeterminate-disabled { cursor: s-resize; cursor: row-resize; } +.v-disabled .v-splitpanel-vsplitter div { + cursor: default; +} /* IE specific styles */ .v-ie6 .v-splitpanel-hsplitter div { height: 99%; diff --git a/WebContent/VAADIN/themes/reindeer/styles.css b/WebContent/VAADIN/themes/reindeer/styles.css index b8b90f9fa0..8407d0a8ec 100644 --- a/WebContent/VAADIN/themes/reindeer/styles.css +++ b/WebContent/VAADIN/themes/reindeer/styles.css @@ -1,5 +1,5 @@ -.v-theme-version:after {content:"6_5_0_dev-20101216";} -.v-theme-version-6_5_0_dev-20101216 {display: none;} +.v-theme-version:after {content:"6_5_0_dev-20101221";} +.v-theme-version-6_5_0_dev-20101221 {display: none;} /* Automatically compiled css file from subdirectories. */ .v-absolutelayout-wrapper { @@ -1422,6 +1422,9 @@ div.v-progressindicator-indeterminate-disabled { cursor: e-resize; cursor: col-resize; } +.v-disabled .v-splitpanel-hsplitter div { + cursor: default; +} .v-splitpanel-vsplitter { height: 6px; font-size: 1px; /* for IE6 */ @@ -1433,6 +1436,9 @@ div.v-progressindicator-indeterminate-disabled { cursor: s-resize; cursor: row-resize; } +.v-disabled .v-splitpanel-vsplitter div { + cursor: default; +} /* IE specific styles */ .v-ie6 .v-splitpanel-hsplitter div { height: 99%; diff --git a/WebContent/VAADIN/themes/runo/styles.css b/WebContent/VAADIN/themes/runo/styles.css index 289ee91b9b..b9580f9248 100644 --- a/WebContent/VAADIN/themes/runo/styles.css +++ b/WebContent/VAADIN/themes/runo/styles.css @@ -1,5 +1,5 @@ -.v-theme-version:after {content:"6_5_0_dev-20101216";} -.v-theme-version-6_5_0_dev-20101216 {display: none;} +.v-theme-version:after {content:"6_5_0_dev-20101221";} +.v-theme-version-6_5_0_dev-20101221 {display: none;} /* Automatically compiled css file from subdirectories. */ .v-absolutelayout-wrapper { @@ -1422,6 +1422,9 @@ div.v-progressindicator-indeterminate-disabled { cursor: e-resize; cursor: col-resize; } +.v-disabled .v-splitpanel-hsplitter div { + cursor: default; +} .v-splitpanel-vsplitter { height: 6px; font-size: 1px; /* for IE6 */ @@ -1433,6 +1436,9 @@ div.v-progressindicator-indeterminate-disabled { cursor: s-resize; cursor: row-resize; } +.v-disabled .v-splitpanel-vsplitter div { + cursor: default; +} /* IE specific styles */ .v-ie6 .v-splitpanel-hsplitter div { height: 99%; diff --git a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java index 33c13f6742..a9ab63aa77 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VSplitPanel.java @@ -29,6 +29,9 @@ import com.vaadin.terminal.gwt.client.Util; public class VSplitPanel extends ComplexPanel implements Container, ContainerResizedListener { + + private boolean enabled = false; + public static final String CLASSNAME = "v-splitpanel"; public static final String SPLITTER_CLICK_EVENT_IDENTIFIER = "sp_click"; @@ -207,6 +210,7 @@ public class VSplitPanel extends ComplexPanel implements Container, rendering = false; return; } + setEnabled(!uidl.getBooleanAttribute("disabled")); clickEventHandler.handleEventHandlerRegistration(client); if (uidl.hasAttribute("style")) { @@ -459,7 +463,7 @@ public class VSplitPanel extends ComplexPanel implements Container, } public void onMouseDown(Event event) { - if (locked) { + if (locked || !isEnabled()) { return; } final Element trg = DOM.eventGetTarget(event); @@ -548,7 +552,7 @@ public class VSplitPanel extends ComplexPanel implements Container, pos = getOffsetHeight(); } // Reversed position - if(positionReversed){ + if (positionReversed) { pos = getOffsetHeight() - pos - getSplitterSize(); } position = pos / getOffsetHeight() * 100 + "%"; @@ -763,4 +767,12 @@ public class VSplitPanel extends ComplexPanel implements Container, DOM.setElementProperty(firstContainer, "className", firstStyle); DOM.setElementProperty(secondContainer, "className", secondStyle); } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + public boolean isEnabled() { + return enabled; + } } |