|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.ImageIcon
org.openbp.common.icon.MultiImageIcon
public class MultiImageIcon
IconImage that supports multiple sizes at once.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.ImageIcon |
|---|
javax.swing.ImageIcon.AccessibleImageIcon |
| Field Summary |
|---|
| Fields inherited from class javax.swing.ImageIcon |
|---|
component, tracker |
| Fields inherited from interface org.openbp.common.icon.FlexibleSize |
|---|
HUGE, LARGE, MEDIUM, SMALL, STANDARD, UNDETERMINED |
| Constructor Summary | |
|---|---|
MultiImageIcon(javax.swing.ImageIcon source)
Creates a new multi image icon that is built around a single ImageIcon. |
|
MultiImageIcon(MultiImageIcon src)
Copy constructor. |
|
MultiImageIcon(java.lang.String resourceName,
ResourceMgr resMgr)
Creates a new multi image icon from a given filename. |
|
| Method Summary | |
|---|---|
javax.swing.Icon |
getIcon(int size)
Returns an icon with the given size. |
int |
getIconHeight()
|
int |
getIconSize()
Gets the current icon size. |
int |
getIconWidth()
|
java.awt.Image |
getImage()
Returns an image representation of this icon in the currently active size. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
void |
setIconSize(int size)
Sets the current icon size. |
| Methods inherited from class javax.swing.ImageIcon |
|---|
getAccessibleContext, getDescription, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImage, setImageObserver, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MultiImageIcon(MultiImageIcon src)
src - The source iconpublic MultiImageIcon(javax.swing.ImageIcon source)
source - The icon
public MultiImageIcon(java.lang.String resourceName,
ResourceMgr resMgr)
resourceName - Name of the icon resource (without the size suffix, but including the icon file type)resMgr - Resource manager to use for resource access or null for the default resource manager| Method Detail |
|---|
public int getIconSize()
FlexibleSize
getIconSize in interface FlexibleSizeFlexibleSize.STANDARD/FlexibleSize.SMALL/
FlexibleSize.MEDIUM/FlexibleSize.LARGE/FlexibleSize.HUGE)public void setIconSize(int size)
FlexibleSize
setIconSize in interface FlexibleSizesize - The icon size descriptor (FlexibleSize.STANDARD/FlexibleSize.SMALL/
FlexibleSize.MEDIUM/FlexibleSize.LARGE/FlexibleSize.HUGE)public javax.swing.Icon getIcon(int size)
getIcon in interface MultiIconsize - Size of the desired icon or null for default
public java.awt.Image getImage()
MultiIcon
getImage in interface MultiIcongetImage in class javax.swing.ImageIconpublic int getIconHeight()
getIconHeight in interface javax.swing.IcongetIconHeight in class javax.swing.ImageIconIcon.getIconHeight()public int getIconWidth()
getIconWidth in interface javax.swing.IcongetIconWidth in class javax.swing.ImageIconIcon.getIconWidth()
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.IconpaintIcon in class javax.swing.ImageIconIcon.paintIcon(Component, Graphics, int, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||