if (anchor == ToolWindowAnchor.BOTTOM || anchor == ToolWindowAnchor.TOP) {
anchorLabel = new AnchorLabel(toolAnchorLabelText, toolWindow.getIcon(), JLabel.CENTER);
anchorLabel.setName("toolWindow.rb." + toolWindow.getId());
} else {
TextIcon textIcon = new TextIcon(container, toolAnchorLabelText, anchor == ToolWindowAnchor.LEFT ? TextIcon.ROTATE_LEFT : TextIcon.ROTATE_RIGHT);
CompositeIcon compositeIcon = new CompositeIcon(textIcon, toolWindow.getIcon(),
(anchor == ToolWindowAnchor.LEFT) ? SwingConstants.TOP
: SwingConstants.BOTTOM);
anchorLabel = new AnchorLabel(compositeIcon, JLabel.CENTER);
anchorLabel.setName("toolWindow.rb." + toolWindow.getId());