Groovy Documentation

com.wordpress.tipsforjava.swing
[Java] Class RadioButtonIcon

java.lang.Object
  com.wordpress.tipsforjava.swing.DualIcon
      com.wordpress.tipsforjava.swing.ToggleButtonIcon
          com.wordpress.tipsforjava.swing.RadioButtonIcon

public class RadioButtonIcon
extends ToggleButtonIcon

Authors:
Rob Camick
Darryl Burke


Field Summary
 
Fields inherited from class DualIcon
height, icon1, icon1HOffset, icon1VOffset, icon2, icon2HOffset, icon2VOffset, iconIconGap, width
 
Constructor Summary
RadioButtonIcon(JRadioButton radioButton, Icon customIcon)

Creates a RadioButtonIcon for a JRadioButton with the horizontal and vertical positioning derived from the horizontal and vertical positions of the radio button's text relative to its icon.

RadioButtonIcon(JRadioButton radioButton, Icon customIcon, int horizontalPosition, int verticalPosition)

Creates a RadioButtonIcon for a JRadioButton with the specified horizontal and vertical positioning.

 
Method Summary
 
Methods inherited from class ToggleButtonIcon
getHorizontalPosition, getHorizontalPosition
 
Methods inherited from class DualIcon
checkHorizontalKey, checkVerticalKey, getIconHeight, getIconWidth, paintIcon
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

RadioButtonIcon

public RadioButtonIcon(JRadioButton radioButton, Icon customIcon)
Creates a RadioButtonIcon for a JRadioButton with the horizontal and vertical positioning derived from the horizontal and vertical positions of the radio button's text relative to its icon.
Parameters:
radioButton - the radio button
customIcon - the icon


RadioButtonIcon

public RadioButtonIcon(JRadioButton radioButton, Icon customIcon, int horizontalPosition, int verticalPosition)
Creates a RadioButtonIcon for a JRadioButton with the specified horizontal and vertical positioning.
Parameters:
radioButton - the radio button
customIcon - the icon
horizontalPosition - the horizontal position of the custom icon relative to the default icon. One of the following values:
  • SwingConstants.RIGHT
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING
LEADING and TRAILING will be interpreted in the context of the radio button's ComponentOrientation.

verticalPosition - the vertical position of the custom icon relative to the default icon One of the following values:
  • SwingConstants.CENTER
  • SwingConstants.TOP
  • SwingConstants.BOTTOM


 

Groovy Documentation