edu.cmu.hcii.calo.view.IconButton Class Reference

List of all members.

Detailed Description

A simple transparency-aware push button that uses icons for its normal, mouseover, and pressed states.

Author:
Brian Ellis


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.


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
normalIcon the normal icon
mouseoverIcon the mouseover icon
pressedIcon the pressed icon
a the Action to set


Member Function Documentation

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.


Member Data Documentation

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.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:22 2007 for CALO by  doxygen 1.5.2