本文整理汇总了Java中javax.swing.JMenu.setOpaque方法的典型用法代码示例。如果您正苦于以下问题:Java JMenu.setOpaque方法的具体用法?Java JMenu.setOpaque怎么用?Java JMenu.setOpaque使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JMenu
的用法示例。
在下文中一共展示了JMenu.setOpaque方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildGameMenu
import javax.swing.JMenu; //导入方法依赖的package包/类
private void buildGameMenu() {
// --> Game
JMenu menu = Utility.localizedMenu("menuBar.game");
menu.setOpaque(false);
menu.setMnemonic(KeyEvent.VK_G);
menu.add(getMenuItem(NewAction.id));
menu.add(getMenuItem(NewEmptyMapAction.id));
menu.addSeparator();
menu.add(getMenuItem(OpenAction.id));
menu.add(getMenuItem(SaveAction.id));
menu.add(getMenuItem(StartMapAction.id));
menu.addSeparator();
menu.add(getMenuItem(PreferencesAction.id));
menu.addSeparator();
menu.add(getMenuItem(ShowMainAction.id));
menu.add(getMenuItem(QuitAction.id));
add(menu);
}
示例2: buildViewMenu
import javax.swing.JMenu; //导入方法依赖的package包/类
private void buildViewMenu() {
// --> View
JMenu menu = Utility.localizedMenu("menuBar.view");
menu.setOpaque(false);
menu.setMnemonic(KeyEvent.VK_V);
menu.add(getCheckBoxMenuItem(MapControlsAction.id));
menu.add(getCheckBoxMenuItem(DisplayGridAction.id));
menu.add(getCheckBoxMenuItem(ChangeWindowedModeAction.id));
menu.addSeparator();
ButtonGroup tileTextGroup = new ButtonGroup();
for (DisplayText type : DisplayText.values()) {
menu.add(getRadioButtonMenuItem(DisplayTileTextAction.id + type.getKey(),
tileTextGroup));
}
menu.addSeparator();
menu.add(getMenuItem(ZoomInAction.id));
menu.add(getMenuItem(ZoomOutAction.id));
add(menu);
}
示例3: buildToolsMenu
import javax.swing.JMenu; //导入方法依赖的package包/类
private void buildToolsMenu() {
// --> Tools
JMenu menu = Utility.localizedMenu("menuBar.tools");
menu.setOpaque(false);
menu.setMnemonic(KeyEvent.VK_T);
menu.add(getMenuItem(ScaleMapAction.id));
menu.add(getMenuItem(DetermineHighSeasAction.id));
add(menu);
}
示例4: buildColopediaMenu
import javax.swing.JMenu; //导入方法依赖的package包/类
protected void buildColopediaMenu() {
// --> Colopedia
JMenu menu = Utility.localizedMenu("menuBar.colopedia");
menu.setOpaque(false);
menu.setMnemonic(KeyEvent.VK_C);
for (PanelType type : PanelType.values()) {
menu.add(getMenuItem(ColopediaAction.id + type.getKey()));
}
menu.addSeparator();
menu.add(getMenuItem(AboutAction.id));
add(menu);
}
示例5: buildGameMenu
import javax.swing.JMenu; //导入方法依赖的package包/类
private void buildGameMenu() {
// --> Game
JMenu menu = Utility.localizedMenu("menuBar.game");
menu.setOpaque(false);
menu.setMnemonic(KeyEvent.VK_G);
menu.add(getMenuItem(NewAction.id));
menu.add(getMenuItem(OpenAction.id));
menu.add(getMenuItem(SaveAction.id));
menu.addSeparator();
menu.add(getMenuItem(PreferencesAction.id));
menu.add(getMenuItem(ReconnectAction.id));
menu.addSeparator();
menu.add(getMenuItem(ChatAction.id));
menu.add(getMenuItem(DeclareIndependenceAction.id));
menu.add(getMenuItem(EndTurnAction.id));
menu.addSeparator();
menu.add(getMenuItem(ShowMainAction.id));
menu.add(getMenuItem(ReportHighScoresAction.id));
menu.add(getMenuItem(RetireAction.id));
menu.add(getMenuItem(SaveAndQuitAction.id));
menu.add(getMenuItem(QuitAction.id));
add(menu);
}
示例6: buildViewMenu
import javax.swing.JMenu; //导入方法依赖的package包/类
private void buildViewMenu() {
// --> View
JMenu menu = Utility.localizedMenu("menuBar.view");
menu.setOpaque(false);
menu.setMnemonic(KeyEvent.VK_V);
menu.add(getCheckBoxMenuItem(MapControlsAction.id));
menu.add(getCheckBoxMenuItem(DisplayGridAction.id));
menu.add(getCheckBoxMenuItem(DisplayBordersAction.id));
menu.add(getMenuItem(ToggleViewModeAction.id));
menu.add(getCheckBoxMenuItem(ChangeWindowedModeAction.id));
menu.addSeparator();
ButtonGroup group = new ButtonGroup();
for (DisplayText type : DisplayText.values()) {
menu.add(getRadioButtonMenuItem(DisplayTileTextAction.id
+ type.getKey(), group));
}
menu.addSeparator();
menu.add(getMenuItem(ZoomInAction.id));
menu.add(getMenuItem(ZoomOutAction.id));
menu.add(getMenuItem(CenterAction.id));
menu.add(getMenuItem(TilePopupAction.id));
menu.addSeparator();
menu.add(getMenuItem(EuropeAction.id));
menu.add(getMenuItem(TradeRouteAction.id));
menu.add(getMenuItem(FindSettlementAction.id));
add(menu);
}
示例7: buildReportMenu
import javax.swing.JMenu; //导入方法依赖的package包/类
private void buildReportMenu() {
// --> Report
JMenu menu = Utility.localizedMenu("menuBar.report");
menu.setOpaque(false);
menu.setMnemonic(KeyEvent.VK_R);
menu.add(getMenuItem(ReportReligionAction.id));
menu.add(getMenuItem(ReportLabourAction.id));
menu.add(getMenuItem(ReportColonyAction.id));
menu.add(getMenuItem(ReportForeignAction.id));
menu.add(getMenuItem(ReportIndianAction.id));
menu.add(getMenuItem(ReportContinentalCongressAction.id));
menu.add(getMenuItem(ReportMilitaryAction.id));
menu.add(getMenuItem(ReportNavalAction.id));
menu.add(getMenuItem(ReportTradeAction.id));
menu.add(getMenuItem(ReportTurnAction.id));
menu.add(getMenuItem(ReportRequirementsAction.id));
menu.add(getMenuItem(ReportCargoAction.id));
menu.add(getMenuItem(ReportExplorationAction.id));
menu.add(getMenuItem(ReportHistoryAction.id));
menu.add(getMenuItem(ReportProductionAction.id));
menu.add(getMenuItem(ReportEducationAction.id));
menu.add(getMenuItem(ShowDifficultyAction.id));
menu.add(getMenuItem(ShowGameOptionsAction.id));
menu.add(getMenuItem(ShowMapGeneratorOptionsAction.id));
add(menu);
}
示例8: buildOrdersMenu
import javax.swing.JMenu; //导入方法依赖的package包/类
private void buildOrdersMenu() {
// --> Orders
JMenu menu = Utility.localizedMenu("menuBar.orders");
menu.setOpaque(false);
menu.setMnemonic(KeyEvent.VK_O);
menu.add(getMenuItem(SentryAction.id));
menu.add(getMenuItem(FortifyAction.id));
menu.addSeparator();
menu.add(getMenuItem(GotoAction.id));
menu.add(getMenuItem(GotoTileAction.id));
menu.add(getMenuItem(ExecuteGotoOrdersAction.id));
menu.add(getMenuItem(AssignTradeRouteAction.id));
menu.addSeparator();
menu.add(getMenuItem(BuildColonyAction.id));
// Insert all Improvements here:
for (TileImprovementType type : freeColClient.getGame().getSpecification()
.getTileImprovementTypeList()) {
if (!type.isNatural()) {
menu.add(getMenuItem(type.getSuffix() + "Action"));
}
}
menu.addSeparator();
menu.add(getMenuItem(LoadAction.id));
menu.add(getMenuItem(UnloadAction.id));
menu.addSeparator();
menu.add(getMenuItem(WaitAction.id));
menu.add(getMenuItem(SkipUnitAction.id));
menu.add(getMenuItem(ChangeAction.id));
menu.addSeparator();
menu.add(getMenuItem(ClearOrdersAction.id));
menu.add(getMenuItem(RenameAction.id));
menu.add(getMenuItem(DisbandUnitAction.id));
add(menu);
}