當前位置: 首頁>>代碼示例>>Java>>正文


Java MenuBar.setHelpMenu方法代碼示例

本文整理匯總了Java中java.awt.MenuBar.setHelpMenu方法的典型用法代碼示例。如果您正苦於以下問題:Java MenuBar.setHelpMenu方法的具體用法?Java MenuBar.setHelpMenu怎麽用?Java MenuBar.setHelpMenu使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.awt.MenuBar的用法示例。


在下文中一共展示了MenuBar.setHelpMenu方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: test3

import java.awt.MenuBar; //導入方法依賴的package包/類
private static void test3(final MenuBar menuBar) {
    final Menu helpMenu1 = new Menu("Help Menu1");
    final Menu helpMenu2 = new Menu("Help Menu2");
    menuBar.setHelpMenu(helpMenu1);
    checkCurrentMenu(menuBar, helpMenu1);
    checkMenuCount(menuBar, 1);
    checkHelpMenu(helpMenu1, true);
    checkHelpMenu(helpMenu2, false);

    menuBar.setHelpMenu(helpMenu2);
    checkCurrentMenu(menuBar, helpMenu2);
    checkMenuCount(menuBar, 1);
    checkHelpMenu(helpMenu1, false);
    checkHelpMenu(helpMenu2, true);

    menuBar.remove(helpMenu2);
    checkCurrentMenu(menuBar, null);
    checkMenuCount(menuBar, 0);
    checkHelpMenu(helpMenu1, false);
    checkHelpMenu(helpMenu2, false);
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:22,代碼來源:RemoveHelpMenu.java

示例2: test2

import java.awt.MenuBar; //導入方法依賴的package包/類
private static void test2(final MenuBar menuBar) {
    final Menu helpMenu = new Menu("Help Menu");
    menuBar.setHelpMenu(helpMenu);
    checkCurrentMenu(menuBar, helpMenu);
    checkMenuCount(menuBar, 1);
    checkHelpMenu(helpMenu, true);

    menuBar.remove(helpMenu);
    checkCurrentMenu(menuBar, null);
    checkMenuCount(menuBar, 0);
    checkHelpMenu(helpMenu, false);
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:13,代碼來源:RemoveHelpMenu.java

示例3: test4

import java.awt.MenuBar; //導入方法依賴的package包/類
private static void test4(final MenuBar menuBar) {
    final Menu helpMenu = new Menu("Help Menu");
    menuBar.setHelpMenu(helpMenu);
    checkCurrentMenu(menuBar, helpMenu);
    checkMenuCount(menuBar, 1);
    checkHelpMenu(helpMenu, true);

    menuBar.setHelpMenu(null);
    checkCurrentMenu(menuBar, null);
    checkMenuCount(menuBar, 0);
    checkHelpMenu(helpMenu, false);
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:13,代碼來源:RemoveHelpMenu.java

示例4: PartnerFrame

import java.awt.MenuBar; //導入方法依賴的package包/類
public PartnerFrame (String name, boolean serving)
{
	super(name);
	JPanel p = new MyPanel();
	Serving = serving;
	MenuBar menu = new MenuBar();
	setMenuBar(menu);
	Menu help = new MyMenu(Global.resourceString("Help"));
	help.add(new MenuItemAction(this, Global
		.resourceString("Partner_Connection")));
	menu.setHelpMenu(help);
	p.setLayout(new BorderLayout());
	p
		.add(
			"Center",
			Output = Global.getParameter("systemviewer", false)?new SystemViewer()
				:new Viewer());
	Output.setFont(Global.Monospaced);
	p.add("South", Input = new HistoryTextField(this, "Input"));
	add("Center", p);
	JPanel p1 = new MyPanel();
	p1.add(new ButtonAction(this, Global.resourceString("Game")));
	p1.add(new ButtonAction(this, Global.resourceString("Restore_Game")));
	add("South", new Panel3D(p1));
	PGF = null;
	Block = false;
	Dir = "";
	Moves = new ListClass();
	seticon("iconn.gif");
}
 
開發者ID:Zenigata,項目名稱:jago,代碼行數:31,代碼來源:PartnerFrame.java

示例5: ChannelDialog

import java.awt.MenuBar; //導入方法依賴的package包/類
public ChannelDialog (ConnectionFrame cf, PrintWriter out, int n,
	ChannelDistributor mdis)
{
	super(Global.resourceString("Channel"));
	CF = cf;
	MDis = mdis;
	N = n;
	CF.addCloseListener(this);
	setLayout(new BorderLayout());
	MenuBar M = new MenuBar();
	Menu help = new MyMenu(Global.resourceString("Help"));
	help.add(new MenuItem(Global.resourceString("Channels")));
	M.setHelpMenu(help);
	add("North", new MyLabel(Global.resourceString("Channel_") + n));
	MyPanel pm = new MyPanel();
	pm.setLayout(new BorderLayout());
	pm.add("Center", T = new MyTextArea("", 0, 0,
		TextArea.SCROLLBARS_VERTICAL_ONLY));
	pm.add("South", Answer = new HistoryTextField(this, "Answer"));
	add("Center", pm);
	MyPanel pb = new MyPanel();
	pb.add(new ButtonAction(this, Global.resourceString("Close")));
	add("South", new Panel3D(pb));
	Out = out;
	seticon("iwho.gif");
	Global.setwindow(this, "channeldialog", 500, 400);
	validate();
	show();
}
 
開發者ID:Zenigata,項目名稱:jago,代碼行數:30,代碼來源:ChannelDialog.java


注:本文中的java.awt.MenuBar.setHelpMenu方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。