curaction.java

来自「mywork是rcp开发的很好的例子」· Java 代码 · 共 36 行

JAVA
36
字号
/*
 * Created on 2003-4-10
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package net.sf.pim.action;

import net.sf.pim.UiUtil;
import net.sf.util.StringUtil;

import org.eclipse.swt.SWT;

/**
 * @author lzhang
 *         <p/>
 *         To change the template for this generated type comment go to
 *         Window>Preferences>Java>Code Generation>Code and Comments
 */
public class CurAction extends UiAction {
    public CurAction() {
        super();
        name = "今天";
        gif = "today.gif";
        quick=SWT.CTRL+SWT.ARROW_DOWN;
    }

    public void run() {
    	super.run();
    	if(UiUtil.getActiveTableEditor().getName().equals("日志"))
    		UiUtil.showWork(parent,StringUtil.getCurrentDay());
    	else if(UiUtil.getActiveTableEditor().getName().indexOf("周") != -1)
    		UiUtil.showChunk(parent,StringUtil.getCurrentWeek());
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?