📄 servicemenu.java
字号:
/* * @(#) ServiceMenu.java * Copyright 2004 HWStudio. All rights reserved. */package hws.item.smart.menu.top;//导入自定义Java类库import hws.item.smart.misc.SBChanger;import hws.item.smart.action.service.StopAllAction;import hws.item.smart.action.service.StartAllAction;import hws.item.smart.action.service.RestartAllAction;/** * 服务菜单 * * @version 0.1 2005-08-28 * @author Hwerz */public class ServiceMenu extends BaseMenu { /*------------------------------------------------------------------------* * 属性定义 * *------------------------------------------------------------------------*/ /** * 该类自身的一个静态引用 */ private static ServiceMenu menu; /*------------------------------------------------------------------------* * 构造函数 * *------------------------------------------------------------------------*/ /** * 构造函数为私有,这样在整个运行过程中该类就只能有一个实例 */ private ServiceMenu() { super("服务(S)"); setMnemonic('S'); //启动 add(StartAllAction.getInstance()).addMouseListener( new SBChanger(StartAllAction.getInstance().getHintInfo(), true)); //停止 add(StopAllAction.getInstance()).addMouseListener( new SBChanger(StopAllAction.getInstance().getHintInfo(), true)); //重启 add(RestartAllAction.getInstance()).addMouseListener( new SBChanger(RestartAllAction.getInstance().getHintInfo(), true)); } /*------------------------------------------------------------------------* * 公共方法 * *------------------------------------------------------------------------*/ /** * 对该类提供的一个全局访问点,用来实例化该对象 * * @return 该类唯一的一个实例 */ public static ServiceMenu getInstance() { if (menu == null) { menu = new ServiceMenu(); } return menu; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -