1 /*******************************************************************************
2 * Copyright (c) 2000, 2017 IBM Corporation and others.
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/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.swt.custom;
17 * This adapter class provides default implementations for the
18 * methods described by the <code>CTabFolder2Listener</code> interface.
20 * Classes that wish to deal with <code>CTabFolderEvent</code>s can
21 * extend this class and override only the methods which they are
25 * An alternative to this class are the static helper methods in
26 * {@link CTabFolder2Listener},
27 * which accept a lambda expression or a method reference that implements the event consumer.
30 * @see CTabFolder2Listener
31 * @see CTabFolderEvent
32 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
36 public class CTabFolder2Adapter implements CTabFolder2Listener {
39 * Sent when the user clicks on the close button of an item in the CTabFolder. The item being closed is specified
40 * in the event.item field. Setting the event.doit field to false will stop the CTabItem from closing.
41 * When the CTabItem is closed, it is disposed. The contents of the CTabItem (see CTabItem#setControl) will be
42 * made not visible when the CTabItem is closed.
44 * The default behaviour is to close the CTabItem.
47 * @param event an event indicating the item being closed
50 public void close(CTabFolderEvent event){}
53 * Sent when the user clicks on the minimize button of a CTabFolder.
55 * The default behaviour is to do nothing.
58 * @param event an event containing information about the minimize
61 public void minimize(CTabFolderEvent event){}
64 * Sent when the user clicks on the maximize button of a CTabFolder.
66 * The default behaviour is to do nothing.
69 * @param event an event containing information about the maximize
72 public void maximize(CTabFolderEvent event){}
75 * Sent when the user clicks on the restore button of a CTabFolder.
77 * The default behaviour is to do nothing.
80 * @param event an event containing information about the restore
83 public void restore(CTabFolderEvent event){}
86 * Sent when the user clicks on the chevron button of a CTabFolder.
88 * The default behaviour is to show a list of items that are not currently
89 * visible and to change the selection based on the item selected from the list.
92 * @param event an event containing information about the show list
95 public void showList(CTabFolderEvent event){}