org.openbp.cockpit.modeler.util
Class TypedFigureEnumerator

java.lang.Object
  extended by org.openbp.cockpit.modeler.util.TypedFigureEnumerator
All Implemented Interfaces:
CH.ifa.draw.framework.FigureEnumeration, java.util.Enumeration

public class TypedFigureEnumerator
extends java.lang.Object
implements CH.ifa.draw.framework.FigureEnumeration

Figure enumerator that returns only figures of the specified type. This class is a singleton.

Author:
Heiko Erhardt

Constructor Summary
TypedFigureEnumerator(CH.ifa.draw.framework.Figure parentFigure, java.lang.Class figureClass)
          Creates a forward enumeration of matching figures.
TypedFigureEnumerator(CH.ifa.draw.framework.Figure parentFigure, java.lang.Class figureClass, boolean reverse)
          Constructor.
 
Method Summary
 boolean hasMoreElements()
           
 java.lang.Object nextElement()
           
 CH.ifa.draw.framework.Figure nextFigure()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedFigureEnumerator

public TypedFigureEnumerator(CH.ifa.draw.framework.Figure parentFigure,
                             java.lang.Class figureClass)
Creates a forward enumeration of matching figures.

Parameters:
parentFigure - Parent figure to enumerate
figureClass - Class of the figures to return

TypedFigureEnumerator

public TypedFigureEnumerator(CH.ifa.draw.framework.Figure parentFigure,
                             java.lang.Class figureClass,
                             boolean reverse)
Constructor.

Parameters:
parentFigure - Parent figure to enumerate
figureClass - Class of the figures to return
reverse - true: Return the figures in reverse order (only supported for CompositeFigure objects)
false: Return the figures in regular order
Method Detail

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface java.util.Enumeration

nextElement

public java.lang.Object nextElement()
Specified by:
nextElement in interface java.util.Enumeration

nextFigure

public CH.ifa.draw.framework.Figure nextFigure()
Specified by:
nextFigure in interface CH.ifa.draw.framework.FigureEnumeration


Copyright © 2011. All Rights Reserved.