• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java NonFocusableCheckBox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.ui.NonFocusableCheckBox的典型用法代码示例。如果您正苦于以下问题:Java NonFocusableCheckBox类的具体用法?Java NonFocusableCheckBox怎么用?Java NonFocusableCheckBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NonFocusableCheckBox类属于com.intellij.ui包,在下文中一共展示了NonFocusableCheckBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildOptionCheckBox

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
private static JCheckBox buildOptionCheckBox(final PropertiesComponent propertiesComponent,
                                             final SelectorOption selectorOption) {
    final InnerBuilderOption option = selectorOption.getOption();

    final JCheckBox optionCheckBox = new NonFocusableCheckBox(selectorOption.getCaption());
    optionCheckBox.setMnemonic(selectorOption.getMnemonic());
    optionCheckBox.setToolTipText(selectorOption.getToolTip());

    final String optionProperty = option.getProperty();
    optionCheckBox.setSelected(propertiesComponent.isTrueValue(optionProperty));
    optionCheckBox.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(final ItemEvent event) {
            propertiesComponent.setValue(optionProperty, Boolean.toString(optionCheckBox.isSelected()));
        }
    });
    return optionCheckBox;
}
 
开发者ID:analytically,项目名称:innerbuilder,代码行数:19,代码来源:InnerBuilderOptionSelector.java


