Class CheckBoxUI
java.lang.Object
cmpt213.assignment4.packagedeliveries.client.view.util.customUI.CheckBoxUI
- All Implemented Interfaces:
Icon
Custom CheckBox UI that a JComboBox will use.
Makes the empty Box a rounded gray and the filled box a green box with a white check mark.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintSets icon's new height.intSets icon's new width.voidPaints icon correctly to screen.
-
Constructor Details
-
CheckBoxUI
public CheckBoxUI()
-
-
Method Details
-
paintIcon
Paints icon correctly to screen. -
getIconWidth
public int getIconWidth()Sets icon's new width. Change return value to resize icon. Used in updateSizes()- Specified by:
getIconWidthin interfaceIcon- Returns:
- An integer that represents the preferred width of the icon.
-
getIconHeight
public int getIconHeight()Sets icon's new height. Change return value to resize icon. Used in updateSizes()- Specified by:
getIconHeightin interfaceIcon- Returns:
- An integer that represents the preferred height of the icon.
-