blob: 64d9d67f9ea4a8ae7458b48039b5cca20be39a90 [file] [log] [blame]
//------------------------------------------------------------------------------
// Copyright (c) 2005, 2006 IBM Corporation and others.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// Contributors:
// IBM Corporation - initial implementation
//------------------------------------------------------------------------------
package org.eclipse.epf.library.ui.actions;
import org.eclipse.epf.library.ui.LibraryUIResources;
import org.eclipse.jface.action.ControlContribution;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
/**
* Contributes the "Current Configuration" label to the workbench toolbar.
*
* @author Bingxue Xu
* @author Kelvin Low
* @since 1.0
*/
public class ConfiguationLabelContribution extends ControlContribution {
public static final String CONTRIBUTION_ID = ConfiguationLabelContribution.class
.getName();
private Label configComboLabel;
/**
* Creates a new instance.
*
* @param id
* The contribution item ID.
*/
public ConfiguationLabelContribution() {
super(CONTRIBUTION_ID);
}
/**
* @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
*/
protected Control createControl(Composite parent) {
configComboLabel = new Label(parent, SWT.NONE);
configComboLabel.setText(" " + //$NON-NLS-1$
LibraryUIResources
.getString("LibraryUI.currentConfigLabel.text") + " "); //$NON-NLS-1$ //$NON-NLS-2$
return configComboLabel;
}
}