001: /*******************************************************************************
002: * Copyright (c) 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.jface.internal.provisional.action;
011:
012: import org.eclipse.jface.action.IContributionManagerOverrides;
013: import org.eclipse.jface.action.IToolBarManager;
014: import org.eclipse.jface.util.IPropertyChangeListener;
015: import org.eclipse.swt.widgets.Composite;
016: import org.eclipse.swt.widgets.Control;
017: import org.eclipse.swt.widgets.ToolBar;
018:
019: /**
020: * The <code>IToolBarManager2</code> extends <code>IToolBarManager</code> to
021: * allow clients to be isolated from the actual kind of SWT control used by the
022: * manager.
023: * <p>
024: * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
025: * part of a work in progress. There is a guarantee neither that this API will
026: * work nor that it will remain the same. Please do not use this API without
027: * consulting with the Platform/UI team.
028: * </p>
029: *
030: * @since 3.2
031: */
032: public interface IToolBarManager2 extends IToolBarManager {
033:
034: /**
035: * The property id for changes to the control's layout
036: */
037: public static final String PROP_LAYOUT = "PROP_LAYOUT"; //$NON-NLS-1$
038:
039: /**
040: * Creates and returns this manager's toolbar control. Does not create a new
041: * control if one already exists.
042: *
043: * @param parent
044: * the parent control
045: * @return the toolbar control
046: */
047: public ToolBar createControl(Composite parent);
048:
049: /**
050: * Creates and returns this manager's control. Does not create a new control
051: * if one already exists.
052: *
053: * @param parent
054: * the parent control
055: * @return the control
056: */
057: public Control createControl2(Composite parent);
058:
059: /**
060: * Returns the toolbar control for this manager.
061: *
062: * @return the toolbar control, or <code>null</code> if none
063: */
064: public ToolBar getControl();
065:
066: /**
067: * Returns the control for this manager.
068: *
069: * @return the control, or <code>null</code> if none
070: */
071: public Control getControl2();
072:
073: /**
074: * Disposes the resources for this manager.
075: */
076: public void dispose();
077:
078: /**
079: * Returns the item count of the control used by this manager.
080: *
081: * @return the number of items in the control
082: */
083: public int getItemCount();
084:
085: /**
086: * Registers a property change listner with this manager.
087: *
088: * @param listener
089: */
090: public void addPropertyChangeListener(
091: IPropertyChangeListener listener);
092:
093: /**
094: * Removes a property change listner from this manager.
095: *
096: * @param listener
097: */
098: public void removePropertyChangeListener(
099: IPropertyChangeListener listener);
100:
101: /**
102: * Sets the overrides for this contribution manager
103: *
104: * @param newOverrides
105: * the overrides for the items of this manager
106: */
107: public void setOverrides(IContributionManagerOverrides newOverrides);
108:
109: }
|