pos = getOffsetWidth();
}
position = pos / getOffsetWidth() * 100 + "%";
+ } else {
+ position = newX + "px";
}
setSplitPosition(newX + "px");
pos = getOffsetHeight();
}
position = pos / getOffsetHeight() * 100 + "%";
+ } else {
+ position = newY + "px";
}
setSplitPosition(newY + "px");
setSplitPosition(pos, unit, true);
}
+ /**
+ * Returns the current position of the splitter, in
+ * {@link #getSplitPositionUnit()} units.
+ *
+ * @return position of the splitter
+ */
+ public int getSplitPosition() {
+ return pos;
+ }
+
+ /**
+ * Returns the unit of position of the splitter
+ *
+ * @return unit of position of the splitter
+ */
+ public int getSplitPositionUnit() {
+ return posUnit;
+ }
+
/**
* Moves the position of the splitter.
*