1 26 package org.nightlabs.editor2d.actions.preferences; 27 28 import org.nightlabs.editor2d.AbstractEditor; 29 import org.nightlabs.editor2d.EditorPlugin; 30 31 34 public class ShowStatusLineAction 35 extends PreferencesAction 36 { 37 public static final String ID = ShowStatusLineAction.class.getName(); 38 39 43 public ShowStatusLineAction(AbstractEditor editor, int style) { 44 super(editor, style | AS_CHECK_BOX); 45 } 46 47 50 public ShowStatusLineAction(AbstractEditor editor) { 51 super(editor, AS_CHECK_BOX); 52 } 53 54 protected void init() 55 { 56 setId(ID); 57 setText(EditorPlugin.getResourceString("action.showStatusLine.text")); 58 setToolTipText(EditorPlugin.getResourceString("action.showStatusLine.tooltip")); 59 } 60 61 public boolean isChecked() 62 { 63 return prefConfMod.isShowStatusLine(); 64 } 65 66 public void run() 67 { 68 prefConfMod.setShowStatusLine(!isChecked()); 69 } 70 } 71 | Popular Tags |