Search in sources :

Example 11 with GridInsertLocation

use of com.intellij.uiDesigner.designSurface.GridInsertLocation in project intellij-community by JetBrains.

the class GridInsertLocationTest method testGrowComponent.

public void testGrowComponent() {
    myContainer.setLayout(new GridLayoutManager(2, 2));
    //  *|.       *** .
    //
    //  ***   ->  *****
    insertComponent(0, 0, 1, 1);
    RadComponent c = insertComponent(1, 0, 1, 2);
    GridInsertLocation location = new GridInsertLocation(myContainer, 0, 0, GridInsertMode.ColumnAfter);
    DraggedComponentList dcl = DraggedComponentList.withComponents(myDropComponent);
    assertTrue(location.canDrop(dcl));
    doDrop(location);
    assertEquals(3, myManager.getGridColumnCount(myContainer));
    assertEquals(3, c.getConstraints().getColSpan());
}
Also used : GridInsertLocation(com.intellij.uiDesigner.designSurface.GridInsertLocation) GridLayoutManager(com.intellij.uiDesigner.core.GridLayoutManager) DraggedComponentList(com.intellij.uiDesigner.designSurface.DraggedComponentList)

Aggregations

GridInsertLocation (com.intellij.uiDesigner.designSurface.GridInsertLocation)11 DraggedComponentList (com.intellij.uiDesigner.designSurface.DraggedComponentList)10 GridLayoutManager (com.intellij.uiDesigner.core.GridLayoutManager)2