1 /******************************************************************************* 2 * Copyright (c) 2003, 2007 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 WindowEvent} notification when a window hosting a 18 * {@link Browser} needs to be displayed or hidden. 19 * 20 * @see Browser#addVisibilityWindowListener(VisibilityWindowListener) 21 * @see Browser#removeVisibilityWindowListener(VisibilityWindowListener) 22 * @see OpenWindowListener 23 * @see CloseWindowListener 24 * 25 * @since 3.0 26 */ 27 public interface VisibilityWindowListener extends SWTEventListener { 28 29 /** 30 * This method is called when the window hosting a <code>Browser</code> 31 * is requested to be hidden. Application would typically hide the 32 * {@link org.eclipse.swt.widgets.Shell} that hosts the <code>Browser</code>. 33 * <p> 34 * 35 * <p>The following fields in the <code>WindowEvent</code> apply: 36 * <ul> 37 * <li>(in) widget the <code>Browser</code> that needs to be hidden 38 * </ul> 39 * 40 * @param event the <code>WindowEvent</code> that specifies the 41 * <code>Browser</code> that needs to be hidden 42 * 43 * @see org.eclipse.swt.widgets.Shell#setVisible(boolean) 44 * 45 * @since 3.0 46 */ 47 public void hide(WindowEvent event); 48 49 /** 50 * This method is called when the window hosting a <code>Browser</code> 51 * is requested to be displayed. Application would typically set the 52 * location and the size of the {@link org.eclipse.swt.widgets.Shell} 53 * that hosts the <code>Browser</code>, if a particular location and size 54 * are specified. The application would then open that <code>Shell</code>. 55 * <p> 56 * 57 * <p>The following fields in the <code>WindowEvent</code> apply: 58 * <ul> 59 * <li>(in) widget the <code>Browser</code> to display 60 * <li>(in) location the requested location for the <code>Shell</code> 61 * hosting the browser. It is <code>null</code> if no location is set. 62 * <li>(in) size the requested size for the <code>Browser</code>. 63 * The client area of the <code>Shell</code> hosting the 64 * <code>Browser</code> should be large enough to accommodate that size. 65 * It is <code>null</code> if no size is set. 66 * <li>(in) addressBar <code>true</code> if the <code>Shell</code> 67 * hosting the <code>Browser</code> should display an address bar or 68 * <code>false</code> otherwise 69 * <li>(in) menuBar <code>true</code> if the <code>Shell</code> 70 * hosting the <code>Browser</code> should display a menu bar or 71 * <code>false</code> otherwise 72 * <li>(in) statusBar <code>true</code> if the <code>Shell</code> 73 * hosting the <code>Browser</code> should display a status bar or 74 * <code>false</code> otherwise 75 * <li>(in) toolBar <code>true</code> if the <code>Shell</code> 76 * hosting the <code>Browser</code> should display a tool bar or 77 * <code>false</code> otherwise 78 * </ul> 79 * 80 * @param event the <code>WindowEvent</code> that specifies the 81 * <code>Browser</code> that needs to be displayed 82 * 83 * @see org.eclipse.swt.widgets.Control#setLocation(org.eclipse.swt.graphics.Point) 84 * @see org.eclipse.swt.widgets.Control#setSize(org.eclipse.swt.graphics.Point) 85 * @see org.eclipse.swt.widgets.Shell#open() 86 * 87 * @since 3.0 88 */ 89 public void show(WindowEvent event); 90 91 } 92