1 11 package org.eclipse.ui.views.properties.tabbed; 12 13 import org.eclipse.jface.viewers.ISelection; 14 import org.eclipse.swt.layout.FormAttachment; 15 import org.eclipse.swt.layout.FormData; 16 import org.eclipse.swt.widgets.Composite; 17 import org.eclipse.ui.IWorkbenchPart; 18 import org.eclipse.ui.views.properties.PropertySheetPage; 19 20 26 public class AdvancedPropertySection 27 extends AbstractPropertySection { 28 29 32 protected PropertySheetPage page; 33 34 38 public void createControls(Composite parent, 39 TabbedPropertySheetPage tabbedPropertySheetPage) { 40 super.createControls(parent, tabbedPropertySheetPage); 41 Composite composite = getWidgetFactory() 42 .createFlatFormComposite(parent); 43 page = new PropertySheetPage(); 44 45 page.createControl(composite); 46 FormData data = new FormData(); 47 data.left = new FormAttachment(0, 0); 48 data.right = new FormAttachment(100, 0); 49 data.top = new FormAttachment(0, 0); 50 data.bottom = new FormAttachment(100, 0); 51 page.getControl().setLayoutData(data); 52 } 53 54 58 public void setInput(IWorkbenchPart part, ISelection selection) { 59 super.setInput(part, selection); 60 page.selectionChanged(part, selection); 61 } 62 63 66 public void dispose() { 67 super.dispose(); 68 69 if (page != null) { 70 page.dispose(); 71 page = null; 72 } 73 74 } 75 76 79 public void refresh() { 80 page.refresh(); 81 } 82 83 86 public boolean shouldUseExtraSpace() { 87 return true; 88 } 89 } 90 | Popular Tags |