Package gov.nih.mipav.view
Class ColorIcon
java.lang.Object
gov.nih.mipav.model.structures.ModelSerialCloneable
gov.nih.mipav.view.ColorIcon
- All Implemented Interfaces:
Serializable,Cloneable,Icon
This is an icon which is a block of color with bounds specified in the constructor. It is from Graphic Java
Mastering the JFC Volume II: Swing, by David Geary, published by Sun Microsystems Press 1999, page 1085.
- Version:
- 0.1 Aug 1, 1999
- Author:
- David Geary
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColor()getColor - gets the color of the icon.intgetIconHeight - gets the height of the icon.intgetIconWidth - gets the width of the icon.voidpaintIcon - paints the icon with a balck border.voidsetColor - sets the color of the icon.voidsetIconHeight(int h) setIconHeight - sets the height of the icon.voidsetIconWidth(int w) setIconWidth - sets the width of the icon.Methods inherited from class gov.nih.mipav.model.structures.ModelSerialCloneable
clone, nativeClone
-
Field Details
-
TRANSPARENT
-
FOREGROUND
-
color
DOCUMENT ME! -
w
private int wDOCUMENT ME! -
h
private int hDOCUMENT ME!
-
-
Constructor Details
-
ColorIcon
public ColorIcon()Constructor Makes a color icon with the default color of gray and default width and height values of 50 and 15, respectively. -
ColorIcon
Constructor Makes a color icon with the specified color, width, and height.- Parameters:
color- color to set the icon tow- width to set the icon toh- height to set the icon to
-
-
Method Details
-
getColor
getColor - gets the color of the icon.- Returns:
- color of the icon
-
getIconHeight
public int getIconHeight()getIconHeight - gets the height of the icon.- Specified by:
getIconHeightin interfaceIcon- Returns:
- height of the icon
-
getIconWidth
public int getIconWidth()getIconWidth - gets the width of the icon.- Specified by:
getIconWidthin interfaceIcon- Returns:
- width of the icon
-
paintIcon
paintIcon - paints the icon with a balck border. -
setColor
setColor - sets the color of the icon.- Parameters:
color- color of the icon
-
setIconHeight
public void setIconHeight(int h) setIconHeight - sets the height of the icon.- Parameters:
h- height of the icon
-
setIconWidth
public void setIconWidth(int w) setIconWidth - sets the width of the icon.- Parameters:
w- width of the icon
-