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