private int origMouseY;
- private boolean locked;
+ private boolean locked = false;
private String splitterStyleName;
return;
}
- locked = uidl.hasAttribute("locked");
- if (locked) {
- DOM.setElementProperty(splitter, "className", splitterStyleName
- + "-locked");
- } else {
- DOM.setElementProperty(splitter, "className", splitterStyleName);
- }
+ setLocked(uidl.getBooleanAttribute("locked"));
setSplitPosition(uidl.getStringAttribute("position"));
}
+ private void setLocked(boolean newValue) {
+ if (locked != newValue) {
+ locked = newValue;
+ if (locked) {
+ DOM.setElementProperty(splitter, "className", splitterStyleName
+ + "-locked");
+ } else {
+ DOM
+ .setElementProperty(splitter, "className",
+ splitterStyleName);
+ }
+ splitterSize = -1;
+ }
+ }
+
private void setSplitPosition(String pos) {
if (orientation == ORIENTATION_HORIZONTAL) {
DOM.setStyleAttribute(splitter, "left", pos);
}
}
- private static int splitterSize = -1;
+ private int splitterSize = -1;
private int getSplitterSize() {
if (splitterSize < 0) {