ComponentDropLocation (final Direction direction) { final RadContainer parent = myContainer.getParent(); if (parent.getLayoutManager().isGrid()) { final GridConstraints c = myContainer.getConstraints(); return switch (direction) { case LEFT -> new GridInsertLocation(parent, c.getRow(), c.getColumn(), GridInsertMode.ColumnBefore); case RIGHT -> new GridInsertLocation(parent, c.getRow(), c.getColumn() + c.getColSpan() - 1, GridInsertMode.ColumnAfter); case UP -> new GridInsertLocation(parent, c.getRow(), c.getColumn(), GridInsertMode.RowBefore); case DOWN -> new GridInsertLocation(parent, c.getRow() + c.getRowSpan() - 1, c.getColumn(), GridInsertMode.RowAfter); }; } return null; }