Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.javatools.ui
Class TranslucentIcon

java.lang.Object
  extended by oracle.javatools.ui.TranslucentIcon
All Implemented Interfaces:
javax.swing.Icon

public final class TranslucentIcon
extends java.lang.Object
implements javax.swing.Icon

An Icon that paints another icon with alpha so that it is translucent (partially transparent).

Since:
11.0

Constructor Summary
TranslucentIcon(javax.swing.Icon baseIcon)
          Creates a translucent icon that paints the specified base icon.
 
Method Summary
 float getAlpha()
          Returns the alpha transparency of this icon.
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
           
 void setAlpha(float alpha)
          Sets the alpha transparency to paint with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslucentIcon

public TranslucentIcon(javax.swing.Icon baseIcon)
Creates a translucent icon that paints the specified base icon.

Parameters:
baseIcon - a base icon to paint. Must not be null.
Method Detail

setAlpha

public void setAlpha(float alpha)
Sets the alpha transparency to paint with.

Parameters:
alpha - the alpha transparency. Must be between 0.0 and 1.0.

getAlpha

public float getAlpha()
Returns the alpha transparency of this icon.

Returns:
the alpha transparency of this icon.

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface javax.swing.Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface javax.swing.Icon

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface javax.swing.Icon

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.