Package diva.util

Examples of diva.util.FilteredIterator


     */
    public Iterator intersectingNodes(Rectangle2D r) {
        final GraphModel model = _controller.getGraphModel();
        ZList zlist = getGraphicsPane().getForegroundLayer().getFigures();
        Iterator i = zlist.getIntersectedFigures(r).figuresFromFront();
        Iterator j = new FilteredIterator(i, new Filter() {
            public boolean accept(Object o) {
                Figure f = (Figure) o;
                return (model.isNode(f.getUserObject()));
            }
        });
View Full Code Here


     * intersect the given rectangle.
     */
    public Iterator intersectingEdges(Rectangle2D r) {
        ZList zlist = getGraphicsPane().getForegroundLayer().getFigures();
        Iterator i = zlist.getIntersectedFigures(r).figuresFromFront();
        Iterator j = new FilteredIterator(i, new Filter() {
            public boolean accept(Object o) {
                return (o instanceof Connector);
            }
        });
        return new ProxyIterator(j) {
View Full Code Here

     * have the given element type.
     *
     *  @return an Iterator of XmlElements
     */
    public Iterator elements(final String type) {
        return new FilteredIterator(elements(), new Filter() {
            public boolean accept(Object o) {
                return ((XmlElement) o)._type.equals(type);
            }
        });
    }
View Full Code Here

     * (i.e. the edges whose head node, or tail node is in the
     * composite, or a subnode).
     */
    public static final Iterator partiallyContainedEdges(Object composite,
            GraphModel model) {
        return new FilteredIterator(edgeSet(model.getRoot(), model).iterator(),
                new PartiallyContainedEdgeFilter(model, composite));
    }
View Full Code Here

     * (i.e. the edges whose head and tail nodes are both in the
     * composite, or a subnode).
     */
    public static final Iterator totallyContainedEdges(Object composite,
            GraphModel model) {
        return new FilteredIterator(edgeSet(model.getRoot(), model).iterator(),
                new TotallyContainedEdgeFilter(model, composite));
    }
View Full Code Here

     * @return An iterator over the hit figures.
     */
    public static Iterator pickIter(Iterator i, Rectangle2D region) {
        final Rectangle2D rl = region;

        return new FilteredIterator(i, new Filter() {
            Rectangle2D _region = rl;

            public boolean accept(Object o) {
                Figure f = (Figure) o;
                return f.hit(_region);
View Full Code Here

TOP

Related Classes of diva.util.FilteredIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.