com.alee.extended.tree
Class NodeImageObserver

java.lang.Object
  extended by com.alee.extended.tree.NodeImageObserver
All Implemented Interfaces:
java.awt.image.ImageObserver

public class NodeImageObserver
extends java.lang.Object
implements java.awt.image.ImageObserver

Custom image observer class for animated loader icons.

Author:
Mikle Garin

Field Summary
protected  AsyncUniqueNode node
          Observed node.
protected  WebAsyncTree tree
          Asynchronous tree.
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
NodeImageObserver(WebAsyncTree tree, AsyncUniqueNode node)
          Constructs default node observer.
 
Method Summary
 boolean imageUpdate(java.awt.Image img, int flags, int x, int y, int w, int h)
          Updates loader icon view in tree cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tree

protected WebAsyncTree tree
Asynchronous tree.


node

protected AsyncUniqueNode node
Observed node.

Constructor Detail

NodeImageObserver

public NodeImageObserver(WebAsyncTree tree,
                         AsyncUniqueNode node)
Constructs default node observer.

Parameters:
tree - asynchronous tree
node - observed node
Method Detail

imageUpdate

public boolean imageUpdate(java.awt.Image img,
                           int flags,
                           int x,
                           int y,
                           int w,
                           int h)
Updates loader icon view in tree cell.

Specified by:
imageUpdate in interface java.awt.image.ImageObserver
Parameters:
img - image being observed
flags - bitwise inclusive OR of flags
x - x coordinate
y - y coordinate
w - width
h - height
Returns:
false if the infoflags indicate that the image is completely loaded, true otherwise