KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > editor > PDEDetails


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.pde.internal.ui.editor;
12
13 import org.eclipse.swt.dnd.Clipboard;
14 import org.eclipse.swt.layout.GridData;
15 import org.eclipse.swt.widgets.Composite;
16 import org.eclipse.swt.widgets.Control;
17 import org.eclipse.swt.widgets.Label;
18 import org.eclipse.ui.forms.AbstractFormPart;
19 import org.eclipse.ui.forms.IDetailsPage;
20 import org.eclipse.ui.forms.widgets.FormToolkit;
21
22 public abstract class PDEDetails extends AbstractFormPart implements IDetailsPage, IContextPart {
23
24     public PDEDetails() {
25     }
26     
27     public boolean canPaste(Clipboard clipboard) {
28         return true;
29     }
30     
31     public boolean doGlobalAction(String JavaDoc actionId) {
32         return false;
33     }
34     
35     protected void markDetailsPart(Control control) {
36         control.setData("part", this); //$NON-NLS-1$
37
}
38     
39     protected void createSpacer(FormToolkit toolkit, Composite parent, int span) {
40         Label spacer = toolkit.createLabel(parent, ""); //$NON-NLS-1$
41
GridData gd = new GridData();
42         gd.horizontalSpan = span;
43         spacer.setLayoutData(gd);
44     }
45     public void cancelEdit() {
46         super.refresh();
47     }
48 }
49
Popular Tags