/** * Creates an {@code IconBorder} with the specified constraints. If * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead. * If {@code padding} is negative, then the border does not use padding. * * @param validIcon * the icon to set. This may be {@code null} to represent an * empty icon. * @param iconPosition * the position to place the icon relative to the component * contents. This must be one of the following * {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @param padding * the padding to surround the icon with. All non-positive values * set the padding to 0. * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. * @see #EMPTY_ICON */ public IconBorder(Icon validIcon, int iconPosition, int padding) { setIcon(validIcon); setPadding(padding); setIconPosition(iconPosition); }
/** * Creates an {@code IconBorder} with the specified constraints. If * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead. * If {@code padding} is negative, then the border does not use padding. * * @param validIcon * the icon to set. This may be {@code null} to represent an * empty icon. * @param iconPosition * the position to place the icon relative to the component * contents. This must be one of the following * {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @param padding * the padding to surround the icon with. All non-positive values * set the padding to 0. * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. * @see #EMPTY_ICON */ public IconBorder(Icon validIcon, int iconPosition, int padding) { setIcon(validIcon); setPadding(padding); setIconPosition(iconPosition); }
/** * Creates an {@code IconBorder} with the specified constraints. If * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead. * If {@code padding} is negative, then the border does not use padding. * * @param validIcon * the icon to set. This may be {@code null} to represent an * empty icon. * @param iconPosition * the position to place the icon relative to the component * contents. This must be one of the following * {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @param padding * the padding to surround the icon with. All non-positive values * set the padding to 0. * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. * @see #EMPTY_ICON */ public IconBorder(Icon validIcon, int iconPosition, int padding) { setIcon(validIcon); setPadding(padding); setIconPosition(iconPosition); }
/** * Creates an {@code IconBorder} with the specified constraints. If * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead. * If {@code padding} is negative, then the border does not use padding. * * @param validIcon * the icon to set. This may be {@code null} to represent an * empty icon. * @param iconPosition * the position to place the icon relative to the component * contents. This must be one of the following * {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @param padding * the padding to surround the icon with. All non-positive values * set the padding to 0. * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. * @see #EMPTY_ICON */ public IconBorder(Icon validIcon, int iconPosition, int padding) { setIcon(validIcon); setPadding(padding); setIconPosition(iconPosition); }
/** * Creates an {@code IconBorder} with the specified constraints. If * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead. * If {@code padding} is negative, then the border does not use padding. * * @param validIcon * the icon to set. This may be {@code null} to represent an * empty icon. * @param iconPosition * the position to place the icon relative to the component * contents. This must be one of the following * {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @param padding * the padding to surround the icon with. All non-positive values * set the padding to 0. * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. * @see #EMPTY_ICON */ public IconBorder(Icon validIcon, int iconPosition, int padding) { setIcon(validIcon); setPadding(padding); setIconPosition(iconPosition); }