Groovy Documentation

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

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

public class CheckBoxIcon
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
CheckBoxIcon(JCheckBox checkBox, Icon customIcon)

Creates a CheckBoxIcon for a JCheckBox with the horizontal and vertical positioning derived from the horizontal and vertical positions of the check box's text relative to its icon.

CheckBoxIcon(JCheckBox checkBox, Icon customIcon, int horizontalPosition, int verticalPosition)

Creates a CheckBoxIcon for a JCheckBox 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

CheckBoxIcon

public CheckBoxIcon(JCheckBox checkBox, Icon customIcon)
Creates a CheckBoxIcon for a JCheckBox with the horizontal and vertical positioning derived from the horizontal and vertical positions of the check box's text relative to its icon.
Parameters:
checkBox - the check box
customIcon - the icon


CheckBoxIcon

public CheckBoxIcon(JCheckBox checkBox, Icon customIcon, int horizontalPosition, int verticalPosition)
Creates a CheckBoxIcon for a JCheckBox with the specified horizontal and vertical positioning.
Parameters:
checkBox - the check box
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 check box'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