private WindowCornerPosition getSelectorWindowPosition(EditorCategory category, EditorSelectorWindow window) {
Component source = getCategoryComponent(category);
int horizontalShift = -((window.getSize().width - source.getWidth()) / 2);
int verticalGap = 2;
RectangleCorner corner;
Point location;
if (southPosition) {
corner = RectangleCorner.LOWER_LEFT;
location = new Point(horizontalShift, -verticalGap);
} else {