@Test(expected = IllegalArgumentException.class) public void testSetParametersThrowsIllegalArgumentExceptionWithInvalidParameterCount() { SubImageAreaProvider areaProvider = new SubImageAreaProvider(); areaProvider.setParameters("1,2"); }
@Override public void setParameters(String parameters) { String[] args = getArguments(parameters); int x = Integer.valueOf(args[0]); int y = Integer.valueOf(args[1]); int width = Integer.valueOf(args[2]); int height = Integer.valueOf(args[3]); m_subImageArea = new Box(x, y, width, height); }
SubImageAreaProvider implements AreaProvider { @Override public void setParameters(String parameters) { String[] args = getArguments(parameters); int x = Integer.valueOf(args[0]); int y = Integer.valueOf(args[1]); int width = Integer.valueOf(args[2]); int height = Integer.valueOf(args[3]); m_subImageArea = new Box(x, y, width, height); } }
SubImageAreaProvider implements AreaProvider { @Override public void setParameters(String parameters) { String[] args = getArguments(parameters); int x = Integer.valueOf(args[0]); int y = Integer.valueOf(args[1]); int width = Integer.valueOf(args[2]); int height = Integer.valueOf(args[3]); m_subImageArea = new Box(x, y, width, height); }  }
SubImageAreaProvider implements AreaProvider { @Override public void setParameters(String parameters) { String[] args = getArguments(parameters); int x = Integer.valueOf(args[0]); int y = Integer.valueOf(args[1]); int width = Integer.valueOf(args[2]); int height = Integer.valueOf(args[3]); m_subImageArea = new Box(x, y, width, height); }  @Override void setParameters(String parameters); @Override Box getSourceArea(@Nonnull RenderImage renderImage); @Nonnull @Override Size getNativeSize(@Nonnull NiftyImage image); }
SubImageAreaProvider implements AreaProvider { @Override public void setParameters(String parameters) { String[] args = getArguments(parameters); int x = Integer.valueOf(args[0]); int y = Integer.valueOf(args[1]); int width = Integer.valueOf(args[2]); int height = Integer.valueOf(args[3]); m_subImageArea = new Box(x, y, width, height); }  @Override void setParameters(String parameters); @Override Box getSourceArea(@Nonnull RenderImage renderImage); @Nonnull @Override Size getNativeSize(@Nonnull NiftyImage image);  }