if (anchor == ToolWindowAnchor.BOTTOM || anchor == ToolWindowAnchor.TOP) {
anchorLabel = new AnchorLabel(toolAnchorLabelName, toolWindow.getIcon(), JLabel.CENTER);
} else {
TextIcon textIcon = new TextIcon(container, toolAnchorLabelName, anchor == ToolWindowAnchor.LEFT ? TextIcon.ROTATE_LEFT : TextIcon.ROTATE_RIGHT);
CompositeIcon compositeIcon = new CompositeIcon(textIcon, toolWindow.getIcon());
anchorLabel = new AnchorLabel(compositeIcon, JLabel.CENTER);
}
anchorLabel.setName(toolAnchorLabelName);
anchorLabel.setUI(createLabelUI());