mirror of
https://github.com/vaadin/framework.git
synced 2024-07-28 08:18:00 +02:00
#6041 The splitter in a disabled split panel can be moved
svn changeset:16591/svn branch:6.5
This commit is contained in:
parent
50524941f6
commit
92b9df0680
@ -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%;
|
||||
|
@ -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%;
|
||||
|
@ -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%;
|
||||
|
@ -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%;
|
||||
|
@ -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%;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user