edu.umd.cs.jazz.util
Class ZMagBoundsFindFilter

java.lang.Object
  |
  +--edu.umd.cs.jazz.util.ZBoundsFindFilter
        |
        +--edu.umd.cs.jazz.util.ZMagBoundsFindFilter
All Implemented Interfaces:
java.io.Serializable, ZFindFilter

public class ZMagBoundsFindFilter
extends ZBoundsFindFilter
implements java.io.Serializable

ZMagBoundsFindFilter is a filter that accepts "terminal" nodes that overlap the specified bounds in global coordinates, but only if the object is within its visible magnification range. Terminal nodes are leaf nodes and group nodes that do not return true for "childrenFindable()".

Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.

Author:
Ben Bederson
See Also:
Serialized Form

Constructor Summary
ZMagBoundsFindFilter(ZBounds bounds, double mag)
          Create a new magnification bounds filter.
 
Method Summary
 boolean accept(ZNode node)
          Determine if the specified node is accepted by this filter.
 boolean childrenFindable(ZNode node)
          This method determines if the children of the specified node should be searched.
 
Methods inherited from class edu.umd.cs.jazz.util.ZBoundsFindFilter
getBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZMagBoundsFindFilter

public ZMagBoundsFindFilter(ZBounds bounds,
                            double mag)
Create a new magnification bounds filter. This filter accepts "terminal" nodes whose bounds intersect the specified bounds, but only if the object is within its visible magnification range. Terminal nodes are leaf nodes and group nodes that do not "childrenFindable".

Parameters:
bounds - The bounds in global coordinates to search within.
mag - The magnification to use for filtering
Method Detail

accept

public boolean accept(ZNode node)
Determine if the specified node is accepted by this filter.

Specified by:
accept in interface ZFindFilter
Overrides:
accept in class ZBoundsFindFilter
Parameters:
node - The node that is to be examined by this filter
Returns:
True if the node is accepted by the filter

childrenFindable

public boolean childrenFindable(ZNode node)
This method determines if the children of the specified node should be searched.

Specified by:
childrenFindable in interface ZFindFilter
Overrides:
childrenFindable in class ZBoundsFindFilter
Parameters:
node - The node that is to be examined by this filter
Returns:
True if this node's children should be searched, or false otherwise.


Copyright 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.