/** * Retrieves arrow icon. * * @param width * Arrow width. * @param height * Arrow height. * @param strokeWidth * Stroke width. * @param direction * Arrow direction. * @param scheme * Color scheme for the arrow. * @return Arrow image. * @see SwingConstants#NORTH * @see SwingConstants#WEST * @see SwingConstants#SOUTH * @see SwingConstants#EAST */ public static Icon getArrowIcon(float width, float height, float strokeWidth, int direction, SubstanceColorScheme scheme) { return new ImageIcon(getArrow(width, height, strokeWidth, direction, scheme)); }
/** * Retrieves arrow icon. * * @param width * Arrow width. * @param height * Arrow height. * @param strokeWidth * Stroke width. * @param direction * Arrow direction. * @param scheme * Color scheme for the arrow. * @return Arrow image. * @see SwingConstants#NORTH * @see SwingConstants#WEST * @see SwingConstants#SOUTH * @see SwingConstants#EAST */ public static Icon getArrowIcon(float width, float height, float strokeWidth, int direction, SubstanceColorScheme scheme) { return new ImageIcon(getArrow(width, height, strokeWidth, direction, scheme)); }
(int) width, (int) height); BufferedImage singleArrow = getArrow(width, Math.max(1, height - delta), strokeWidth, SwingConstants.SOUTH, colorScheme);
/** * Returns arrow icon for the specified parameters. * * @param fontSize * Font size. * @param direction * Arrow direction. * @param colorScheme * Arrow icon color scheme. * @return Arrow icon. */ public static Icon getArrowIcon(int fontSize, int direction, SubstanceColorScheme colorScheme) { float width = SubstanceSizeUtils.getArrowIconWidth(fontSize); float height = SubstanceSizeUtils.getArrowIconHeight(fontSize); if (direction == SwingConstants.CENTER) height *= 2; float strokeWidth = SubstanceSizeUtils.getArrowStrokeWidth(fontSize); return new ImageIcon(getArrow(width, height, strokeWidth, direction, colorScheme)); }
/** * Returns arrow icon for the specified parameters. * * @param fontSize * Font size. * @param direction * Arrow direction. * @param colorScheme * Arrow icon color scheme. * @return Arrow icon. */ public static Icon getArrowIcon(int fontSize, int direction, SubstanceColorScheme colorScheme) { float width = SubstanceSizeUtils.getArrowIconWidth(fontSize); float height = SubstanceSizeUtils.getArrowIconHeight(fontSize); if (direction == SwingConstants.CENTER) height *= 2; float strokeWidth = SubstanceSizeUtils.getArrowStrokeWidth(fontSize); return new ImageIcon(getArrow(width, height, strokeWidth, direction, colorScheme)); }
(int) width, (int) height); BufferedImage singleArrow = getArrow(width, Math.max(1, height - delta), strokeWidth, SwingConstants.SOUTH, colorScheme);