if (bar != null) {
collapseBar.getElement().getStyle().setDisplay(Display.NONE);
}
Direction d = Direction.RIGHT;
AnchorAlignment align = new AnchorAlignment(Anchor.TOP_LEFT, Anchor.TOP_RIGHT);
switch (region) {
case EAST:
d = Direction.LEFT;
align = new AnchorAlignment(Anchor.TOP_RIGHT, Anchor.TOP_LEFT);
break;
case SOUTH:
align = new AnchorAlignment(Anchor.BOTTOM_LEFT, Anchor.TOP_LEFT);
d = Direction.UP;
break;
case NORTH:
d = Direction.DOWN;
align = new AnchorAlignment(Anchor.TOP_LEFT, Anchor.BOTTOM_LEFT);
break;
}
panel.getElement().alignTo(getElement(), align, null);
if (animate && !disableAnimations) {