gishur.gui2
Class ShapeContainer.ShapeEnumeration

java.lang.Object
  |
  +--gishur.gui2.ShapeContainer.ShapeEnumeration
All Implemented Interfaces:
java.util.Enumeration
Enclosing class:
ShapeContainer

public class ShapeContainer.ShapeEnumeration
extends java.lang.Object
implements java.util.Enumeration

An Enumeration for ShapeContainers. This enumeration enumerates all Shapes contained in the shape hierachy of this ShapeContainer.


Constructor Summary
ShapeContainer.ShapeEnumeration()
          Default Constructor.
 
Method Summary
 java.lang.Object element()
          Returns the actual element of the enumeration.
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 java.lang.Object nextElement()
          Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
 Shape nextShape()
          Returns the next Shape of this enumeration if this enumeration object has at least one more Shape to provide.
 Shape shape()
          Returns the actual Shape of the enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeContainer.ShapeEnumeration

public ShapeContainer.ShapeEnumeration()
Default Constructor.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.
Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if and only if this enumeration object contains at least one more element to provide; false otherwise.

nextElement

public java.lang.Object nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
Specified by:
nextElement in interface java.util.Enumeration
Returns:
the next element of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.

nextShape

public Shape nextShape()
Returns the next Shape of this enumeration if this enumeration object has at least one more Shape to provide.
Returns:
the next Shape of this enumeration.
Throws:
java.util.NoSuchElementException - if no more elements exist.

element

public java.lang.Object element()
Returns the actual element of the enumeration.
Returns:
actual element

shape

public Shape shape()
Returns the actual Shape of the enumeration.
Returns:
actual Shape.