javax.swing.JCheckBox.setFocusable()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(11.8k)|赞(0)|评价(0)|浏览(174)

本文整理了Java中javax.swing.JCheckBox.setFocusable()方法的一些代码示例,展示了JCheckBox.setFocusable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.setFocusable()方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:setFocusable

JCheckBox.setFocusable介绍

暂无

代码示例

代码示例来源:origin: 4thline/cling

  1. fullscreenCheckbox.setFocusable(false);
  2. statusIconPanel.add(fullscreenCheckbox);

代码示例来源:origin: plantuml/plantuml

  1. zoomFitButt.setFocusable(false);
  2. zoomFitButt.addActionListener(new ActionListener() {
  3. public void actionPerformed(ActionEvent ae) {
  4. widthFitButt.setFocusable(false);
  5. widthFitButt.addActionListener(new ActionListener() {
  6. public void actionPerformed(ActionEvent ae) {

代码示例来源:origin: ron190/jsql-injection

  1. this.checkboxIsTamperingBase64.setFocusable(false);
  2. JButton labelIsTamperingBase64 = new JButton("Encode SQL expression to Base64");
  3. labelIsTamperingBase64.setToolTipText(tooltipIsTamperingBase64);
  4. this.checkboxIsTamperingFunctionComment.setFocusable(false);
  5. JButton labelIsTamperingFunctionComment = new JButton("Add comment to function signature, e.g concat/**/()");
  6. labelIsTamperingFunctionComment.setToolTipText(tooltipIsTamperingFunctionComment);
  7. this.checkboxIsTamperingEqualToLike.setFocusable(false);
  8. JButton labelIsTamperingEqualToLike = new JButton("Replace equal sign '=' with 'like'");
  9. labelIsTamperingEqualToLike.setToolTipText(tooltipIsTamperingEqualToLike);
  10. this.checkboxIsTamperingRandomCase.setFocusable(false);
  11. JButton labelIsTamperingRandomCase = new JButton("Transform SQL keywords to random case");
  12. labelIsTamperingRandomCase.setToolTipText(tooltipIsTamperingRandomCase);
  13. this.checkboxIsTamperingEval.setFocusable(false);
  14. LightScrollPane textAreaIsTamperingEval = new LightScrollPane(new JPopupTextArea(new JTextAreaPlaceholder("Eval")).getProxy());
  15. textAreaIsTamperingEval.setBorder(HelperUi.BORDER_FOCUS_LOST);
  16. this.checkboxIsTamperingVersionComment.setFocusable(false);
  17. JButton labelIsTamperingVersionComment = new JButton("Transform SQL keywords to versioned comment, e.g /*!concat*/()");
  18. labelIsTamperingVersionComment.setToolTipText(tooltipIsTamperingVersionComment);
  19. this.checkboxIsCheckingUpdate.setFocusable(false);
  20. JButton labelIsCheckingUpdate = new JButton("Check update at startup");
  21. labelIsCheckingUpdate.addActionListener(actionEvent -> {
  22. this.checkboxIsReportingBugs.setFocusable(false);

代码示例来源:origin: magefree/mage

  1. chkPennyDreadful.setFocusable(false);
  2. chkPennyDreadful.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
  3. chkPennyDreadful.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  4. chkPiles.setFocusable(false);
  5. chkPiles.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
  6. chkPiles.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  7. chkNames.setText("Names");
  8. chkNames.setToolTipText("Search in card names.");
  9. chkNames.setFocusable(false);
  10. chkNames.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
  11. chkNames.setMaximumSize(new java.awt.Dimension(67, 16));
  12. chkTypes.setText("Types");
  13. chkTypes.setToolTipText("Search in card types.");
  14. chkTypes.setFocusable(false);
  15. chkTypes.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
  16. chkTypes.setMaximumSize(new java.awt.Dimension(63, 16));
  17. chkRules.setText("Rules");
  18. chkRules.setToolTipText("Search in card rules.");
  19. chkRules.setFocusable(false);
  20. chkRules.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
  21. chkRules.setMaximumSize(new java.awt.Dimension(59, 16));
  22. chkUnique.setText("Unique");
  23. chkUnique.setToolTipText("Show only the first found card of every card name.");
  24. chkUnique.setFocusable(false);

代码示例来源:origin: antlr/antlrworks

  1. public JCheckBox createBreakButton(String title) {
  2. JCheckBox button = new JCheckBox(title);
  3. button.setFocusable(false);
  4. button.addActionListener(new ActionListener() {
  5. public void actionPerformed(ActionEvent e) {
  6. /** Select 'All' if no events are selected */
  7. if(getBreakEvent().isEmpty()) {
  8. breakAllButton.setSelected(true);
  9. AWPrefs.getPreferences().setBoolean(AWPrefs.PREF_DEBUG_BREAK_ALL, true);
  10. }
  11. }
  12. });
  13. return button;
  14. }

代码示例来源:origin: antlr/antlrworks

  1. private JCheckBox createShowNFAButton() {
  2. JCheckBox button = new JCheckBox("NFA");
  3. button.setFocusable(false);
  4. button.setSelected(context.skin instanceof NFASkin);
  5. button.addActionListener(new ActionListener() {
  6. public void actionPerformed(ActionEvent event) {
  7. StatisticsAW.shared().recordEvent(StatisticsAW.EVENT_TOGGLE_SD_NFA);
  8. JCheckBox button = (JCheckBox)event.getSource();
  9. if(button.isSelected())
  10. context.setSkin(new NFASkin());
  11. else
  12. context.setSkin(new SDSkin());
  13. view.refresh();
  14. }
  15. });
  16. return button;
  17. }

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-modelutil

  1. /** We disable focusing on the component when it is not
  2. * enabled. */
  3. @Override
  4. public void setEnabled(boolean b) {
  5. btn.setFocusable(b);
  6. other.setEnabled(b);
  7. }
  8. /** All these methods simply delegate to the "other" model

代码示例来源:origin: antlr/antlrworks

  1. private JCheckBox createShowRuleNameButton() {
  2. final JCheckBox button = new JCheckBox("Rule Name");
  3. button.setFocusable(false);
  4. button.setSelected(context.isShowRuleName());
  5. button.addActionListener(new ActionListener() {
  6. public void actionPerformed(ActionEvent event) {
  7. context.setShowRuleName(button.isSelected());
  8. view.refresh();
  9. }
  10. });
  11. return button;
  12. }

代码示例来源:origin: SonarSource/sonarlint-intellij

  1. private JPanel createTopPanel() {
  2. autoTrigger = new JCheckBox("Automatically trigger analysis");
  3. autoTrigger.setFocusable(false);
  4. JPanel tickOptions = new JPanel(new VerticalFlowLayout());
  5. tickOptions.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0));
  6. tickOptions.add(autoTrigger);
  7. return tickOptions;
  8. }

代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client

  1. private AbstractWizardPage getVCFImportSettingsPage() throws SQLException, RemoteException {
  2. //setup page
  3. final DefaultWizardPage page = new DefaultWizardPage(PAGENAME_IMPORT) {
  4. @Override
  5. public void setupWizardButtons() {
  6. fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.BACK);
  7. fireButtonEvent(ButtonEvent.HIDE_BUTTON, ButtonNames.FINISH);
  8. fireButtonEvent(ButtonEvent.ENABLE_BUTTON, ButtonNames.NEXT);
  9. }
  10. };
  11. if (modify) {
  12. page.addComponent(new JLabel("<html><b>Warning: Changes to this setting will only affect new VCF Uploads.</b></html>"));
  13. }
  14. // <html> wraps the text around if it doesn't fit.
  15. includeReferenceCheckbox = new JCheckBox("<html>Include all VCF lines, including reference calls." +
  16. "<br/>Highly recommended for pharmacogenetic testing.</html>");
  17. includeReferenceCheckbox.setSelected(false);
  18. includeReferenceCheckbox.setFocusable(false);
  19. page.addComponent(includeReferenceCheckbox);
  20. return page;
  21. }
  22. private AbstractWizardPage getCreatePage() {

代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client

  1. private void initSettingsPanel() {
  2. advancedOptionsPanel = ViewUtil.getWhiteLineBorderedPanel();
  3. advancedOptionsPanel.setLayout(new MigLayout("fillx"));
  4. advancedOptionsPanel.setVisible(false);
  5. //settingsPanel.setOpaque(false);
  6. JLabel l = new JLabel("Advanced Options");
  7. l.setFont(ViewUtil.getMediumTitleFont());
  8. advancedOptionsPanel.add(l, "wrap");
  9. advancedOptionsPanel.add(ViewUtil.getSettingsHeaderLabel("Annotation"), "wrap");
  10. advancedOptionsPanel.add(annovarCheckbox = new JCheckBox("perform gene-based variant annotation"), "wrap");
  11. advancedOptionsPanel.add(phasingCheckbox = new JCheckBox("perform phasing"), "wrap");
  12. annovarCheckbox.setSelected(true);
  13. annovarCheckbox.setFocusable(false);
  14. phasingCheckbox.setSelected(false);
  15. phasingCheckbox.setFocusable(false);
  16. advancedOptionsPanel.add(ViewUtil.getSettingsHeaderLabel("Notifications"), "wrap");
  17. emailPlaceholder = new PlaceHolderTextField();
  18. emailPlaceholder.setPlaceholder("email address");
  19. advancedOptionsPanel.add(ViewUtil.getSettingsHelpLabel("Email notifications are sent upon completion"), "wrap");
  20. advancedOptionsPanel.add(emailPlaceholder, "wrap, growx 1.0");
  21. }

代码示例来源:origin: antlr/antlrworks

  1. private JCheckBox createPathSelectionButton(int pathIndex) {
  2. JCheckBox button = new JCheckBox(String.valueOf(pathIndex+1));
  3. button.setName(String.valueOf(pathIndex));
  4. button.setFocusable(false);
  5. button.addActionListener(new ActionListener() {
  6. public void actionPerformed(ActionEvent event) {
  7. JCheckBox button = (JCheckBox)event.getSource();
  8. GGraphGroup gg = (GGraphGroup)view.getCurrentGraph();
  9. gg.getPathGroup().setPathVisible(Integer.parseInt(button.getName()), button.isSelected());
  10. gg.getPathGroup().makeSureCurrentPathIsVisible();
  11. view.cacheRerender();
  12. view.repaint();
  13. }
  14. });
  15. GGraphGroup gg = (GGraphGroup)view.getCurrentGraph();
  16. button.setSelected(gg.getPathGroup().isPathVisible(pathIndex));
  17. return button;
  18. }

代码示例来源:origin: org.seamless/seamless-swing

  1. checkBox.setFocusable(false);
  2. checkBox.addItemListener(new ItemListener() {
  3. public void itemStateChanged(ItemEvent e) {

代码示例来源:origin: Killerardvark/CryodexSource

  1. togglePolicy.setActionCommand("toggle");
  2. togglePolicy.addActionListener(this);
  3. togglePolicy.setFocusable(false); //Remove it from the focus cycle.

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-bugtracking-commons

  1. machCaseChoice.setFocusable(false);
  2. machCaseChoice.addActionListener(new java.awt.event.ActionListener() {
  3. public void actionPerformed(java.awt.event.ActionEvent evt) {
  4. wholeWordsChoice.setFocusable(false);
  5. wholeWordsChoice.addActionListener(new java.awt.event.ActionListener() {
  6. public void actionPerformed(java.awt.event.ActionEvent evt) {
  7. regularExpressionChoice.setFocusable(false);
  8. regularExpressionChoice.addActionListener(new java.awt.event.ActionListener() {
  9. public void actionPerformed(java.awt.event.ActionEvent evt) {
  10. highlightResultsChoice.setFocusable(false);
  11. highlightResultsChoice.addActionListener(new java.awt.event.ActionListener() {
  12. public void actionPerformed(java.awt.event.ActionEvent evt) {

代码示例来源:origin: MegaMek/mekhq

  1. private JCheckBox createOptionCheckBox(String text, Icon checkboxIcon, Icon checkboxSelectedIcon) {
  2. JCheckBox checkBox = new JCheckBox(text);
  3. checkBox.setOpaque(false);
  4. checkBox.setForeground(new Color(150, 220, 255));
  5. checkBox.setFocusable(false);
  6. checkBox.setFont(checkBox.getFont().deriveFont(Font.BOLD));
  7. checkBox.setPreferredSize(new Dimension(150, 20));
  8. checkBox.setIcon(checkboxIcon);
  9. checkBox.setSelectedIcon(checkboxSelectedIcon);
  10. checkBox.setSelected(false);
  11. checkBox.addActionListener(new ActionListener() {
  12. @Override
  13. public void actionPerformed(ActionEvent e) {
  14. repaint();
  15. }
  16. });
  17. return checkBox;
  18. }

代码示例来源:origin: SonarSource/sonarlint-intellij

  1. enableTelemetryCheckBox.setFocusable(false);
  2. JPanel tickOptions = new JPanel(new VerticalFlowLayout());
  3. tickOptions.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0));

代码示例来源:origin: com.jidesoft/jide-oss

  1. /**
  2. * Creates the match case button. By default it will return a JCheckBox. Subclass class can override it to return
  3. * your own button or customize the button created by default as long as it can set underlying Searchable's
  4. * caseSensitive property.
  5. *
  6. * @return the match case button.
  7. */
  8. protected AbstractButton createMatchCaseButton() {
  9. JCheckBox checkBox = new JCheckBox(getResourceString("SearchableBar.matchCase"));
  10. checkBox.setMnemonic(getResourceString("SearchableBar.matchCase.mnemonic").charAt(0));
  11. checkBox.setRequestFocusEnabled(false);
  12. checkBox.setFocusable(false);
  13. checkBox.setSelected(getSearchable().isCaseSensitive());
  14. checkBox.addItemListener(new ItemListener() {
  15. public void itemStateChanged(ItemEvent e) {
  16. if (e.getSource() instanceof AbstractButton) {
  17. getSearchable().setCaseSensitive(((AbstractButton) e.getSource()).isSelected());
  18. addSearchingTextToHistory(getSearchingText());
  19. highlightAllOrNext();
  20. }
  21. }
  22. });
  23. checkBox.setOpaque(false);
  24. return checkBox;
  25. }

代码示例来源:origin: com.jidesoft/jide-oss

  1. checkBox.setMnemonic(getResourceString("SearchableBar.wholeWords.mnemonic").charAt(0));
  2. checkBox.setRequestFocusEnabled(false);
  3. checkBox.setFocusable(false);
  4. if (getSearchable() instanceof WholeWordsSupport) {
  5. checkBox.setSelected(((WholeWordsSupport) getSearchable()).isWholeWords());

代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client

  1. rememberPasswordCheckbox.setFocusable(false);
  2. panel.add(rememberPasswordCheckbox, "wrap");
  3. autoLoginCheckBox.setFocusable(false);

相关文章

JCheckBox类方法