Insets (@NotNull Component c) { Stripe stripe = (Stripe)c; ToolWindowAnchor anchor = stripe.getAnchor(); if (anchor == ToolWindowAnchor.LEFT) { return new Insets(1, 0, 0, 1); } else if (anchor == ToolWindowAnchor.RIGHT) { return new Insets(1, 1, 0, 0); } else if (anchor == ToolWindowAnchor.TOP) { return new Insets(1, 0, 0, 0); } else { return new Insets(1, 0, 0, 0); } }