1 11 package org.eclipse.search2.internal.ui.basic.views; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.jface.action.IAction; 15 import org.eclipse.search.ui.text.AbstractTextSearchViewPage; 16 17 public class SetLayoutAction extends Action { 18 19 private AbstractTextSearchViewPage fPage; 20 private int fLayout; 21 22 public SetLayoutAction(AbstractTextSearchViewPage page, String label, String tooltip, int layout) { 23 super(label, IAction.AS_RADIO_BUTTON); 24 fPage= page; 25 setToolTipText(tooltip); 26 fLayout= layout; 27 } 28 29 public void run() { 30 fPage.setLayout(fLayout); 31 } 32 33 public int getLayout() { 34 return fLayout; 35 } 36 } 37 | Popular Tags |