示例2: createNorthPanel

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
protected JComponent createNorthPanel() {
  myNameField = new NameSuggestionsField(myProject);

  FormBuilder formBuilder = FormBuilder.createFormBuilder()
    .addLabeledComponent(RefactoringBundle.message("anonymousToInner.class.name.label.text"), myNameField);

  if(!myShowCanBeStatic) {
    myCbMakeStatic = new NonFocusableCheckBox(RefactoringBundle.message("anonymousToInner.make.class.static.checkbox.text"));
    myCbMakeStatic.setSelected(true);
    formBuilder.addComponent(myCbMakeStatic);
  }

  return formBuilder.getPanel();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:AnonymousToInnerDialog.java


示例3: ExtractMethodDialog

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
public ExtractMethodDialog(Project project,
                           PsiClass targetClass, final InputVariables inputVariables, PsiType returnType,
                           PsiTypeParameterList typeParameterList, PsiType[] exceptions, boolean isStatic, boolean canBeStatic,
                           final boolean canBeChainedConstructor,
                           String title,
                           String helpId,
                           Nullness nullness,
                           final PsiElement[] elementsToExtract) {
  super(project, true);
  myProject = project;
  myTargetClass = targetClass;
  myReturnType = returnType;
  myTypeParameterList = typeParameterList;
  myExceptions = exceptions;
  myStaticFlag = isStatic;
  myCanBeStatic = canBeStatic;
  myNullness = nullness;
  myElementsToExtract = elementsToExtract;
  myVariableData = inputVariables;
  myHelpId = helpId;
  mySignature = new MethodSignatureComponent("", project, JavaFileType.INSTANCE);
  mySignature.setPreferredSize(JBUI.size(500, 100));
  mySignature.setMinimumSize(JBUI.size(500, 100));
  setTitle(title);

  myNameField = new NameSuggestionsField(suggestMethodNames(), myProject);
  
  myMakeStatic = new NonFocusableCheckBox();
  myMakeStatic.setText(RefactoringBundle.message("declare.static.checkbox"));
  if (canBeChainedConstructor) {
    myCbChainedConstructor = new NonFocusableCheckBox(RefactoringBundle.message("extract.chained.constructor.checkbox"));
  }

  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:36,代码来源:ExtractMethodDialog.java


示例4: createOccurrencesCb

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
protected void createOccurrencesCb(GridBagConstraints gbConstraints, JPanel panel, final int occurenceNumber) {
  myCbReplaceAllOccurences = new NonFocusableCheckBox();
  myCbReplaceAllOccurences.setText(RefactoringBundle.message("replace.all.occurences", occurenceNumber));

  panel.add(myCbReplaceAllOccurences, gbConstraints);
  myCbReplaceAllOccurences.setSelected(false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:IntroduceParameterSettingsUI.java


示例5: appendOccurrences

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
public void appendOccurrences(ItemListener itemListener, GridBagConstraints gbConstraints, JPanel panel) {
  if (myOccurrencesCount > 1) {
    myCbReplaceAll = new NonFocusableCheckBox();
    myCbReplaceAll.setText(RefactoringBundle.message("replace.all.occurrences.of.expression.0.occurrences", myOccurrencesCount));
    gbConstraints.gridy++;
    panel.add(myCbReplaceAll, gbConstraints);
    myCbReplaceAll.addItemListener(itemListener);
    if (myIsInvokedOnDeclaration) {
      myCbReplaceAll.setEnabled(false);
      myCbReplaceAll.setSelected(true);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:IntroduceFieldCentralPanel.java


示例6: getComponent

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Nullable
protected JComponent getComponent() {
  if (!myCantChangeFinalModifier) {
    myCanBeFinalCb = new NonFocusableCheckBox("Declare final");
    myCanBeFinalCb.setSelected(createFinals());
    myCanBeFinalCb.setMnemonic('f');
    final FinalListener finalListener = new FinalListener(myEditor);
    myCanBeFinalCb.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        new WriteCommandAction(myProject, getCommandName(), getCommandName()) {
          @Override
          protected void run(@NotNull Result result) throws Throwable {
            PsiDocumentManager.getInstance(myProject).commitDocument(myEditor.getDocument());
            final PsiVariable variable = getVariable();
            if (variable != null) {
              finalListener.perform(myCanBeFinalCb.isSelected(), variable);
            }
          }
        }.execute();
      }
    });
  } else {
    return null;
  }
  final JPanel panel = new JPanel(new GridBagLayout());
  panel.setBorder(null);

  if (myCanBeFinalCb != null) {
    panel.add(myCanBeFinalCb, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
  }

  panel.add(Box.createVerticalBox(), new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0));

  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:JavaVariableInplaceIntroducer.java


示例7: getBeforeCheckinConfigurationPanel

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox optimizeBox = new NonFocusableCheckBox(VcsBundle.message("checkbox.checkin.options.optimize.imports"));
  CheckinHandlerUtil.disableWhenDumb(myProject, optimizeBox, "Impossible until indices are up-to-date");
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(optimizeBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT = optimizeBox.isSelected();
    }

    @Override
    public void restoreState() {
      optimizeBox.setSelected(getSettings().OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT);
    }
  };

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:OptimizeImportsBeforeCheckinHandler.java


示例8: getBeforeCheckinConfigurationPanel

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox cleanupCodeCb = new NonFocusableCheckBox(VcsBundle.message("before.checkin.cleanup.code"));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel cbPanel = new JPanel(new BorderLayout());
      cbPanel.add(cleanupCodeCb, BorderLayout.WEST);
      CheckinHandlerUtil
        .disableWhenDumb(myProject, cleanupCodeCb, "Code analysis is impossible until indices are up-to-date");
      return cbPanel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      VcsConfiguration.getInstance(myProject).CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT = cleanupCodeCb.isSelected();
    }

    @Override
    public void restoreState() {
      cleanupCodeCb.setSelected(VcsConfiguration.getInstance(myProject).CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:CodeCleanupCheckinHandlerFactory.java


示例9: getBeforeCheckinConfigurationPanel

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox reformatBox = new NonFocusableCheckBox(VcsBundle.message("checkbox.checkin.options.reformat.code"));

  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(reformatBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().REFORMAT_BEFORE_PROJECT_COMMIT = reformatBox.isSelected();
    }

    @Override
    public void restoreState() {
      reformatBox.setSelected(getSettings().REFORMAT_BEFORE_PROJECT_COMMIT);
    }
  };

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:ReformatBeforeCheckinHandler.java


示例10: getBeforeCheckinConfigurationPanel

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox rearrangeBox = new NonFocusableCheckBox(VcsBundle.message("checkbox.checkin.options.rearrange.code"));
  CheckinHandlerUtil.disableWhenDumb(myProject, rearrangeBox, "Impossible until indices are up-to-date");
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(rearrangeBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().REARRANGE_BEFORE_PROJECT_COMMIT = rearrangeBox.isSelected();
    }

    @Override
    public void restoreState() {
      rearrangeBox.setSelected(getSettings().REARRANGE_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:RearrangeBeforeCheckinHandler.java


示例11: getBeforeCheckinConfigurationPanel

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox checkBox = new NonFocusableCheckBox(VcsBundle.message("before.checkin.standard.options.check.smells"));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      JPanel panel = new JPanel(new BorderLayout());
      panel.add(checkBox);
      CheckinHandlerUtil.disableWhenDumb(myProject, checkBox, "Code analysis is impossible until indices are up-to-date");
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT = checkBox.isSelected();
    }

    @Override
    public void restoreState() {
      checkBox.setSelected(getSettings().CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:CodeAnalysisBeforeCheckinHandler.java


示例12: createCheckboxes

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
protected void createCheckboxes(JPanel panel, GridBagConstraints gbConstraints) {
  gbConstraints.insets = new Insets(0, 0, 4, 0);
  gbConstraints.gridwidth = 1;
  gbConstraints.gridx = 0;
  gbConstraints.weighty = 0;
  gbConstraints.weightx = 1;
  gbConstraints.fill = GridBagConstraints.BOTH;
  myCbSearchForReferences = new NonFocusableCheckBox(RefactoringBundle.message("search.for.references"));
  myCbSearchForReferences.setSelected(getSearchForReferences());
  panel.add(myCbSearchForReferences, gbConstraints);

  super.createCheckboxes(panel, gbConstraints);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:RenameWithOptionalReferencesDialog.java


示例13: getComponent

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
protected JComponent getComponent() {
  myCanBeFinalCb = new NonFocusableCheckBox("Declare final");
  myCanBeFinalCb.setSelected(false);
  myCanBeFinalCb.setMnemonic('f');
  final GrFinalListener finalListener = new GrFinalListener(myEditor);
  myCanBeFinalCb.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      new WriteCommandAction(myProject, getCommandName(), getCommandName()) {
        @Override
        protected void run(@NotNull Result result) throws Throwable {
          PsiDocumentManager.getInstance(myProject).commitDocument(myEditor.getDocument());
          final GrVariable variable = getVariable();
          if (variable != null) {
            finalListener.perform(myCanBeFinalCb.isSelected(), variable);
          }
        }
      }.execute();
    }
  });
  final JPanel panel = new JPanel(new GridBagLayout());
  panel.setBorder(null);

  if (myCanBeFinalCb != null) {
    panel.add(myCanBeFinalCb, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
                                                     new Insets(5, 5, 5, 5), 0, 0));
  }

  panel.add(Box.createVerticalBox(),
            new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:GrInplaceVariableIntroducer.java


示例14: InstanceofOptionStep

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
private InstanceofOptionStep() {
  final JCheckBox checkbox = new NonFocusableCheckBox(CodeInsightBundle.message("generate.equals.hashcode.accept.sublcasses"));
  checkbox.setSelected(CodeInsightSettings.getInstance().USE_INSTANCEOF_ON_EQUALS_PARAMETER);
  checkbox.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(final ActionEvent e) {
      CodeInsightSettings.getInstance().USE_INSTANCEOF_ON_EQUALS_PARAMETER = checkbox.isSelected();
    }
  });

  myPanel = new JPanel(new VerticalFlowLayout());
  myPanel.add(checkbox);
  myPanel.add(new JLabel(CodeInsightBundle.message("generate.equals.hashcode.accept.sublcasses.explanation")));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:GenerateEqualsWizard.java


示例15: ExtractMethodDialog

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
public ExtractMethodDialog(Project project,
                           PsiClass targetClass, final InputVariables inputVariables, PsiType returnType,
                           PsiTypeParameterList typeParameterList, PsiType[] exceptions, boolean isStatic, boolean canBeStatic,
                           final boolean canBeChainedConstructor,
                           String initialMethodName,
                           String title,
                           String helpId,
                           final PsiElement[] elementsToExtract) {
  super(project);
  myProject = project;
  myTargetClass = targetClass;
  myReturnType = returnType;
  myTypeParameterList = typeParameterList;
  myExceptions = exceptions;
  myStaticFlag = isStatic;
  myCanBeStatic = canBeStatic;
  myElementsToExtract = elementsToExtract;
  myVariableData = inputVariables;
  myHelpId = helpId;
  mySignature = new MethodSignatureComponent("", project, JavaFileType.INSTANCE);
  mySignature.setPreferredSize(new Dimension(500, 100));
  mySignature.setMinimumSize(new Dimension(500, 100));
  setTitle(title);

  // Create UI components

  myNameField = createNameField(initialMethodName);

  int height = myVariableData.getInputVariables().size() + 2;
  if (myExceptions.length > 0) {
    height += myExceptions.length + 1;
  }
  myMakeStatic = new NonFocusableCheckBox();
  myMakeStatic.setText(RefactoringBundle.message("declare.static.checkbox"));
  if (canBeChainedConstructor) {
    myCbChainedConstructor = new NonFocusableCheckBox(RefactoringBundle.message("extract.chained.constructor.checkbox"));
  }

  init();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:41,代码来源:ExtractMethodDialog.java


示例16: getComponent

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Nullable
protected JComponent getComponent() {
  if (!myCantChangeFinalModifier) {
    myCanBeFinalCb = new NonFocusableCheckBox("Declare final");
    myCanBeFinalCb.setSelected(createFinals());
    myCanBeFinalCb.setMnemonic('f');
    final FinalListener finalListener = new FinalListener(myEditor);
    myCanBeFinalCb.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        new WriteCommandAction(myProject, getCommandName(), getCommandName()) {
          @Override
          protected void run(com.intellij.openapi.application.Result result) throws Throwable {
            PsiDocumentManager.getInstance(myProject).commitDocument(myEditor.getDocument());
            final PsiVariable variable = getVariable();
            if (variable != null) {
              finalListener.perform(myCanBeFinalCb.isSelected(), variable);
            }
          }
        }.execute();
      }
    });
  } else {
    return null;
  }
  final JPanel panel = new JPanel(new GridBagLayout());
  panel.setBorder(null);

  if (myCanBeFinalCb != null) {
    panel.add(myCanBeFinalCb, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
  }

  panel.add(Box.createVerticalBox(), new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0));

  return panel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:37,代码来源:JavaVariableInplaceIntroducer.java


示例17: createNorthPanel

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
protected JComponent createNorthPanel() {
  myNameLabel = JBLabelDecorator.createJBLabelDecorator().setBold(true);

  myTargetDirectoryField = new TextFieldWithHistoryWithBrowseButton();
  final List<String> recentEntries = RecentsManager.getInstance(myProject).getRecentEntries(RECENT_KEYS);
  if (recentEntries != null) {
    myTargetDirectoryField.getChildComponent().setHistory(recentEntries);
  }
  final FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  myTargetDirectoryField.addBrowseFolderListener(RefactoringBundle.message("select.target.directory"),
                                                 RefactoringBundle.message("the.file.will.be.moved.to.this.directory"),
                                                 myProject,
                                                 descriptor,
                                                 TextComponentAccessor.TEXT_FIELD_WITH_HISTORY_WHOLE_TEXT);
  final JTextField textField = myTargetDirectoryField.getChildComponent().getTextEditor();
  FileChooserFactory.getInstance().installFileCompletion(textField, descriptor, true, getDisposable());
  textField.getDocument().addDocumentListener(new DocumentAdapter() {
    @Override
    protected void textChanged(DocumentEvent e) {
      validateOKButton();
    }
  });
  myTargetDirectoryField.setTextFieldPreferredWidth(CopyFilesOrDirectoriesDialog.MAX_PATH_LENGTH);
  Disposer.register(getDisposable(), myTargetDirectoryField);

  String shortcutText = KeymapUtil.getFirstKeyboardShortcutText(ActionManager.getInstance().getAction(IdeActions.ACTION_CODE_COMPLETION));

  myCbSearchForReferences = new NonFocusableCheckBox(RefactoringBundle.message("search.for.references"));
  myCbSearchForReferences.setSelected(RefactoringSettings.getInstance().MOVE_SEARCH_FOR_REFERENCES_FOR_FILE);

  return FormBuilder.createFormBuilder().addComponent(myNameLabel)
    .addLabeledComponent(RefactoringBundle.message("move.files.to.directory.label"), myTargetDirectoryField, UIUtil.LARGE_VGAP)
    .addTooltip(RefactoringBundle.message("path.completion.shortcut", shortcutText))
    .addComponentToRightColumn(myCbSearchForReferences, UIUtil.LARGE_VGAP).getPanel();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:37,代码来源:MoveFilesOrDirectoriesDialog.java


示例18: getComponent

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Nullable
@Override
protected JComponent getComponent() {
  myCanBeFinalCb = new NonFocusableCheckBox("Declare final");
  myCanBeFinalCb.setSelected(false);
  myCanBeFinalCb.setMnemonic('f');
  final GrFinalListener finalListener = new GrFinalListener(myEditor);
  myCanBeFinalCb.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      new WriteCommandAction(myProject, getCommandName(), getCommandName()) {
        @Override
        protected void run(Result result) throws Throwable {
          PsiDocumentManager.getInstance(myProject).commitDocument(myEditor.getDocument());
          final GrVariable variable = getVariable();
          if (variable != null) {
            finalListener.perform(myCanBeFinalCb.isSelected(), variable);
          }
        }
      }.execute();
    }
  });
  final JPanel panel = new JPanel(new GridBagLayout());
  panel.setBorder(null);

  if (myCanBeFinalCb != null) {
    panel.add(myCanBeFinalCb, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
  }

  panel.add(Box.createVerticalBox(), new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0));

  return panel;

}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:35,代码来源:GrInplaceVariableIntroducer.java


示例19: getBeforeCheckinConfigurationPanel

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
@Override
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox cleanupCodeCb = new NonFocusableCheckBox(VcsBundle.message("before.checkin.cleanup.code"));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel cbPanel = new JPanel(new BorderLayout());
      cbPanel.add(cleanupCodeCb, BorderLayout.WEST);
      CheckinHandlerUtil
              .disableWhenDumb(myProject, cleanupCodeCb, "Code analysis is impossible until indices are up-to-date");
      return cbPanel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      VcsConfiguration.getInstance(myProject).CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT = cleanupCodeCb.isSelected();
    }

    @Override
    public void restoreState() {
      cleanupCodeCb.setSelected(VcsConfiguration.getInstance(myProject).CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:consulo,项目名称:consulo,代码行数:29,代码来源:CodeCleanupCheckinHandlerFactory.java


示例20: showBalloon

import com.intellij.ui.NonFocusableCheckBox; //导入依赖的package包/类
protected void showBalloon() {
  NonFocusableCheckBox checkBox = new NonFocusableCheckBox(RefactoringBundle.message("delegation.panel.delegate.via.overloading.method"));
  checkBox.addActionListener(e -> {
    myDelegate = checkBox.isSelected();
    updateCurrentInfo();
  });
  JPanel content = new JPanel(new BorderLayout());
  content.add(new JBLabel("Performed signature modifications:"), BorderLayout.NORTH);
  content.add(myPreview.getComponent(), BorderLayout.CENTER);
  updateMethodSignature(myStableChange);
  content.add(checkBox, BorderLayout.SOUTH);
  final BalloonBuilder balloonBuilder = JBPopupFactory.getInstance().createDialogBalloonBuilder(content, null).setSmallVariant(true);
  myBalloon = balloonBuilder.createBalloon();
  myEditor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE);
  myBalloon.show(new PositionTracker<Balloon>(myEditor.getContentComponent()) {
    @Override
    public RelativePoint recalculateLocation(Balloon object) {
      int offset = myStableChange.getMethod().getTextOffset();
      VisualPosition visualPosition = myEditor.offsetToVisualPosition(offset);
      Point point = myEditor.visualPositionToXY(new VisualPosition(visualPosition.line, visualPosition.column));
      return new RelativePoint(myEditor.getContentComponent(), point);
    }
  }, Balloon.Position.above);
  Disposer.register(myBalloon, () -> {
    EditorFactory.getInstance().releaseEditor(myPreview);
    myPreview = null;
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:29,代码来源:InplaceChangeSignature.java



注:本文中的com.intellij.ui.NonFocusableCheckBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Loader类代码示例发布时间:2022-05-22
下一篇:
Java StartTagType类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap