package com.vaadin.terminal.gwt.client.ui.splitpanel;
+import java.util.Collections;
import java.util.List;
import com.google.gwt.dom.client.Node;
private boolean positionReversed = false;
- List<String> componentStyleNames;
+ List<String> componentStyleNames = Collections.emptyList();
private Element draggingCurtain;
return enabled;
}
+ /**
+ * Ensures the panels are still scrollable eg. after style sheet changes
+ */
+ void ensureScrollable() {
+ touchScrollHandler.setElements(firstContainer, secondContainer);
+ }
+
}
// TODO use Unit in AbstractSplitPanelState and remove these
private Unit posUnit;
- private Unit posMinUnit = Unit.PERCENTAGE;
- private Unit posMaxUnit = Unit.PERCENTAGE;
+ private Unit posMinUnit;
+ private Unit posMaxUnit;
private AbstractSplitPanelRpc rpc = new AbstractSplitPanelRpc() {
public AbstractSplitPanel() {
registerRpc(rpc);
setSplitPosition(50, Unit.PERCENTAGE, false);
+ setSplitPositionLimits(0, Unit.PERCENTAGE, 100, Unit.PERCENTAGE);
}
/**
SplitterState state = getSplitterState();
state.setMinPosition(minPos);
- state.setMinPositionUnit("" + minPosUnit);
+ state.setMinPositionUnit(minPosUnit.getSymbol());
posMinUnit = minPosUnit;
state.setMaxPosition(maxPos);
- state.setMaxPositionUnit("" + maxPosUnit);
+ state.setMaxPositionUnit(maxPosUnit.getSymbol());
posMaxUnit = maxPosUnit;
requestRepaint();