?? servicemenu.java
字號(hào):
/* * @(#) ServiceMenu.java * Copyright 2004 HWStudio. All rights reserved. */package hws.item.smart.menu.top;//導(dǎo)入自定義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;/** * 服務(wù)菜單 * * @version 0.1 2005-08-28 * @author Hwerz */public class ServiceMenu extends BaseMenu { /*------------------------------------------------------------------------* * 屬性定義 * *------------------------------------------------------------------------*/ /** * 該類自身的一個(gè)靜態(tài)引用 */ private static ServiceMenu menu; /*------------------------------------------------------------------------* * 構(gòu)造函數(shù) * *------------------------------------------------------------------------*/ /** * 構(gòu)造函數(shù)為私有,這樣在整個(gè)運(yùn)行過程中該類就只能有一個(gè)實(shí)例 */ private ServiceMenu() { super("服務(wù)(S)"); setMnemonic('S'); //啟動(dòng) 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)); } /*------------------------------------------------------------------------* * 公共方法 * *------------------------------------------------------------------------*/ /** * 對該類提供的一個(gè)全局訪問點(diǎn),用來實(shí)例化該對象 * * @return 該類唯一的一個(gè)實(shí)例 */ public static ServiceMenu getInstance() { if (menu == null) { menu = new ServiceMenu(); } return menu; }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -