Package diva.canvas

Interface FigureSet

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean contains​(Figure f)
      Test if this set contains the given figure.
      java.util.Iterator figures()
      Return an iteration of the figures in this set, in an undefined order.
      java.util.Iterator figuresFromBack()
      Return an iteration of the figures in this set, from back to front.
      java.util.Iterator figuresFromFront()
      Return an iteration of the figures in this set, from back to front.
    • Method Detail

      • contains

        boolean contains​(Figure f)
        Test if this set contains the given figure. As a general rule, the implementation of this method is not required to be efficient -- O(n) in the length of the list is acceptable. Clients should note that, in general, a much better way of making this same test is to check if the parent of the figure is the same object as this set.
        Parameters:
        f - The figure
        Returns:
        True if the figure is contained by the set.
      • figures

        java.util.Iterator figures()
        Return an iteration of the figures in this set, in an undefined order. Generally, an implementor will return figures from front to back, but if there is a substantially more efficient way of returning them, then the implementor can use that.
        Returns:
        The iterator.
      • figuresFromBack

        java.util.Iterator figuresFromBack()
        Return an iteration of the figures in this set, from back to front. This is the order in which figures should normally be painted.
        Returns:
        The iterator
      • figuresFromFront

        java.util.Iterator figuresFromFront()
        Return an iteration of the figures in this set, from back to front. This is the order in which events should normally be intercepted.
        Returns:
        The iterator