1 /******************************************************************************* 2 * Copyright (c) 2003, 2004 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.swt.browser; 12 13 import org.eclipse.swt.internal.SWTEventListener; 14 15 /** 16 * This listener interface may be implemented in order to receive 17 * a {@link LocationEvent} notification when a {@link Browser} 18 * navigates to a different URL. 19 * 20 * @see Browser#addLocationListener(LocationListener) 21 * @see Browser#removeLocationListener(LocationListener) 22 * 23 * @since 3.0 24 */ 25 public interface LocationListener extends SWTEventListener { 26 27 /** 28 * This method is called when the current location is about to be changed. 29 * <p> 30 * 31 * <p>The following fields in the <code>LocationEvent</code> apply: 32 * <ul> 33 * <li>(in) location the location to be loaded 34 * <li>(in) widget the <code>Browser</code> whose location is changing 35 * <li>(in/out) doit can be set to <code>false</code> to prevent the location 36 * from being loaded 37 * </ul> 38 * 39 * @param event the <code>LocationEvent</code> that specifies the location 40 * to be loaded by a <code>Browser</code> 41 * 42 * @since 3.0 43 */ 44 public void changing(LocationEvent event); 45 46 /** 47 * This method is called when the current location is changed. 48 * <p> 49 * 50 * <p>The following fields in the <code>LocationEvent</code> apply: 51 * <ul> 52 * <li>(in) location the current location 53 * <li>(in) top <code>true</code> if the location opens in the top frame or 54 * <code>false</code> otherwise 55 * <li>(in) widget the <code>Browser</code> whose location has changed 56 * </ul> 57 * 58 * @param event the <code>LocationEvent</code> that specifies the new 59 * location of a <code>Browser</code> 60 * 61 * @since 3.0 62 */ 63 public void changed(LocationEvent event); 64 65 } 66