jCheckBoxMenuItem_AdminWindow.setText("Admin Window"); jCheckBoxMenuItem_AdminWindow.setEnabled(false); jMenu_Window.add(jCheckBoxMenuItem_AdminWindow); jCheckBoxMenuItem_SpeakerWindow.setText("Speaker Window"); jCheckBoxMenuItem_SpeakerWindow.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
"workbench.menu.view", "View")); viewMenu.setMnemonic(KeyEvent.VK_V); viewXmlMenuItem.setText( getResourceConverter().getString( "workbench.menu.viewXML", "View XML")); toolsMenu.add(preferencesMenuItem); requireSchemaCheckboxMenuItem.setText( getResourceConverter().getString( "workbench.menu.requireSchema", "Require Schema"));
ButtonGroup buttonGroup = new ButtonGroup(); for(String s : portTab){ JCheckBoxMenuItem checkBoxMenuItem = new JCheckBoxMenuItem(); checkBoxMenuItem.setText(s); buttonGroup.add(checkBoxMenuItem); checkBoxMenuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { //TODO } }); }
private JCheckBoxMenuItem getMenuViewImage() { if (menuViewImage == null) { menuViewImage = new JCheckBoxMenuItem(); menuViewImage.setText(Constant.messages.getString("menu.view.enableImage")); // ZAP: i18n menuViewImage.addItemListener(new java.awt.event.ItemListener() { @Override public void itemStateChanged(java.awt.event.ItemEvent e) { getModel().getOptionsParam().getViewParam().setProcessImages(getMenuViewImage().getState() ? 1 : 0); } }); } return menuViewImage; }
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; }
@Override public void setText( String text ) { if ( text != null ) { final TextWithMnemonic twm = new TextWithMnemonic( text ); if ( twm.hasMnemonic() ) { text = twm.text; setMnemonic( twm.mnemonic ); } } super.setText( text ); }
jCheckBoxMenuItem1.setText("jCheckBoxMenuItem1");
public static void showColumnSelectionPopup(ColumnSelectionModel[] columns, Component c) { JPopupMenu popup = new JPopupMenu(); for (int col = 0; col < columns.length; col++) { final ColumnSelectionModel column = columns[col]; final JCheckBoxMenuItem checkBox = new JCheckBoxMenuItem(); checkBox.setText(column.getName()); checkBox.setSelected(column.isSelected()); checkBox.setEnabled(column.isEnabled()); checkBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { column.setSelected(checkBox.isSelected()); } }); popup.add(checkBox); } popup.show(c, 8, 8); }
mStatusVisible.setMnemonic ('S'); mStatusVisible.setSelected (getThumbelina ().getStatusBarVisible ()); mStatusVisible.setText ("Status Bar"); mStatusVisible.setToolTipText ("Show/Hide the status bar."); mView.add (mStatusVisible); mHistoryVisible.setMnemonic ('H'); mHistoryVisible.setSelected (getThumbelina ().getHistoryListVisible ()); mHistoryVisible.setText ("History List"); mHistoryVisible.setToolTipText ("Show/Hide the history list."); mView.add (mHistoryVisible);
fromSelectedMenuItem.addActionListener((ActionListener) WeakListeners.create( ActionListener.class, this, fromSelectedMenuItem)); fromSelectedMenuItem.setText(NbBundle.getMessage(SearchFieldPanel.class, "LBL_SearchField_StartFromSelected")); regexMenuItem.addActionListener((ActionListener) WeakListeners.create( ActionListener.class, this, regexMenuItem)); regexMenuItem.setText(NbBundle.getMessage(SearchFieldPanel.class, "LBL_SearchField_RegularExpression"));
private void populateMenu() { menu.removeAll(); List<TileServer> tileServers = availableOverlaysModel.getItems(); for(TileServer tileServer : tileServers) { JCheckBoxMenuItem item = new JCheckBoxMenuItem(); item.setAction(new ToggleOverlayAction(appliedOverlaysModel, tileServer)); item.setState(appliedOverlaysModel.contains(tileServer)); item.setText(tileServer.getId()); item.setToolTipText(tileServer.getDescription()); menu.add(item); } menu.setEnabled(tileServers.size() > 0); } }
options.setToolTipText("Bean settings"); mLinks.setMnemonic('L'); mLinks.setText("Links"); mLinks.setToolTipText("show/hide links in text"); mLinks.setName("Links"); mCollapse.setText("Collapse"); mCollapse.setToolTipText("collapse/retain whitespace sequences"); mCollapse.setName("Collapse"); mNobreak.setText("Non-breaking Spaces"); mNobreak.setToolTipText("replace/retain non-breaking spaces"); mNobreak.setName("Nobreak");
public final JMenuItem addMenuItem(final String _s, final String _cmd, final boolean _enabled, final boolean _value) { // BuIcon icon=BuLib.loadCommandIcon(_cmd); final JCheckBoxMenuItem r = new JCheckBoxMenuItem(); r.setName("cb" + _cmd); r.setActionCommand(_cmd); r.setText(_s); // r.setIcon(icon); r.setHorizontalTextPosition(SwingConstants.RIGHT); r.addActionListener(this); r.setEnabled(_enabled); r.setSelected(_value); this.add(r); return r; }
private JCheckBoxMenuItem getCodonTableMenuItem(AminoAcidManager.CodonTable codonTable) { JCheckBoxMenuItem item = new JCheckBoxMenuItem(); String fullName = codonTable.getDisplayName(); String shortName = fullName; if (fullName.length() > 40) { shortName = fullName.substring(0, 37) + "..."; item.setToolTipText(fullName); } item.setText(shortName); final AminoAcidManager.CodonTableKey curKey = codonTable.getKey(); item.setSelected(curKey.equals(AminoAcidManager.getInstance().getCodonTable().getKey())); item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { AminoAcidManager.getInstance().setCodonTable(curKey); repaint(); } }); return item; }
signInAtLoginMenu.setText(Res.getString("menuitem.sign.in.at.login")); signInAtLoginMenu.addActionListener( actionEvent -> TransportUtils.setAutoJoin(transport.getXMPPServiceDomain(), signInAtLoginMenu.isSelected()) );
public void addToggleAction(String category, String name, String description, String tooltip, Icon icon, final Predicate predicate, boolean initialValue) { final JCheckBoxMenuItem checkBox = MenuBar.makeMenuItem(name, JCheckBoxMenuItem.class); checkBox.setIcon(icon); checkBox.setText(description); checkBox.setToolTipText(tooltip); checkBox.setSelected(initialValue); checkBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { predicate.set(checkBox.isSelected()); } }); addItem(category, checkBox); }
checkboxMenuItem.setEnabled(table.isColumnDisplayable(c)); checkboxMenuItem.setText(c.getLabel());
private void init() { jMenuItemZoom.setText(Messages.getString("PopUpMenuOnZoom.hide")); //$NON-NLS-1$ jMenuItemZoom.addActionListener(e -> zoomWin.hideZoom()); jCheckBoxMenuItemDraw.setText(Messages.getString("PopUpMenuOnZoom.showDraw")); //$NON-NLS-1$ jCheckBoxMenuItemDraw.addActionListener(e -> { zoomWin.setActionInView(ActionW.DRAWINGS.cmd(), jCheckBoxMenuItemDraw.isSelected()); jCheckBoxMenutemSychronize.setText(Messages.getString("PopUpMenuOnZoom.synch")); //$NON-NLS-1$ jCheckBoxMenutemSychronize.addActionListener(e -> { zoomWin.setActionInView(ZoomWin.SYNCH_CMD, jCheckBoxMenutemSychronize.isSelected());
final JCheckBoxMenuItem menuEntry=new JCheckBoxMenuItem(); profileSelector.add(menuEntry); menuEntry.setText(df.getName()); if (oldDiagramFilter!=null && df.equals(oldDiagramFilter)){ defaultMenuEntry=menuEntry;