Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.javatools.ui
Class AnimatedCellIcon

java.lang.Object
  extended by oracle.javatools.ui.AnimatedCellIcon
All Implemented Interfaces:
javax.swing.Icon
Direct Known Subclasses:
AnimatedCellIcon

public class AnimatedCellIcon
extends java.lang.Object
implements javax.swing.Icon

A wrapper for use in cases such as JTree and JTable where the method of rendering mean that animated gifs just don't work properly. This code relies on the icon being passed in to be either a ImageIcon, most likely an animated gif, or a custom implementation of Icon that implements Observable so as to allow nice custom animation steps.

The classic example of this is showing a busy icon when expanding a tree icon to indicate lazy loading. Also for showing busy icons inside of Tables.

Code original derrived from the following blog posting: http://rabbit-hole.blogspot.com/2006/09/animated-icon-redux.html

This code was moved from oracle.javatools.controls on 10-Dec-09


Constructor Summary
AnimatedCellIcon(javax.swing.Icon icon)
           
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(java.awt.Component component, java.awt.Graphics g, int x, int y)
           
 void repaint()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimatedCellIcon

public AnimatedCellIcon(javax.swing.Icon icon)
Method Detail

paintIcon

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

repaint

public void repaint()

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
11g Release 2 (11.1.2.0.0)

E17493-01

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