Insets i2 = getComponentInsets();
switch (selectedButton.getZone()) {
case DockingConstants.INT_HIDE_TOP:
new ComponentAnimator(this,
new Rectangle(i.left,
i.top,
bounds.width - i.left - i.right, 0),
new Rectangle(i.left,
i.top,
bounds.width - i.left - i.right,
bestDimension.height + i2.top + i2.bottom),
AutoHidePolicy.getPolicy().getExpansionDuration() / 1000f,
animationControler);
break;
case DockingConstants.INT_HIDE_BOTTOM:
new ComponentAnimator(this,
new Rectangle(i.left,
bounds.height - i.bottom,
bounds.width - i.left - i.right, 0),
new Rectangle(i.left,
bounds.height - bestDimension.height - i.bottom - i2.top - i2.bottom,
bounds.width - i.left - i.right,
bestDimension.height + i2.top + i2.bottom),
AutoHidePolicy.getPolicy().getExpansionDuration() / 1000f,
animationControler);
break;
case DockingConstants.INT_HIDE_LEFT:
new ComponentAnimator(this,
new Rectangle(i.left,
i.top,
0, bounds.height - i.top - i.bottom),
new Rectangle(i.left,
i.top,
bestDimension.width + i2.left + i2.right,
bounds.height - i.top - i.bottom),
AutoHidePolicy.getPolicy().getExpansionDuration() / 1000f,
animationControler);
break;
case DockingConstants.INT_HIDE_RIGHT:
new ComponentAnimator(this,
new Rectangle(bounds.width - i.right,
i.top,
0, bounds.height - i.top - i.bottom),
new Rectangle(bounds.width - bestDimension.width - i.right - i2.left - i2.right,
i.top,