void () { int borderStyle; if (myAnchor == ToolWindowAnchor.LEFT) { borderStyle = SideBorder.RIGHT; } else if (myAnchor == ToolWindowAnchor.RIGHT) { borderStyle = SideBorder.LEFT; } else if (myAnchor == ToolWindowAnchor.BOTTOM) { borderStyle = SideBorder.TOP; } else { return; } setBorder(IdeBorderFactory.createBorder(borderStyle)); myMinimizeComponent.setBorder(IdeBorderFactory.createBorder(borderStyle)); }