View Javadoc
1 package org.argosfields.action.view; 2 3 import org.argosfields.ArgosFields; 4 import org.argosfields.action.BaseAction; 5 import org.eclipse.jface.action.IAction; 6 import org.eclipse.jface.preference.IPreferenceStore; 7 import org.eclipse.jface.preference.JFacePreferences; 8 import org.eclipse.swt.widgets.Event; 9 10 /*** 11 * ToggleInfoPanelAction.java 12 * @author Xavier Cho 13 * @version $Revision: 1.3 $ $Date: 2004/04/15 05:42:45 $ 14 */ 15 public class ToggleInfoPanelAction extends BaseAction { 16 17 public ToggleInfoPanelAction(final ArgosFields application) { 18 super(application, IAction.AS_CHECK_BOX); 19 setChecked(false); 20 } 21 22 /*** 23 * @see org.eclipse.jface.action.IAction#runWithEvent(org.eclipse.swt.widgets.Event) 24 */ 25 public void runWithEvent(final Event event) { 26 getApplication().toggleInfoPanel(); 27 28 IPreferenceStore preferences = JFacePreferences.getPreferenceStore(); 29 preferences.setValue("info.panel.visible", isChecked()); 30 } 31 }

This page was automatically generated by Maven