1 /******************************************************************************* 2 * Copyright (c) 2006 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.internal.provisional.action; 12 13 import org.eclipse.jface.action.IContributionItem; 14 import org.eclipse.jface.action.ICoolBarManager; 15 import org.eclipse.swt.widgets.Composite; 16 import org.eclipse.swt.widgets.Control; 17 18 /** 19 * Extends <code>ICoolBarManager</code> to allow clients to be decoupled 20 * from the actual kind of control used. 21 * 22 * <p> 23 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as 24 * part of a work in progress. There is a guarantee neither that this API will 25 * work nor that it will remain the same. Please do not use this API without 26 * consulting with the Platform/UI team. 27 * </p> 28 * 29 * @since 3.2 30 */ 31 public interface ICoolBarManager2 extends ICoolBarManager { 32 33 /** 34 * Creates and returns this manager's control. Does not create a 35 * new control if one already exists. 36 * 37 * 38 * @param parent 39 * the parent control 40 * @return the control 41 * @since 3.2 42 */ 43 public Control createControl2(Composite parent); 44 45 /** 46 * Returns the bar control for this manager. 47 * 48 * <p> 49 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as 50 * part of a work in progress. There is a guarantee neither that this API will 51 * work nor that it will remain the same. Please do not use this API without 52 * consulting with the Platform/UI team. 53 * </p> 54 * 55 * @return the bar control, or <code>null</code> if none 56 * @since 3.2 57 */ 58 public Control getControl2(); 59 60 /** 61 * Synchronizes the visual order of the cool items in the control with this 62 * manager's internal data structures. This method should be called before 63 * requesting the order of the contribution items to ensure that the order 64 * is accurate. 65 * <p> 66 * Note that <code>update()</code> and <code>refresh()</code> are 67 * converses: <code>update()</code> changes the visual order to match the 68 * internal structures, and <code>refresh</code> changes the internal 69 * structures to match the visual order. 70 * </p> 71 * 72 * <p> 73 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as 74 * part of a work in progress. There is a guarantee neither that this API will 75 * work nor that it will remain the same. Please do not use this API without 76 * consulting with the Platform/UI team. 77 * </p> 78 * 79 * @since 3.2 80 */ 81 public void refresh(); 82 83 /** 84 * Disposes the resources for this manager. 85 * 86 * <p> 87 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as 88 * part of a work in progress. There is a guarantee neither that this API will 89 * work nor that it will remain the same. Please do not use this API without 90 * consulting with the Platform/UI team. 91 * </p> 92 * 93 * @since 3.2 94 */ 95 public void dispose(); 96 97 /** 98 * Restores the canonical order of this cool bar manager. The canonical 99 * order is the order in which the contribution items where added. 100 * 101 * <p> 102 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as 103 * part of a work in progress. There is a guarantee neither that this API will 104 * work nor that it will remain the same. Please do not use this API without 105 * consulting with the Platform/UI team. 106 * </p> 107 * 108 * @since 3.2 109 */ 110 public void resetItemOrder(); 111 112 /** 113 * Replaces the current items with the given items. 114 * Forces an update. 115 * 116 * <p> 117 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as 118 * part of a work in progress. There is a guarantee neither that this API will 119 * work nor that it will remain the same. Please do not use this API without 120 * consulting with the Platform/UI team. 121 * </p> 122 * 123 * @param newItems the items with which to replace the current items 124 * @since 3.2 125 */ 126 public void setItems(IContributionItem[] newItems); 127 128 } 129