/******************************************************************************* * Copyright (c) 2005 AIRBUS FRANCE. * 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: * David Sciamma (Anyware Technologies), Mathieu Garcia (Anyware Technologies), * Jacques Lescot (Anyware Technologies) - initial API and implementation *******************************************************************************/ package org.eclipse.papyrus.views.documentation.view; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.part.Page; /** * This doc page is used when no documentation can be defined on the current * object.<br> * creation : 3 juin 2005 * * @author <a href="mailto:david@anyware-tech.com">David Sciamma</a> */ public class EmptyDocPage extends Page implements IDocPage { private Composite mainComp; /** * @see org.eclipse.ui.part.Page#createControl(org.eclipse.swt.widgets.Composite) */ public void createControl(Composite parent) { mainComp = new Composite(parent, SWT.NONE); mainComp.setLayout(new GridLayout()); mainComp.setLayoutData(new GridData(GridData.FILL_BOTH)); Label text = new Label(mainComp, SWT.NONE); text.setText(Messages.EmptyDocPage_noDoc); } /** * @see org.eclipse.ui.part.Page#getControl() */ public Control getControl() { return mainComp; } /** * @see org.eclipse.ui.part.Page#setFocus() */ public void setFocus() { // Do nothing } /** * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, * org.eclipse.jface.viewers.ISelection) */ public void selectionChanged(IWorkbenchPart part, ISelection selection) { // Do nothing } }