@Test public void testReparentDraggedShape() { when(state.getOriginalParent()).thenReturn(Optional.of(mock(WiresContainer.class))); final CaseManagementShapeView ghostParent = mock(CaseManagementShapeView.class); when(ghost.getParent()).thenReturn(ghostParent); when(ghostParent.getIndex(eq(ghost))).thenReturn(1); control.execute(); verify(containmentControl, times(1)).execute(); verify(ghost, atLeast(1)).removeFromParent(); verify(ghostParent, times(1)).addShape(eq(shape), eq(1)); }
private void reparentDraggedShape(final CaseManagementShapeView ghost, final WiresContainer originalParent) { if (!(originalParent instanceof CaseManagementShapeView)) { restoreGhostParent(ghost); } containmentControl.execute(); }
CaseManagementContainmentControl implements WiresContainmentControl { private void reparentDraggedShape(final CaseManagementShapeView ghost, final WiresContainer originalParent) { if (!(originalParent instanceof CaseManagementShapeView)) { restoreGhostParent(ghost); } containmentControl.execute(); } }
CaseManagementContainmentControl implements WiresContainmentControl { private void reparentDraggedShape(final CaseManagementShapeView ghost, final WiresContainer originalParent) { if (!(originalParent instanceof CaseManagementShapeView)) { restoreGhostParent(ghost); } containmentControl.execute(); } CaseManagementContainmentControl(final WiresParentPickerControl parentPickerControl,
                                            final CaseManagementContainmentStateHolder state);   CaseManagementContainmentControl(final WiresContainmentControlImpl containmentControl,
                                     final CaseManagementContainmentStateHolder state); }
CaseManagementContainmentControl implements WiresContainmentControl { private void reparentDraggedShape(final CaseManagementShapeView ghost, final WiresContainer originalParent) { if (!(originalParent instanceof CaseManagementShapeView)) { restoreGhostParent(ghost); } containmentControl.execute(); } CaseManagementContainmentControl(final WiresParentPickerControl parentPickerControl,
                                            final CaseManagementContainmentStateHolder state);   CaseManagementContainmentControl(final WiresContainmentControlImpl containmentControl,
                                     final CaseManagementContainmentStateHolder state); @Override WiresContainmentControl setEnabled(boolean enabled); @Override void onMoveStart(double x, double y); @Override boolean onMove(double dx,
                          double dy); @Override void onMoveComplete(); @Override boolean isAllow(); @Override boolean accept(); @Override Point2D getCandidateLocation(); @Override Point2D getAdjust(); @Override void execute(); @Override void clear(); @Override void reset(); @Override void destroy(); }
CaseManagementContainmentControl implements WiresContainmentControl { private void reparentDraggedShape(final CaseManagementShapeView ghost, final WiresContainer originalParent) { if (!(originalParent instanceof CaseManagementShapeView)) { restoreGhostParent(ghost); } containmentControl.execute(); } CaseManagementContainmentControl(final WiresParentPickerControl parentPickerControl,
                                            final CaseManagementContainmentStateHolder state);   CaseManagementContainmentControl(final WiresContainmentControlImpl containmentControl,
                                     final CaseManagementContainmentStateHolder state); @Override WiresContainmentControl setEnabled(boolean enabled); @Override void onMoveStart(double x, double y); @Override boolean onMove(double dx,
                          double dy); @Override void onMoveComplete(); @Override boolean isAllow(); @Override boolean accept(); @Override Point2D getCandidateLocation(); @Override Point2D getAdjust(); @Override void execute(); @Override void clear(); @Override void reset(); @Override void destroy();  }