|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.ui.ImageListIcon
An ImageListIcon provides a convenient mechanism for loading a single icon among many of the same size (all of an identical height and width) which are arranged as one horizontal strip in the composite "list" image.
Constructor Summary | |
ImageListIcon(java.awt.Image image,
int iconSize,
int index)
Creates an ImageListIcon whose contents are derived from the specified image using the specified icon size and the offset within the strip of icons. |
Method Summary | |
int |
getIconHeight()
Override to return height from size given in constructor. |
int |
getIconWidth()
Override to return width from size given in constructor. |
java.awt.Image |
getImage()
Returns Image passed on constructor. |
int |
getIndex()
Returns index passed on constructor. |
int |
getOffset()
Returns offset calculated from index and width of each icon. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Override to paint the defined icon. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ImageListIcon(java.awt.Image image, int iconSize, int index)
image
- The underlying image which is a horizontal strip of icons.iconSize
- The size in pixels which is the width and height of each icon.index
- The zero-based index of the desired icon.Method Detail |
public java.awt.Image getImage()
public int getIndex()
public int getOffset()
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
c
- Component to paint.g
- Graphics object to paint with.x
- Left coordinate.y
- Top coordinate.public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |