|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.ImageIcon
com.tensegrity.gui.swing.icon.Icon
ImageIcon extension. This allows copying of icons. Constructing an Icon with an URL is forbidden.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.ImageIcon |
javax.swing.ImageIcon.AccessibleImageIcon |
| Field Summary | |
static Icon |
EMPTYICON_16x15
An Empty icon with color. |
| Fields inherited from class javax.swing.ImageIcon |
component, tracker |
| Constructor Summary | |
Icon(java.awt.Image image)
Creates a new icon based on the given Image parameter. |
|
Icon(java.awt.Image image,
boolean useFilteredImage)
Creates a new Icon based on the given Image parameter. |
|
Icon(int width,
int height)
Creates a new Icon with the given width and height. |
|
| Method Summary | |
static java.awt.Image |
filter(java.awt.Image image)
Filters the given image according to the internal Icon#scale field. |
java.awt.Color |
getColor()
The method getColor returns the value of the color field. |
java.awt.Graphics2D |
getGraphics()
Method getGraphics returns the Graphics2D instance of the internal Image. |
int |
getHeight()
Method getHeight returns the height of the Icon. |
java.awt.Image |
getImage()
|
java.awt.Dimension |
getSize()
Method getSize returns the size of this Icon. |
int |
getWidth()
Method getWidth returns the width of this icon. |
void |
paint(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Method paint paints the icon on the given component with the given graphics instance at the specific position. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
|
void |
setColor(java.awt.Color color)
The method setColor sets a color field, which can be used to draw the icon. |
void |
setImage(java.awt.Image image)
|
| Methods inherited from class javax.swing.ImageIcon |
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImageObserver, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Icon EMPTYICON_16x15
| Constructor Detail |
public Icon(java.awt.Image image)
ColorFilter for more details.
Use the Icon(Image, boolean) constructor with
false to create a "normal" icon.
image - Image instance to create the icon from.ImageIcon.ImageIcon(Image)
public Icon(java.awt.Image image,
boolean useFilteredImage)
useFilteredImage is set to true a filtered
image will be created to represent this icon in the TensegrityLookAndFeel.
image - Image instance to create the icon from.useFilteredImage - set to true to let this class create a filtered version
of the parameter image.
public Icon(int width,
int height)
width - the width of the icon.height - the height of the icon.| Method Detail |
public void setImage(java.awt.Image image)
public java.awt.Graphics2D getGraphics()
public int getHeight()
public java.awt.Dimension getSize()
public int getWidth()
public void paint(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
c - the component to draw on.g - the graphics to use.x - the horizontal position.y - the vertical position.public java.awt.Color getColor()
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
public void setColor(java.awt.Color color)
color - voidpublic java.awt.Image getImage()
public static java.awt.Image filter(java.awt.Image image)
Icon#scale field.
image - the image to filter.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||