@Test public void testAccept() { control.accept(); verify(containmentAcceptor, never()).containmentAllowed(any(WiresContainer.class), any(WiresShape[].class)); verify(containmentAcceptor, times(1)).acceptContainment(eq(parent), eq(new WiresShape[]{shape})); }
@Override public boolean accept() { if (null == getParent() || getParent() instanceof WiresLayer) { return false; } if (!(state.getOriginalParent().isPresent() || state.getOriginalIndex().isPresent())) { return false; } return getWiresManager() .getContainmentAcceptor() .acceptContainment(getParent(), new WiresShape[]{getShape()}); }
CaseManagementContainmentControl implements WiresContainmentControl { @Override public boolean accept() { if (null == getParent() || getParent() instanceof WiresLayer) { return false; } if (!(state.getOriginalParent().isPresent() || state.getOriginalIndex().isPresent())) { return false; } return getWiresManager() .getContainmentAcceptor() .acceptContainment(getParent(), new WiresShape[]{getShape()}); } }
CaseManagementContainmentControl implements WiresContainmentControl { @Override public boolean accept() { if (null == getParent() || getParent() instanceof WiresLayer) { return false; } if (!(state.getOriginalParent().isPresent() || state.getOriginalIndex().isPresent())) { return false; } return getWiresManager() .getContainmentAcceptor() .acceptContainment(getParent(), new WiresShape[]{getShape()}); } CaseManagementContainmentControl(final WiresParentPickerControl parentPickerControl,
                                            final CaseManagementContainmentStateHolder state);   CaseManagementContainmentControl(final WiresContainmentControlImpl containmentControl,
                                     final CaseManagementContainmentStateHolder state); }
CaseManagementContainmentControl implements WiresContainmentControl { @Override public boolean accept() { if (null == getParent() || getParent() instanceof WiresLayer) { return false; } if (!(state.getOriginalParent().isPresent() || state.getOriginalIndex().isPresent())) { return false; } return getWiresManager() .getContainmentAcceptor() .acceptContainment(getParent(), new WiresShape[]{getShape()}); } 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 { @Override public boolean accept() { if (null == getParent() || getParent() instanceof WiresLayer) { return false; } if (!(state.getOriginalParent().isPresent() || state.getOriginalIndex().isPresent())) { return false; } return getWiresManager() .getContainmentAcceptor() .acceptContainment(getParent(), new WiresShape[]{getShape()}); } 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();  }