1 11 12 package org.eclipse.ui.menus; 13 14 import org.eclipse.jface.action.ControlContribution; 15 import org.eclipse.swt.SWT; 16 import org.eclipse.ui.IWorkbenchWindow; 17 import org.eclipse.ui.internal.menus.InternalControlContribution; 18 19 39 public abstract class WorkbenchWindowControlContribution extends InternalControlContribution { 40 41 48 public WorkbenchWindowControlContribution() { 49 this("unknown ID"); } 51 52 58 public WorkbenchWindowControlContribution(String id) { 59 super(id); 60 } 61 62 66 public final IWorkbenchWindow getWorkbenchWindow() { 67 return super.getWorkbenchWindow(); 68 } 69 70 75 public final int getCurSide() { 76 return super.getCurSide(); 77 } 78 79 public final int getOrientation() { 80 if (getCurSide() == SWT.LEFT || getCurSide() == SWT.RIGHT) 81 return SWT.VERTICAL; 82 83 return SWT.HORIZONTAL; 84 } 85 } 86 | Popular Tags |