Public Member Functions | |
IconButton (ImageIcon normalIcon) | |
Constructs an IconButton with the given normal icon, which must be an ImageIcon. | |
IconButton (ImageIcon normalIcon, Icon pressedIcon) | |
Constructs an IconButton with the given normal icon, which must be an ImageIcon, and pressed icon. | |
IconButton (ImageIcon normalIcon, Icon mouseoverIcon, Icon pressedIcon) | |
Constructs a IconButton with the given normal, mouseover, and pressed icons. | |
IconButton (ImageIcon normalIcon, Icon mouseoverIcon, Icon pressedIcon, Action a) | |
Constructs a IconButton with the given normal, mouseover, and pressed icons and the given Action. | |
Dimension | getPreferredSize () |
Returns the preferred size of this button. | |
Private Member Functions | |
void | setup () |
Sets up the visual appearance of the button. | |
Private Attributes | |
ImageIcon | normalIcon |
The icon to use for this button in its normal state. | |
Icon | pressedIcon |
The icon to use for this button in its pressed state. | |
Icon | mouseoverIcon |
The icon to use for this button in its mouseover state. |
edu.cmu.hcii.calo.view.IconButton.IconButton | ( | ImageIcon | normalIcon | ) |
Constructs an IconButton with the given normal icon, which must be an ImageIcon.
Mouseover and pressed states are generated automatically.
normalIcon | the normal icon |
edu.cmu.hcii.calo.view.IconButton.IconButton | ( | ImageIcon | normalIcon, | |
Icon | pressedIcon | |||
) |
Constructs an IconButton with the given normal icon, which must be an ImageIcon, and pressed icon.
The mouseover state is generated automatically.
normalIcon | the normal icon | |
pressedIcon | the pressed icon | |
pressedIcon |
edu.cmu.hcii.calo.view.IconButton.IconButton | ( | ImageIcon | normalIcon, | |
Icon | mouseoverIcon, | |||
Icon | pressedIcon | |||
) |
Constructs a IconButton with the given normal, mouseover, and pressed icons.
normalIcon | the normal icon | |
mouseoverIcon | the mouseover icon | |
pressedIcon | the pressed icon |
edu.cmu.hcii.calo.view.IconButton.IconButton | ( | ImageIcon | normalIcon, | |
Icon | mouseoverIcon, | |||
Icon | pressedIcon, | |||
Action | a | |||
) |
Constructs a IconButton with the given normal, mouseover, and pressed icons and the given Action.
normalIcon | the normal icon | |
mouseoverIcon | the mouseover icon | |
pressedIcon | the pressed icon | |
a | the Action to set |
Dimension edu.cmu.hcii.calo.view.IconButton.getPreferredSize | ( | ) |
Returns the preferred size of this button.
It is always the size of the icon, unless its preferred size has been explicitly set, in which case that value is returned instead.
void edu.cmu.hcii.calo.view.IconButton.setup | ( | ) | [private] |
Sets up the visual appearance of the button.
ImageIcon edu.cmu.hcii.calo.view.IconButton.normalIcon [private] |
The icon to use for this button in its normal state.
Icon edu.cmu.hcii.calo.view.IconButton.pressedIcon [private] |
The icon to use for this button in its pressed state.
Icon edu.cmu.hcii.calo.view.IconButton.mouseoverIcon [private] |
The icon to use for this button in its mouseover state.