@Test public void testGetStyledHeight() { for (ImageStyle style : styles) { switch (style.getScalingMode()) { case Box: int[] expectedBoxValues = { 300, 225, 150, 300, 300, 200, 300, 300, 200 }; testGetStyledHeight(style, expectedBoxValues); break; case Fill: int[] expectedFillValues = { 300, 300, 300, 300, 300, 300, 300, 300, 300 }; testGetStyledHeight(style, expectedFillValues); break; case Cover: int[] expectedCoverValues = { 300, 300, 300, 400, 300, 300, 600, 450, 300 }; testGetStyledHeight(style, expectedCoverValues); break; case Width: int[] expectedWidthValues = { 300, 225, 150, 300, 300, 200, 300, 300, 300 }; testGetStyledHeight(style, expectedWidthValues); break; case Height: int[] expectedHeightValues = { 300, 300, 300, 300, 300, 300, 300, 300, 300 }; testGetStyledHeight(style, expectedHeightValues); break; case None: int[] expectedNoneValues = { 400, 300, 200, 400, 300, 200, 400, 300, 200 }; testGetStyledHeight(style, expectedNoneValues); break; default: fail("Unknown scaling mode " + style.getScalingMode()); } } }
public static int getStyledHeight(ImageContent image, ImageStyle style) { return getStyledHeight(image.getWidth(), image.getHeight(), style); }
ImageStyleUtils { public static int getStyledHeight(ImageContent image, ImageStyle style) { return getStyledHeight(image.getWidth(), image.getHeight(), style); } }
ImageStyleUtils { public static int getStyledHeight(ImageContent image, ImageStyle style) { return getStyledHeight(image.getWidth(), image.getHeight(), style); } private  ImageStyleUtils(); }
ImageStyleUtils { public static int getStyledHeight(ImageContent image, ImageStyle style) { return getStyledHeight(image.getWidth(), image.getHeight(), style); } private  ImageStyleUtils(); static int getStyledWidth(ImageContent image, ImageStyle style); static int getStyledHeight(ImageContent image, ImageStyle style); static float getScale(float imageWidth, float imageHeight,
      ImageStyle style); static int getCropX(int imageWidth, int imageHeight, ImageStyle style); static int getCropY(int imageWidth, int imageHeight, ImageStyle style); static int getStyledWidth(int imageWidth, int imageHeight,
      ImageStyle style); static int getStyledHeight(int imageWidth, int imageHeight,
      ImageStyle style); static ImageStyle findStyle(String styleId, Site site); static ImageStyle[] findStyles(String regex, boolean composeableOnly,
      Site site); static File createScaledFile(Resource<?> resource, Language language,
      ImageStyle style); static File createScaledFile(Resource<?> resource, String filename,
      Language language, ImageStyle style); static File getScaledFile(Resource<?> resource, Language language,
      ImageStyle style); static File getUnscaledFile(Resource<?> resource, Language language); static File getScaledFile(Resource<?> resource, String filename,
      Language language, ImageStyle style); static File getUnscaledFile(Resource<?> resource, String filename,
      Language language); static File getDirectory(Site site); static File getDirectory(Site site, ImageStyle style); }
ImageStyleUtils { public static int getStyledHeight(ImageContent image, ImageStyle style) { return getStyledHeight(image.getWidth(), image.getHeight(), style); } private  ImageStyleUtils(); static int getStyledWidth(ImageContent image, ImageStyle style); static int getStyledHeight(ImageContent image, ImageStyle style); static float getScale(float imageWidth, float imageHeight,
      ImageStyle style); static int getCropX(int imageWidth, int imageHeight, ImageStyle style); static int getCropY(int imageWidth, int imageHeight, ImageStyle style); static int getStyledWidth(int imageWidth, int imageHeight,
      ImageStyle style); static int getStyledHeight(int imageWidth, int imageHeight,
      ImageStyle style); static ImageStyle findStyle(String styleId, Site site); static ImageStyle[] findStyles(String regex, boolean composeableOnly,
      Site site); static File createScaledFile(Resource<?> resource, Language language,
      ImageStyle style); static File createScaledFile(Resource<?> resource, String filename,
      Language language, ImageStyle style); static File getScaledFile(Resource<?> resource, Language language,
      ImageStyle style); static File getUnscaledFile(Resource<?> resource, Language language); static File getScaledFile(Resource<?> resource, String filename,
      Language language, ImageStyle style); static File getUnscaledFile(Resource<?> resource, String filename,
      Language language); static File getDirectory(Site site); static File getDirectory(Site site, ImageStyle style); static final String DEFAULT_PREVIEW_FORMAT; }