当前位置: 首页>>代码示例>>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;未经允许,请勿转载。