int diffY = y - startBounds.y;
int diffX = x - startBounds.x;
resizeWidget.enableEvents(true);
SplitBarEvent be = new SplitBarEvent(this);
switch (region) {
case NORTH: {
be.setSize(height - diffY);
if (isAutoSize()) {
resizeEl.setY(y).setHeight(height);
}
break;
}
case SOUTH: {
be.setSize(height + diffY);
if (isAutoSize()) {
resizeWidget.setHeight(diffY);
}
break;
}
case WEST: {
be.setSize(width - diffX);
if (isAutoSize()) {
el().setX(x);
resizeWidget.setWidth(width - diffX);
}
break;
}
case EAST: {
be.setSize(width + diffX);
if (isAutoSize()) {
resizeWidget.setWidth(diffX);
}
break;
}