protected JCheckBoxMenuItem createMenuItem(LogLevel level) { JCheckBoxMenuItem result = new JCheckBoxMenuItem(level.toString()); result.setSelected(true); result.setMnemonic(level.toString().charAt(0)); result.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { _table.getFilteredLogTableModel().refresh(); updateStatusLabel(); } }); return result; }
protected JCheckBoxMenuItem createLogTableColumnMenuItem(LogTableColumn column) { JCheckBoxMenuItem result = new JCheckBoxMenuItem(column.toString()); result.setSelected(true); result.setMnemonic(column.toString().charAt(0)); result.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // update list of columns and reset the view List selectedColumns = updateView(); _table.setView(selectedColumns); } }); return result; }
holdPriorityMenuItem.setMnemonic(KeyEvent.VK_P); holdPriorityMenuItem.setToolTipText("<html>Hold priority after casting a spell or activating an ability, instead of automatically passing priority."); popupMenu.add(holdPriorityMenuItem); manaPoolMenuItem1.setMnemonic(KeyEvent.VK_A); manaPoolMenuItem1.setToolTipText("<html>If not active, produced mana goes only to the mana pool<br>" + "and you have to click the type of mana you want to use <br>" manaPoolMenuItem2.setMnemonic(KeyEvent.VK_N); manaPoolMenuItem2.setToolTipText("<html>Mana that is already in the mana pool as you start casting a spell or activating an ability<br>" + " needs to be payed manually. So you use the mana in the pool only by clicking on the related<br>" useFirstManaAbilityItem.setMnemonic(KeyEvent.VK_F); useFirstManaAbilityItem.setToolTipText("<html>Use the first mana ability when<br>" + " tapping lands for mana<br>" } else { allowViewHandCardsMenuItem = new JCheckBoxMenuItem("Allow requests to show from other users", allowRequestToShowHandCards); allowViewHandCardsMenuItem.setMnemonic(KeyEvent.VK_A); allowViewHandCardsMenuItem.setToolTipText("If activated watchers or other players can request to see your hand cards. If you grant this to a user, it's valid for the complete match."); handCardsMenu.add(allowViewHandCardsMenuItem);
/** * Creates the popup menu. */ private void createPopupMenu() { ResourceBundle msg = ResourceBundle.getBundle(MSG); popupMenu = new JPopupMenu(); String temp = msg.getString("PopupMenu.LockToolbar.txt"); AbstractAction lockAction = new LockAction(temp); JCheckBoxMenuItem lockMenuItem = new JCheckBoxMenuItem(lockAction); lockMenuItem.setMnemonic(KeyEvent.VK_L); popupMenu.add(lockMenuItem); popupMenu.addSeparator(); temp = msg.getString("PopupMenu.AddRemoveButtons.txt"); addRemoveMenu = new JMenu(temp); addRemoveMenu.setMnemonic(KeyEvent.VK_A); populateAddRemovePopupMenu(msg); popupMenu.add(addRemoveMenu); }
protected JCheckBoxMenuItem createMenuItem(LogLevel level) { JCheckBoxMenuItem result = new JCheckBoxMenuItem(level.toString()); result.setSelected(true); result.setMnemonic(level.toString().charAt(0)); result.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { _table.getFilteredLogTableModel().refresh(); updateStatusLabel(); } }); return result; }
protected JCheckBoxMenuItem createMenuItem(LogLevel level) { JCheckBoxMenuItem result = new JCheckBoxMenuItem(level.toString()); result.setSelected(true); result.setMnemonic(level.toString().charAt(0)); result.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { _table.getFilteredLogTableModel().refresh(); updateStatusLabel(); } }); return result; }
protected JCheckBoxMenuItem createLogTableColumnMenuItem(LogTableColumn column) { JCheckBoxMenuItem result = new JCheckBoxMenuItem(column.toString()); result.setSelected(true); result.setMnemonic(column.toString().charAt(0)); result.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // update list of columns and reset the view List selectedColumns = updateView(); _table.setView(selectedColumns); } }); return result; }
protected JCheckBoxMenuItem createLogTableColumnMenuItem(LogTableColumn column) { JCheckBoxMenuItem result = new JCheckBoxMenuItem(column.toString()); result.setSelected(true); result.setMnemonic(column.toString().charAt(0)); result.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // update list of columns and reset the view List selectedColumns = updateView(); _table.setView(selectedColumns); } }); return result; }
public JCheckBoxMenuItem getOptionsShowRankingCheckBoxMenuItem() { if (optionsShowRankingCheckBoxMenuItem == null) { optionsShowRankingCheckBoxMenuItem = new JCheckBoxMenuItem(); optionsShowRankingCheckBoxMenuItem.setText("Show current rankings"); optionsShowRankingCheckBoxMenuItem.setMnemonic('r'); optionsShowRankingCheckBoxMenuItem.setDisplayedMnemonicIndex(13); optionsShowRankingCheckBoxMenuItem.addActionListener(eventHandler); optionsShowRankingCheckBoxMenuItem.setEnabled(false); } return optionsShowRankingCheckBoxMenuItem; }
public static void addGlobalSoundSwitchMenu(final JMenu parentMenu) { final JCheckBoxMenuItem soundCheckBox = new JCheckBoxMenuItem("Enable Sound"); soundCheckBox.setMnemonic(KeyEvent.VK_N); soundCheckBox.setSelected(!ClipPlayer.getBeSilent()); soundCheckBox.addActionListener(e -> ClipPlayer.setBeSilent(!soundCheckBox.isSelected())); parentMenu.add(soundCheckBox); } }
this.displayMetsXmlJCheckboxMenuItem.setMnemonic(KeyEvent.VK_E); this.displayMetsXmlJCheckboxMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, ActionEvent.CTRL_MASK)); this.metadataJMenu.add(this.displayMetsXmlJCheckboxMenuItem);
cbMi.setMnemonic( KeyEvent.VK_C); menuOtro.add( cbMi); cbMi.setMnemonic( KeyEvent.VK_B); cbMi.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_B, ActionEvent.CTRL_MASK)); menuOtro.add( cbMi); cbMi.setMnemonic( KeyEvent.VK_R); menuOtro.add( cbMi); cbMi.setMnemonic( KeyEvent.VK_M); cbMi.setAccelerator( KeyStroke.getKeyStroke( KeyEvent.VK_M, ActionEvent.CTRL_MASK)); menuOtro.add( cbMi);
notificationMenu.setText("User Notifications"); final JCheckBoxMenuItem showEndOfTurnReport = new JCheckBoxMenuItem("Show End of Turn Report"); showEndOfTurnReport.setMnemonic(KeyEvent.VK_R); final JCheckBoxMenuItem showTriggeredNotifications = new JCheckBoxMenuItem("Show Triggered Notifications"); showTriggeredNotifications.setMnemonic(KeyEvent.VK_T); final JCheckBoxMenuItem showTriggerChanceSuccessful = new JCheckBoxMenuItem("Show Trigger/Condition Chance Roll Successful"); showTriggerChanceSuccessful.setMnemonic(KeyEvent.VK_S); final JCheckBoxMenuItem showTriggerChanceFailure = new JCheckBoxMenuItem("Show Trigger/Condition Chance Roll Failure"); showTriggerChanceFailure.setMnemonic(KeyEvent.VK_F); notificationMenu.addMenuListener(new MenuListener() { @Override
private void addLockMap() { final JCheckBoxMenuItem lockMapBox = new JCheckBoxMenuItem("Lock Map"); lockMapBox.setMnemonic(KeyEvent.VK_M); lockMapBox.setSelected(uiContext.getLockMap()); lockMapBox.addActionListener(e -> uiContext.setLockMap(lockMapBox.isSelected())); add(lockMapBox); }
private void addTabbedProduction() { final JCheckBoxMenuItem tabbedProduction = new JCheckBoxMenuItem("Show Production Tabs"); tabbedProduction.setMnemonic(KeyEvent.VK_P); tabbedProduction.setSelected(PurchasePanel.isTabbedProduction()); tabbedProduction.addActionListener(e -> PurchasePanel.setTabbedProduction(tabbedProduction.isSelected())); add(tabbedProduction); }
private void addShowTerritoryEffects() { final JCheckBoxMenuItem territoryEffectsBox = new JCheckBoxMenuItem("Show TerritoryEffects"); territoryEffectsBox.setMnemonic(KeyEvent.VK_T); territoryEffectsBox.addActionListener(e -> { final boolean tfselected = territoryEffectsBox.isSelected(); uiContext.setShowTerritoryEffects(tfselected); frame.getMapPanel().resetMap(); }); add(territoryEffectsBox); territoryEffectsBox.setSelected(true); }
private void addChatTimeMenu() { final JCheckBoxMenuItem chatTimeBox = new JCheckBoxMenuItem("Show Chat Times"); chatTimeBox.setMnemonic(KeyEvent.VK_T); chatTimeBox.addActionListener(e -> frame.setShowChatTime(chatTimeBox.isSelected())); chatTimeBox.setSelected(false); add(chatTimeBox); chatTimeBox.setEnabled(frame.hasChat()); }
private void addShowUnits() { final JCheckBoxMenuItem showUnitsBox = new JCheckBoxMenuItem("Show Units"); showUnitsBox.setMnemonic(KeyEvent.VK_U); showUnitsBox.setSelected(true); showUnitsBox.addActionListener(e -> { final boolean tfselected = showUnitsBox.isSelected(); uiContext.setShowUnits(tfselected); frame.getMapPanel().resetMap(); }); add(showUnitsBox); }
private void addShowMapDetails() { showMapDetails = new JCheckBoxMenuItem("Show Map Details"); showMapDetails.setMnemonic(KeyEvent.VK_D); showMapDetails.setSelected(TileImageFactory.getShowReliefImages()); showMapDetails.addActionListener(e -> { if (TileImageFactory.getShowReliefImages() == showMapDetails.isSelected()) { return; } TileImageFactory.setShowReliefImages(showMapDetails.isSelected()); new Thread(() -> frame.getMapPanel().updateCountries(gameData.getMap().getTerritories()), "Triplea : Show map details thread").start(); }); add(showMapDetails); }
private void addShowMapBlends() { showMapBlends = new JCheckBoxMenuItem("Show Map Blends"); showMapBlends.setMnemonic(KeyEvent.VK_B); if (uiContext.getMapData().getHasRelief() && showMapDetails.isEnabled() && showMapDetails.isSelected()) { showMapBlends.setEnabled(true); showMapBlends.setSelected(TileImageFactory.getShowMapBlends()); } else { showMapBlends.setSelected(false); showMapBlends.setEnabled(false); } showMapBlends.addActionListener(e -> { if (TileImageFactory.getShowMapBlends() == showMapBlends.isSelected()) { return; } TileImageFactory.setShowMapBlends(showMapBlends.isSelected()); TileImageFactory.setShowMapBlendMode(uiContext.getMapData().getMapBlendMode()); TileImageFactory.setShowMapBlendAlpha(uiContext.getMapData().getMapBlendAlpha()); new Thread(() -> { frame.setScale(uiContext.getScale() * 100); frame.getMapPanel().updateCountries(gameData.getMap().getTerritories()); }, "Triplea : Show map Blends thread").start(); }); add(showMapBlends); }