1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.jface.dialogs; 12 13 /** 14 * Minimal interface to a page change provider. Used for dialogs which can 15 * switch between multiple pages. 16 * 17 * @since 3.1 18 */ 19 public interface IPageChangeProvider { 20 /** 21 * Returns the currently selected page in the dialog. 22 * 23 * @return the selected page in the dialog or <code>null</code> if none is 24 * selected. The type may be domain specific. In 25 * the JFace provided dialogs this will be an instance of 26 * <code>IDialogPage</code>. 27 */ 28 Object getSelectedPage(); 29 30 /** 31 * Adds a listener for page changes in this page change provider. Has no 32 * effect if an identical listener is already registered. 33 * 34 * @param listener 35 * a page changed listener 36 */ 37 void addPageChangedListener(IPageChangedListener listener); 38 39 /** 40 * Removes the given page change listener from this page change provider. 41 * Has no effect if an identical listener is not registered. 42 * 43 * @param listener 44 * a page changed listener 45 */ 46 void removePageChangedListener(IPageChangedListener listener); 47 48 } 49