1 11 package org.eclipse.ui.internal.presentations; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.swt.widgets.Display; 15 import org.eclipse.ui.internal.WorkbenchMessages; 16 import org.eclipse.ui.presentations.IPresentablePart; 17 import org.eclipse.ui.presentations.IStackPresentationSite; 18 19 22 public class SystemMenuMovePane extends Action { 23 24 IStackPresentationSite site; 25 IPresentablePart part; 26 27 public SystemMenuMovePane(IStackPresentationSite site) { 28 this.site = site; 29 setText(WorkbenchMessages.SystemMenuMovePane_PaneName); 30 } 31 32 35 public void run() { 36 site.dragStart(part, Display.getDefault().getCursorLocation(), true); 37 } 38 39 public void setTarget(IPresentablePart part) { 40 this.part = part; 41 setEnabled(part != null && site.isPartMoveable(part)); 42 } 43 44 } 45 | Popular Tags |