这几天写了一个NetBeans的插件——Gmail Notifier : -)。偶的Ubuntu上不了网。。。。只能在Windows下测试了。。。。
先看下解图:
OK,源代码:
/** @(#)GmailNotifierAction.java
* Author: 88250 <DL88250@gmail.com>, http://blog.csdn.net/DL88250
* Created on May 18, 2008, 7:47:18 PM
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package cn.edu.ynu.sei.gmailnotifier;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
/**
* Gmail Notifier Action.
* @author 88250 <DL88250@gmail.com>, http://blog.csdn.net/DL88250
* @version 1.0.0.0, May 18, 2008
*/
public final class GmailNotifierAction extends CallableSystemAction {
private static final long serialVersionUID = 1L;
GmailNotifierPanel gChecker = new GmailNotifierPanel();
public void performAction() {
gChecker.forceCheck();
}
public String getName() {
return NbBundle.getMessage(GmailNotifierAction.class,
"CTL_GmailNotifierAction");
}
public HelpCtx getHelpCtx() {
return HelpCtx.DEFAULT_HELP;
}
@Override
protected boolean asynchronous() {
return false;
}
@Override
public java.awt.Component getToolbarPresenter() {
return gChecker;
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)