public class IlvFilteredGraphicEnumeration extends Object implements IlvGraphicEnumeration
IlvGraphic
).
This class allows you to browse only the elements of an IlvGraphicEnumeration
which respect some conditions. You should implement these conditions in your
implementation of the interface IlvGraphicFilter
.IlvGraphicFilter
,
IlvGraphicEnumeration
Constructor and Description |
---|
IlvFilteredGraphicEnumeration(IlvGraphicEnumeration e,
IlvGraphicFilter filter)
Creates a new
IlvFilteredGraphicEnumeration . |
Modifier and Type | Method and Description |
---|---|
IlvGraphicFilter |
getFilter()
Returns the filter to be applied to the initial enumeration.
|
boolean |
hasMoreElements()
Returns
true if the enumeration contains more elements respecting
the filtering condition, and false otherwise. |
IlvGraphic |
nextElement()
Returns the next graphic object of the enumeration respecting
the filtering condition.
|
public IlvFilteredGraphicEnumeration(IlvGraphicEnumeration e, IlvGraphicFilter filter)
IlvFilteredGraphicEnumeration
.e
- the graphic enumeration you want to be filteredfilter
- the graphic filter to be used for filtering the graphic objectspublic IlvGraphicFilter getFilter()
public boolean hasMoreElements()
true
if the enumeration contains more elements respecting
the filtering condition, and false
otherwise.
To know if an element respects the filtering condition, this method calls the
method IlvGraphicFilter.accept(IlvGraphic)
on the filter instance.hasMoreElements
in interface IlvGraphicEnumeration
IlvGraphicFilter.accept(ilog.views.IlvGraphic)
public IlvGraphic nextElement()
nextElement
in interface IlvGraphicEnumeration
NoSuchElementException
- if there are no more such elementshasMoreElements()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.