01: /*
02: * PageEnumeration.java - Enumeration of the pages
03: * Copyright (C) 2003 Alexandre THOMAS
04: * alexthomas@free.fr
05: * http://helpgui.sourceforge.net
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License
09: * as published by the Free Software Foundation; either version 2
10: * of the License, or any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with this program; if not, write to the Free Software
19: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20: */
21:
22: package salomeTMF_plug.helpgui.page;
23:
24: import java.util.Enumeration;
25: import java.util.Iterator;
26:
27: /**
28: * Enumeration of the pages
29: *
30: * @author Alexandre THOMAS
31: */
32: public class PageEnumeration implements Enumeration {
33:
34: /** An iterator on the list */
35: protected Iterator iterator;
36:
37: /** Standard constructor. */
38: public PageEnumeration(PageList pages) {
39: iterator = pages.iterator();
40: }
41:
42: /** Tests if this enumeration contains more elements. */
43: public boolean hasMoreElements() {
44: return iterator.hasNext();
45: }
46:
47: /**
48: * Returns the next element of this enumeration if this enumeration object
49: * has at least one more element to provide.
50: */
51: public Object nextElement() {
52: return iterator.next();
53: }
54:
55: }
|